Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

GYM Environment for XPlane. Reinforcement Learning and Autonomous Piloting.

License

NotificationsYou must be signed in to change notification settings

adderbyte/GYM_XPLANE_ML

Repository files navigation



This project documents set up of Reinforcement learning environment for flight control. This will enable each user/learner/student/flight enthusiast to come with their own RL algorithm that can interact with and control in real time an aircraft in a simulation environment. The simulator used isX-Plane (the flight environment). This gives a realistic environment to work with together with parameters to help keep the simulation as close to reality as possible.

Update: Use the leaderboard wiki Page-->(Leaderboard) to add details of your own scenario or (reinforcement learning) algorithm.


  GYM-XPLANE ENVIRONMENT INSTALLATION

To install the gym x-palne environment go through the read me file of the folder :Gym-Xplane-final versionThis is the latest version of the actual gym-xplane environment.

The other folders contain additional modules for additional functionalities. The names of such folders would givean idea as to what each of such modules does.

Read the Wiki to get a general idea of the environment and training procedure (Gym-Xplane Wiki).


Requirements


General setup

  • GYM XPLANE ENVIRONMENT
  • MULTI AGENT ENVIRONMENT SET UP (Work in progress)

Agent-Environment Interaction Flow


alt-text


Example Training Episode


alt-text


Action Space Parameters


The possible action parameters are given below. The choice of parameters would depend on the task. For example one might decide that the last three parameters are not important for the keep heading task (Gym Xplane Wiki) .

Action Space ParameterAction typeAction Value Range
Latitudinal StickBox[-1,1]
Longitudinal StickBox[-1,1]
Rudder PedalsBox[-1,1]
ThrottleBox[-1/4,1]
GearDiscrete0,1
FlapsBox[0,1]
SpeedbrakesBox[-0.5,1.5]

State Space Parameters


The state space parameters are well documented inXPlane Data Ref. The number and configuration of state space parameters would also depend on the task. It is possible to use a derived state spade parameters.

Note that, usually a UDP connection (XPlaneConnect) is required to read any parameter parameter from XPlane. An example of how to read parameter from UDP connection is shown below:

client = xpc.XPlaneConnect() # UDP connectorclient.getDREF("sim/flightmodel/position/P")[0][0] # moment Pclient.getPOSI() # get the lat, long,altitude, pitch, roll, heading, gear

A typical state space parameter configuration is shown below:

State Space ParameterState typeState Value Range
velocity_xBox[0,120]
velocity_yBox[0,120]
delta_headingBox[-300,300]

The range of each parameter value would also depend on the configuration or simulation task.

client (UDP connector) already has a functiongetPOSI that helps read thelatitude, longitude, altitude, pitch, roll, heading. Other parameters could be added by using the clientgetDREF function. Note that the string"sim/flightmodel/position/P" is gotten from the Xplane Dataref referenced earlier (XPlane Data Ref)


Flight Dashboard


To learn more about this go to :FlightDataVizDashBoardalt-text


TO DO

  • Use XVFB for fake display.
  • Docker support (under test)
  • Algorithm implementations (high priority) / GPU support to be included
  • Real Time flight and data visualization interface.
  • Investigate Federated Learning / Thompson Sampling / policy-space response oracles (psro)

About

GYM Environment for XPlane. Reinforcement Learning and Autonomous Piloting.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp