gym-jsbsim  by Gor-Ren

Aircraft control RL environments using JSBSim

Created 8 years ago
252 stars

Top 99.6% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

Gym-JSBSim provides reinforcement learning environments for aircraft control, leveraging the JSBSim flight dynamics model and adhering to the OpenAI Gym interface. It targets RL researchers and engineers seeking to develop and test control policies for fixed-wing aircraft, offering a standardized simulation framework with optional 3D visualization capabilities.

How It Works

This project integrates the JSBSim flight dynamics model with the OpenAI Gym API, enabling reinforcement learning agents to interact with simulated aircraft. Core functionality involves defining aircraft states and actions, and processing agent inputs through the JSBSim engine. For enhanced evaluation, it optionally integrates with the FlightGear simulator to provide real-time 3D visualization of the aircraft's behavior.

Quick Start & Requirements

  • Primary Install: pip install git+https://github.com/Gor-Ren/gym-jsbsim
  • Prerequisites: Requires a Unix-like operating system and Python 3.6 (note: this version is end-of-life). A prerequisite is the successful installation of the JSBSim flight dynamics model, including its C++ and Python libraries. The FlightGear simulator is optional but necessary for 3D visualization.
  • Links:

Highlighted Details

  • Tasks: Implements two primary control tasks: HeadingControl for maintaining initial heading and altitude, and TurnHeadingControl for turning towards a target heading while preserving altitude.
  • Aircraft Models: Supports simulation of the Cessna172P light aircraft, F15 fighter jet, and A320 airliner.
  • Environment IDs: Environments are instantiated using a structured ID format: JSBSim-{task}-{aircraft}-SHAPING_STANDARD-NoFG-v0.
  • State and Action Spaces: Features continuous state and action spaces. The state is a 17-element tuple encompassing altitude, attitude, velocities, control surface positions, and error metrics. Actions are 3-element tuples commanding normalized aileron, elevator, and rudder movements.
  • Visualization: Offers basic 2D rendering via env.render(mode='human') and optional 3D visualization through FlightGear using env.render(mode='flightgear').
  • Reward Shaping: Includes capabilities for sophisticated reward shaping, although the author notes that standard reward settings proved sufficient after resolving an RL agent hyperparameter issue.

Maintenance & Community

The provided README does not contain specific information regarding project maintainers, community support channels (e.g., Discord, Slack), or a public roadmap.

Licensing & Compatibility

The README does not specify the software license. This omission necessitates further investigation to determine compatibility for commercial use, closed-source integration, or redistribution.

Limitations & Caveats

The project requires Python 3.6, an outdated and unsupported version. The FlightGear 3D visualization component is described as potentially brittle, incorporating a "voodoo pause" to mitigate startup hangs. The author also suggests that a composition-over-inheritance design pattern might have been more appropriate for the FlightTask classes. Manual installation and verification of the JSBSim flight dynamics model are mandatory prerequisites.

Health Check
Last Commit

5 years ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
4 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.