Spawn an autonomous “random-walk” aircraft within a bounded 3D area (for RL) #1348
Unanswered
emanuelegreco29
asked this question in
Q&A
Replies: 1 comment 1 reply
-
|
It is possible to direct JSBSim to take off and fly a set of waypoints, which could be randomized either internally or through an external process such as with sed. Script located at scripts/c3105.xml should show some of how that works. It has been a while since I have exercised that script myself. But, as for question #1, below, that could be done. As for question #2, my choice would be for solution a) or c). Controlling altitude and pitch are within the capabilities of the JSBSIm control components and there may already be that functionality, but given some thought one could write such an autopilot. Regarding question #4, this seems to me on the surface like something an external process/script (bash?) would do and then instantiate JSBSim after having modified an initialization file (through sed?) as needed.
I hope this helps.
Jon
From: Emanuele Greco ***@***.***>
Sent: Monday, October 20, 2025 7:13 AM
To: JSBSim-Team/jsbsim ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [JSBSim-Team/jsbsim] Spawn an autonomous “random-walk” aircraft within a bounded 3D area (for RL) (Discussion #1348)
Hi JSBSim team 👋
I’m building a reinforcement learning (RL) environment and I’d like to use JSBSim to simulate a single aircraft that moves autonomously with simple randomized behavior inside a bounded 3D region (e.g., a cube around a reference point). I’d like to choose the aircraft model from those available, and have it move at roughly constant speed (or speed that varies naturally during turns).
Questions
1. Built-in capability:
Does JSBSim provide any built-in functionality (scripts, examples, autopilot/guidance components) to drive an aircraft with a simple random-walk / random-waypoint behavior without FlightGear? Or is the intended approach to implement this as an external control loop that writes to the property tree (e.g., aileron/elevator/throttle commands) each step?
2. Best-practice for bounded motion:
* Recommended way to enforce a bounded 3D area?
For example, should I (a) detect when the position is outside the box and steer back, (b) reset/teleport the aircraft within bounds via initial-condition properties, or (c) use a local frame and constrain target waypoints?
* Any pitfalls in frequently resetting initial conditions mid-sim?
3. Speed control:
* Is there a straightforward way to maintain a target airspeed/groundspeed (e.g., via existing FCS/autopilot components), or should I manually control throttle and pitch to approximate constant speed while turning?
4. Selecting models & initialization:
* Recommended APIs/properties to programmatically select an aircraft model and set initial conditions (position, attitude, speed) for repeated randomized episodes?
5. Multiple instances & performance:
* Any guidance or examples for running multiple FDM instances in parallel (for RL data collection), especially via Python?
6. Pointers to examples/docs:
* If there are example XML scripts (autopilot, guidance, route following), Python snippets, or discussions showing headless random motion or simple waypoint following, I’d really appreciate links.
…_____
If there’s a canonical way to do this in JSBSim (or examples I can follow), I’d love your guidance. Thanks a lot for your time and for maintaining such a great FDM!
—
Reply to this email directly, view it on GitHub <#1348> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AIH7T26OQKJHBUWVAB2W2J33YTNU5AVCNFSM6AAAAACJVWPZ4KVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZZGA2TCMJTGA> .
You are receiving this because you are subscribed to this thread. <https://github.com/notifications/beacon/AIH7T23BNRUWFSYA7A3MT7D3YTNU5A5CNFSM6AAAAACJVWPZ4KWGG33NNVSW45C7OR4XAZNKIRUXGY3VONZWS33OVJRW63LNMVXHIX3JMTHABCQ37I.gif> Message ID: ***@***.*** ***@***.***> >
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi JSBSim team 👋
I’m building a reinforcement learning (RL) environment and I’d like to use JSBSim to simulate a single aircraft that moves autonomously with simple randomized behavior inside a bounded 3D region (e.g., a cube around a reference point). I’d like to choose the aircraft model from those available, and have it move at roughly constant speed (or speed that varies naturally during turns).
Questions
Built-in capability:
Does JSBSim provide any built-in functionality (scripts, examples, autopilot/guidance components) to drive an aircraft with a simple random-walk / random-waypoint behavior without FlightGear? Or is the intended approach to implement this as an external control loop that writes to the property tree (e.g., aileron/elevator/throttle commands) each step?
Best-practice for bounded motion:
For example, should I (a) detect when the position is outside the box and steer back, (b) reset/teleport the aircraft within bounds via initial-condition properties, or (c) use a local frame and constrain target waypoints?
Speed control:
Selecting models & initialization:
Multiple instances & performance:
Pointers to examples/docs:
If there’s a canonical way to do this in JSBSim (or examples I can follow), I’d love your guidance. Thanks a lot for your time and for maintaining such a great FDM!
Beta Was this translation helpful? Give feedback.
All reactions