![]() |
ros2_control - humble
|
Tutorial 2: MJCF Generation at Runtime
This tutorial demonstrates generating MJCF models from URDF at runtime.
Instead of pre-defining the MJCF file, the robot description is converted
dynamically using the robot_description_to_mjcf conversion script.
Key concepts:
- Runtime URDF to MJCF conversion using robot_description_to_mjcf.sh
- Using external input files (demo_resources/mjcf_generation/test_inputs.xml)
- Using <mujoco_inputs> tags embedded in URDF for customization
- Dynamic scene generation with cameras and sensors
Usage:
# Using external input files for MJCF customization
ros2 launch mujoco_ros2_control_demos 02_mjcf_generation.launch.py
# Using mujoco_inputs embedded directly in the URDF
ros2 launch mujoco_ros2_control_demos 02_mjcf_generation.launch.py use_urdf_inputs:=true