URDF, Unified Robot Description Format is an XML format for representing a robot model. It is commonly used in Robot Operating System (ROS) tools such as rviz (Ros Visualization tool) and Gazebo simulator. The model consists of links and joints motion.
This repo contains an example of a URDF file and a launch script to run it. (ROS 2)
- Clone this repo into your ROS2 workspace, specifically into the workspace's SRC folder
- setup your ros environment
- Build the package with colcon.
- Launch the
robot_state_publisher
launch file withros2 launch urdf_example rsp.launch.py
. - Launch
joint_state_publisher_gui
withros2 run joint_state_publisher_gui joint_state_publisher_gui
. You may need to install it if you don't have it already. - Launch RViz with
rviz2 -d <path_to_your_rviz_file>/robotview.rviz
- remember to make sure its located in your ros workspace
- Set your fixed frame to
world
- Add a
RobotModel
display, with the topic set to/robot_description
, and alpha set to 0.8 - Add a
TF
display with names enabled.