Skip to content

Conversation

@aurebidart
Copy link
Contributor

Fixes: #12

About

This pull request introduces significant changes to integrate and demonstrate the use of the JSBSim flight dynamics model in the simulation environment. The changes include setting up the JSBSim dependency, adding configuration for a fixed-wing aircraft, and providing example Python scripts for interacting with the simulation. Below are the most important changes grouped by theme:

Core Dependency Setup

  • Added JSBSim as an external CMake project, including build configuration, library setup, and post-install steps to copy necessary files and models. This enables the integration of JSBSim for flight dynamics simulation. (CMakeLists.txt, [1] [2]

Simulation Configuration

  • Introduced a new simulation configuration file robot_f22_jsbsim.jsonc to define the physics, sensors, actuators, and controller for a fixed-wing aircraft using the JSBSim model. This includes detailed specifications for links, joints, and sensors such as cameras, IMU, and barometer. (robot_f22_jsbsim.jsonc, client/python/example_user_scripts/sim_config/robot_f22_jsbsim.jsoncR1-R283)

Example Scripts

Code Cleanup

How Has This Been Tested?

Screenshots and videos (if appropriate):

LucasJSch and others added 2 commits July 21, 2025 11:09
This commit introduces JSBSim as a supported flight dynamics engine in Project AirSim. It includes all necessary CMake integration, external dependency setup, and a sample fixed-wing aircraft configuration using JSBSim.

Additionally, it adds example Python scripts (`hello_fixed_wing.py`, `hello_helicopter.py`) that demonstrate how to load a JSBSim-based aircraft and interact with it using the simulation API.

Note:
✔️ Fully functional on Windows.
⚠️ Not yet supported on Linux.
@aurebidart aurebidart changed the title Jsb sim JSBSim Jul 21, 2025
@jonyMarino jonyMarino mentioned this pull request Jul 21, 2025
@jonyMarino jonyMarino added enhancement New feature or request JSBSim roadmap Part of the official roadmap labels Jul 28, 2025
@thedarkamendez
Copy link

I've been looking all over trying to find a sim that supports fixed wing drones! This looks awesome! Any eta on when this will be merged?

@jonyMarino
Copy link
Contributor

Hi @thedarkamendez, thanks for your interest in Project AirSim!

We already support fixed-wing aircraft beyond JSBSim—feel free to check out the available examples in the repository. The main remaining step is resolving the Linux build and packaging process, which has been delayed due to our current workload.

We appreciate your patience and contributions are always welcome if you'd like to help move this forward!

@thedarkamendez
Copy link

thedarkamendez commented Aug 20, 2025

@jonyMarino, thanks for the response, I also noticed that! Over the weekend I tried building this PR from source on my computer running ubuntu and noticed what you are mentioning. I'm also busy as well but would be happy to try and help if I have some free time. Do you have a list of tasks already lined up for getting it running for linux, or just that you know its not working yet and need to get it working? I want to know so I can better understand what needs to be done 😄

@thedarkamendez
Copy link

@jonyMarino when you built UE did you enable RTTI? I am running into the build issue that UE doesn't have RTTI enabled but JSBSim needs RTTI

@jonyMarino
Copy link
Contributor

Thanks for looking into this, @thedarkamendez.

Just to clarify the current build setup: JSBSim is being compiled with simlibs, and then that combined library is included into Unreal Engine. On Windows, RTTI is typically enabled by default, but on Linux it might not be, so that’s something to double-check.

In this PR, JSBSim is currently included as a dynamic library. However, I’m totally fine with switching to a static library for Linux if that makes integration easier. You might want to take a look at the relevant section in the CMakeLists.txt to adjust that configuration accordingly.

Let me know what you find or if you need help testing across platforms.

@DmitrJTR008
Copy link

DmitrJTR008 commented Nov 6, 2025

Hello. Can you help me with this ?

(airsim-venv) PS U:\JSBsim52\ProjectAirSim-JSBSim\client\python\example_user_scripts> python hello_fixed_wing.py
15:33:32:751 [INFO] Connecting to simulation server at 127.0.0.1
15:33:32:754 [INFO] Connection opened.
15:33:32:755 [INFO] Started the pub-sub topic receiving thread.
15:33:32:755 [INFO] Loading scene config: scene_basic_fixed_wing.jsonc
15:33:37:548 [ERROR] Exception occurred: [Errno 2] No such file or directory: 'sim_config/robot_737_jsbsim.jsonc'
Traceback (most recent call last):
File "U:\JSBsim52\ProjectAirSim-JSBSim\client\python\example_user_scripts\hello_fixed_wing.py", line 28, in main
world = World(client, "scene_basic_fixed_wing.jsonc", delay_after_load_sec=2)
File "U:\JSBsim52\ProjectAirSim-JSBSim\client\python\projectairsim\src\projectairsim\world.py", line 61, in init
config_loaded, config_paths = load_scene_config_as_dict(
File "U:\JSBsim52\ProjectAirSim-JSBSim\client\python\projectairsim\src\projectairsim\utils.py", line 508, in load_scene_config_as_dict
with open(total_actor_path) as e:
FileNotFoundError: [Errno 2] No such file or directory: 'sim_config/robot_737_jsbsim.jsonc'
robot_ah1s_jsbsim
No such file or directory: 'sim_config/robot_ah1s_jsbsim.jsonc'

@jonyMarino
Copy link
Contributor

@DmitrJTR008 run python from the same folder the script is

@DmitrJTR008
Copy link

@jonyMarino The problem is that there are no files anywhere.

@jonyMarino
Copy link
Contributor

I see. You would have to take out those vehicles from the script then. I see the f22 and x8 are being added

@jonyMarino
Copy link
Contributor

@thedarkamendez do you want to help me testing this copilot generated commit on linux?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file doesn't belong to here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request JSBSim roadmap Part of the official roadmap

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Integrate JSBSim for Aircraft Physics and Control

5 participants