-
-
Notifications
You must be signed in to change notification settings - Fork 156
Using URDF or Xacro
Yannick Goumaz edited this page Jul 4, 2023
·
6 revisions
PROTO files should be used in favor of URDF and Xacro files. They can be added to the world file directly or imported at runtime using the Ros2Supervisor node.
In case you need to import your existing URDF or Xacro files, a conversion tool from URDF or Xacro format is available: urdf2webots.
In this example, we will convert the UR5e robot model available to /webots_ros2_ur_e_description/urdf/ur5e_robot.urdf
to PROTO file that is compatible to Webots:
ros2 run webots_ros2_importer urdf2proto \
--input=$(ros2 pkg prefix webots_ros2_ur_e_description --share)/urdf/ur5e_robot.urdf \
--disable-mesh-optimization \
--output=ur5e_robot.proto
Your PROTO file ur5e_robot.proto
should be available and you can include it in the Webots project by placing it under /protos
of your ROS2 package.
Similar to URDF, you can use xacro2proto
convert to Xacro files to Webots compatible PROTO files.
ros2 run webots_ros2_importer xacro2proto \
--input=path_to_xacro.xacro \
--disable-mesh-optimization \
--output=path_to_proto.proto
- The Ros2Supervisor Node
- Using URDF or Xacro
- Import your URDF Robot in Webots
- Refresh or Add URDF a Robot in a Running Simulation
- Wheeled robots
- Robotic arms
- Automobiles
- Drones