What feature or enhancement are you proposing?
Hi! I'd like to contribute a bridge that lets an ArduPilot autopilot running in SITL (and PX4 later) control the existing Drone entity, with Genesis providing the physics.
The autopilot keeps its own state estimator (EKF) and control loops, Genesis steps the dynamics and returns ground-truth state each frame.
Starting with ArduPilot via its JSON SITL interface (plain UDP,), shipped as examples/drone/sitl_ardupilot.py + a short doc page. PX4 (Simulator MAVLink API) would follow as a separate PR.
Motivation
As a drone developer, I want to test real autopilot firmware (ArduPilot/PX4) against Genesis physics, so that I can validate flight-controller behaviour in Genesis instead of Gazebo, IsaacSim or AirSim.
Concrete user story: "I run sim_vehicle.py -v ArduCopter -f JSON:127.0.0.1, launch this example, type mode guided / arm throttle / takeoff 5 in MAVProxy, and watch the Drone entity take off and hold altitude inside Genesis."
Today Genesis has a Drone entity and set_propellers_rpm, but no way to close the loop with a real autopilot, you can only fly pre-scripted trajectories or a custom controller. This bridge turns Genesis into a drop-in physics backend for autopilot-in-the-loop testing.
Potential Benefit
- Positions Genesis as a fast alternative physics backend for the large ArduPilot/PX4 SITL user base (SITL_Models, CI pipelines, research labs).
- ArduPilot-first keeps the dependency footprint minimal: the JSON interface is plain UDP + JSON, so the example relies only on the Python stdlib (
socket, struct, json).
- Establishes a reusable pattern (PWM in to RPM to step to state out) that PX4 and other autopilots can plug into later.
What is the expected outcome of the implementation work?
Additional information
Reference documentation:
Open questions for maintainers:
- Do you want this in-tree (
examples/drone/sitl_ardupilot.py + doc) or as a companion repo?
- Any constraint on new dependencies? Plan is stdlib-only for ArduPilot; PX4 later would need a MAVLink library (e.g. pymavlink) is that acceptable in-tree, or should PX4 live elsewhere?
- Any prior art / work-in-progress on autopilot integration I should coordinate with (didn't find anything)?
cc @duburcqa @YilingQiao
What feature or enhancement are you proposing?
Hi! I'd like to contribute a bridge that lets an ArduPilot autopilot running in SITL (and PX4 later) control the existing
Droneentity, with Genesis providing the physics.The autopilot keeps its own state estimator (EKF) and control loops, Genesis steps the dynamics and returns ground-truth state each frame.
Starting with ArduPilot via its JSON SITL interface (plain UDP,), shipped as
examples/drone/sitl_ardupilot.py+ a short doc page. PX4 (Simulator MAVLink API) would follow as a separate PR.Motivation
As a drone developer, I want to test real autopilot firmware (ArduPilot/PX4) against Genesis physics, so that I can validate flight-controller behaviour in Genesis instead of Gazebo, IsaacSim or AirSim.
Concrete user story: "I run
sim_vehicle.py -v ArduCopter -f JSON:127.0.0.1, launch this example, typemode guided / arm throttle / takeoff 5in MAVProxy, and watch theDroneentity take off and hold altitude inside Genesis."Today Genesis has a
Droneentity andset_propellers_rpm, but no way to close the loop with a real autopilot, you can only fly pre-scripted trajectories or a custom controller. This bridge turns Genesis into a drop-in physics backend for autopilot-in-the-loop testing.Potential Benefit
socket,struct,json).What is the expected outcome of the implementation work?
examples/drone/sitl_ardupilot.pyconnects to ArduCopter SITL over the ArduPilot JSON interface (UDP 9002).Drone.set_propellers_rpm, step the scene, reply with the mandatory JSON state (timestamp, body-frame gyro + accel, NED position + velocity).takeoffto a target altitude and holds a stable hover in GUIDED mode.w-x-y-zquaternion → ArduPilot NED) and the specific-force accelerometer convention are handled and documented.pre-commitpasses.Additional information
Reference documentation:
Open questions for maintainers:
examples/drone/sitl_ardupilot.py+ doc) or as a companion repo?cc @duburcqa @YilingQiao