I’m working on integrating a custom robot model into Gazebo using ROS 2 and URDF files. I’m using Gazebo Garden and ROS 2 Humble, and I want to simulate my vehicle with ArduPilot, particularly for autonomous navigation tasks.
I understand that ArduPilot traditionally uses SDF models for integration with gazebo_ardupilot_plugin. However, I would like to avoid converting my URDF to SDF using gz sdf -p or similar tools, and instead use my URDF model directly** in the simulation.
So my questions are:
**Is it fully supported to use a URDF file directly with ArduPilot and the gazebo_ardupilot_plugin?
Are there any limitations or known issues when using URDF instead of SDF with this plugin?
What are the best practices if I want to keep using URDF in this case?
Any insights, examples, or advice from someone who has done this would be really appreciated!
Gazebo Ionic and Harmonic support loading URDF models into a running world (see for example: Spawn URDF — Gazebo ionic documentation), so it should be possible to load a URDF model that can be controlled using ArduPilot. Additional SDF specific elements, inlcuding the ArduPilotPlugin, should be enclosed in a <gazebo> ... </gazebo> element inside the URDF model.
We don’t have any URDF examples in the ardupilot_gazebo or SITL_Models repos because it introduces an additional dependency on ROS that is not otherwise required. I’d recommend starting with a very simple URDF model, such as a box with an IMU and the ArduPilotPlugin, then try loading it and verify that a running SITL instance connects correctly.