A simple ROS 2 tool to convert SDF files to URDF using urdfdom and sdformat_urdf.
After building, source your workspace and run:
ros2 run sdf_to_urdf sdf_to_urdf <input.sdf> <output.urdf><input.sdf>: Path to the input SDF file<output.urdf>: Path to save the converted URDF file
The limitations listed in https://github.com/ros/sdformat_urdf/tree/rolling/sdformat_urdf apply.
urdf::exportURDF()is deprecated but available in Jazzy (tested) and Kilted (not tested). However, the function has been removed in Rolling as of Jun 17 2025. There is a feature request for a replacement.
Apache-2.0