Skip to content

feat(sim): Project AirSim simulator backend (airstack up --sim projectairsim) - #437

Merged
andrewjong merged 3 commits into
developfrom
feature/project-airsim
Dec 2, 2026
Merged

andrewjong merged 3 commits into
developfrom
feature/project-airsim

Conversation

@andrewjong

@andrewjong andrewjong commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

What features did you add and/or bugs did you address?

  • Which GitHub issue does this address?

    No issue. This adds Project AirSim (IAMAI's UE5 successor to Microsoft AirSim) as a fourth simulator backend: airstack up --sim projectairsim.

  • Additional description if not fully described in the GitHub issue

    Three commits: a small Microsoft AirSim build fix, the backend, and its docs. The branch was stacked on fix(interface): keep MAVROS topics at interface/mavros/<topic> on MAVROS 2.15+ (follow-up to #433) #436 (MAVROS 2.15+ fix) and is now rebased onto develop after fix(interface): keep MAVROS topics at interface/mavros/<topic> on MAVROS 2.15+ (follow-up to #433) #436 merged.

    One project-airsim container runs:

    • a packaged UE5 environment (Blocks by default; Neighborhood and others via --scene, fetched and SHA-256-verified on first launch);
    • PX4 SITL v1.16.1 in lockstep;
    • pas_ros_bridge, a C++ bridge.

    The bridge publishes the same stereo, depth and ground-truth topics as the other simulators, plus a 10 Hz GPU LiDAR sweep. The default MIGHTY stack (full_default) therefore runs on it unchanged. Compared with Isaac Sim it is ready to fly in 22 s instead of 105 s, uses 1/12 of the RAM, and its image is 2.8× smaller.

  • Please add videos and images to demonstrate the feature.

    full_default flying a 100 m street route on Project AirSim's LiDAR in Neighborhood: chase camera, with the onboard left stereo camera inset, at 3× speed. The clip is project_airsim_demo.mp4 (also embedded in the guide):

    Project AirSim demo poster

    Lumen off (left) and on (right) in a custom supermarket environment. Top is the onboard RGB camera, bottom is the chase camera:

    Lumen A/B

supermarket_lumen_on_circle.mp4

How did you implement it?

  • Container (simulation/project-airsim/):
    • The image builds the Project AirSim C++ client (pinned to v1.1.0) and PX4 SITL v1.16.1.
    • The entrypoint runs scene generation → bridge build → Unreal → scene load → PX4 → bridge.
    • The tmux session is created just before Unreal starts, so a first-launch download or build never looks like a crashed pane.
  • config/generate_scene.py writes the Project AirSim scene and airstack_meta.json from environment variables or a fleet file. Integration findings are encoded as defaults:
    • Spawn origins surveyed per environment, because spawning inside geometry blocks arming.
    • Seattle home position: Project AirSim's dipole magnetometer disagrees with PX4's world magnetic model elsewhere.
    • Control link: PX4's link parked on UDP port 24540+i.
    • Physics: --physics fast-physics|jsbsim.
    • Empty compose values count as unset. An empty lidar-type silently selected the CPU raycast LiDAR, which cut camera rates to 0.1 Hz in dense scenes.
  • pas_ros_bridge (C++) is a single process that serves every robot, each on its own DDS domain. Project AirSim's topic socket (NNG PAIR0) accepts one client, so one bridge must serve all robots. It:
    • converts NED/FRD to ENU/FLU;
    • merges the GPU LiDAR's ~40 Hz rings into dense 10 Hz sweeps in the sensor frame;
    • decodes only streams that have subscribers;
    • publishes diagnostics.
  • CLI and harness:
    • --sim projectairsim (aliases pas and project-airsim), --scene and --physics;
    • the scenes catalog;
    • Project AirSim support in the liveliness, sensors, takeoff/hover/land, fixed-trajectory and waypoint tests;
    • the image plan and the build workflows.
  • Optional extras:
    • PROJECT_AIRSIM_CHASE_CAM=true adds a gimbal-levelled third-person camera for demos.
    • PROJECT_AIRSIM_LUMEN=true|false forces Lumen GI and reflections per RGB capture. This only works in environments packaged with the plugin from Project AirSim main; the v1.1.0 releases are Shipping builds that ignore these settings. The guide documents the custom-environment route, including a UE 5.8 compile fix.
  • Unrelated fix found along the way (ec0350edd): the Microsoft AirSim image failed to build because PX4's Python requirements pulled in numpy 2.

How do you run and use it?

airstack up --sim projectairsim                          # Blocks, GUI
airstack up --sim projectairsim --headless               # no window; cameras and LiDAR still render
airstack up --sim projectairsim --scene neighborhood     # other packaged environments
airstack up --sim projectairsim --robots 2               # multi-robot (one bridge, a DDS domain per robot)
airstack ready                                           # waits for /clock, nodes and PX4

# Optional
PROJECT_AIRSIM_CHASE_CAM=true airstack up --sim projectairsim --headless   # /robot_1/sensors/chase/image
PROJECT_AIRSIM_BINARY_PATH=/project-airsim-env/<Name>/<Project>.sh \
PROJECT_AIRSIM_SPAWN_ORIGIN=x,y,z PROJECT_AIRSIM_LUMEN=true \
  airstack up --sim projectairsim --headless            # a custom environment with Lumen

Then fly as on any other simulator, for example with the GCS takeoff, navigate and land tasks. The guide is in docs/simulation/project-airsim/index.md.

Testing with PyTest

  • What pytests did you add to ensure the feature is reliable and robust? What metrics are used?

    New tests:

    • tests/meta/test_project_airsim_scene_contract.py: 18 scene-generator contract tests, covering spawns, home position, ports, physics, LiDAR, Lumen, the chase camera, fleets, and empty compose values.
    • New cases in test_launch_intent_contract.py (CLI --sim, --scene, --physics and aliases) and test_docker_layer_plan_contract.py.
    • pas_ros_bridge gtests: frame conversion, LiDAR sweep merge, image, depth and camera-info encoding.

    Existing system tests now cover Project AirSim: liveliness, sensors (topic Hz plus LiDAR cloud sanity), takeoff/hover/land, fixed trajectories and waypoint flight. The metrics are the harness's own: topic rates, RTF, hover altitude and position error, takeoff and landing velocity RMSE, path RMSE, and odometry error against ground truth.

  • What's the exact command to run the pytests that test your feature?

    airstack test -m unit -v
    airstack test -m "liveliness or sensors or takeoff_hover_land" --sim projectairsim --num-robots 1 -v
    airstack test -m "liveliness or sensors or takeoff_hover_land" --sim projectairsim --num-robots 2 -v
    airstack test -m autonomy --sim projectairsim --trajectory-types Circle,Figure8,Racetrack,Line -v
    airstack test -m waypoint_flight --sim projectairsim -v
    airstack test -m "build_docker or build_packages" -v
  • What are the expected results of the tests?

    Results on an RTX 5090 desktop:

    Suite Result
    Unit 452 passed, 13 skipped
    pas_ros_bridge gtests (18 cases) pass
    Liveliness + sensors + takeoff/hover/land, 1 robot (rerun on this branch after the split) 20/20
    Same, 2 robots 20/20
    Fixed trajectories (Circle, Figure8, Racetrack, Line) 16/16
    Waypoint flight (MIGHTY on LiDAR) 4/5; one MIGHTY follower-start flake, a known MIGHTY issue

    Flight quality against Microsoft AirSim (legacy) on the same tests:

    Metric Project AirSim Microsoft AirSim
    Hover position std @ 0.5 / 1 / 2 m/s (m) 0.013 / 0.022 / 0.057 0.050 / 0.039 / 0.095
    Takeoff / landing velocity RMSE @ 1 m/s (m/s) 0.256 / 0.230 0.492 / 0.657
    Figure8 / Line path RMSE (m) 0.155 / 0.131 0.190 / 0.132
    Racetrack 0.778 m RMSE failed

    Compute cost: one robot, full_default, headless, hovering:

    Simulator Flight-ready Sim CPU (cores) Sim RAM VRAM Image
    Project AirSim (Blocks) 22 s 5.4 1.0 GB 2.0 GB 8.4 GB
    Microsoft AirSim legacy (Blocks) 21 s 3.3 0.5 GB 0.7 GB 8.6 GB
    Isaac Sim (default env) 105 s 6.5 12.7 GB 4.1 GB 23.1 GB

    Lumen in the supermarket costs about 6 % of the onboard camera rate (16.0 → 15.1 Hz) and 0.4–0.9 GB of VRAM.

    The system tests above ran locally with pytest<9, because of the 9.2 collection crash that hotfix: pin pytest below 9.2 in the test requirements (0.20.10) #434 fixes. The build tests haven't run on the OSMO runner yet. I'll trigger them with /pytest on this PR.

    Known limitations, also listed in the guide:

    • JSBSim physics is experimental: PX4's EKF doesn't tilt-align.
    • Lumen needs a custom-packaged environment.
    • In fast-physics, a drone that drifts into collision geometry can be flung away. This is an upstream issue.

Documentation

  • Was mkdocs.yml updated? (y/n)

    y. Added the simulator guide (docs/simulation/project-airsim/index.md) and the pas_ros_bridge README. The CLI, testing and release-notes pages are updated too. mkdocs build --strict is clean.

  • Do the docs have sufficient scope such that a newcomer can easily reproduce and use your feature?

    Yes. The guide covers:

    • quick start;
    • environments and spawn origins;
    • physics models;
    • architecture;
    • topics and frames;
    • Lumen;
    • packaging a custom environment;
    • compute cost;
    • configuration;
    • troubleshooting.
  • Is there sufficient visual media?

    Yes: the demo video and poster, the Lumen A/B image, and a mermaid architecture diagram.

Versioning

  • Did you make sure to bump the version number in the .env file according to semantic versioning?

    Yes: 0.21.0-dev.18 → 0.21.0-dev.19.

🤖 Generated with Claude Code

andrewjong and others added 3 commits December 2, 2026 17:52
PX4's Tools/setup/ubuntu.sh pulls the newest pandas, which needs numpy >= 2
and cannot replace the Debian numpy 1.26 that the ROS Jazzy Python
packages are built against ("Cannot uninstall numpy"), so the image no
longer built.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tairsim)

Project AirSim (IAMAI's UE5 successor to Microsoft AirSim) joins Isaac Sim,
Microsoft AirSim (legacy) and Simple Sim. One project-airsim container runs
a packaged UE5 environment (Blocks by default, others via --scene, fetched
and SHA-256-verified on first launch), PX4 SITL v1.16.1 in lockstep, and the
C++ pas_ros_bridge: a single process serving every robot on its own DDS
domain (Project AirSim's topic socket is NNG PAIR0, one client). It
publishes the same stereo/depth/ground-truth topics as the other simulators
plus a 10 Hz GPU LiDAR sweep, so the default MIGHTY stack runs on it.

- generate_scene.py: scene + airstack_meta.json from env knobs / fleets;
  surveyed spawn origins, Seattle home (PAS dipole magnetometer vs WMM),
  PX4 control link parked on 24540+i, --physics fast-physics|jsbsim,
  PROJECT_AIRSIM_LUMEN per-capture keys, chase camera. Empty compose
  knobs count as unset (an empty lidar-type silently selected the CPU
  raycast LiDAR).
- entrypoint: scene -> bridge build -> Unreal -> scene load -> PX4 -> bridge;
  tmux session created right before Unreal so a first-launch download or
  build never reads as a crashed pane.
- CLI/harness: --sim projectairsim (aliases pas, project-airsim), scenes,
  liveliness/sensors/takeoff/trajectory/waypoint support, contract tests.
- Docs: simulator guide, CLI, scenes, env vars; VERSION 0.21.0-dev.19.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Packaging any Unreal project with the Project AirSim plugin built from
main (the route to Lumen until a release ships PR #181's capture keys),
including the UE 5.8 FSharedString fix and Development-vs-Shipping CVar
behaviour; a Lumen off/on comparison from a packaged supermarket scene
with its camera-rate and VRAM cost; check indoor spawns with a camera
frame.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@andrewjong
andrewjong force-pushed the feature/project-airsim branch from c7a49e9 to 32fcbb9 Compare December 2, 2026 22:53
@andrewjong
andrewjong marked this pull request as ready for review December 2, 2026 22:56
@andrewjong
andrewjong merged commit cce18dd into develop Dec 2, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant