RobCo: How to generate URDF for your Robot?
After following our instructions how to install RobCo’s ROS2 binding, perform these steps to export a URDF.
First shell: Run view_model.launch.py
You don’t neccessarily need a GUI for this one, using SSH access is fine.
example.sh
cd robco_ws
source install/setup.sh
ros2 launch robco_description view_model.launch.pyLeave this shell running until the URDF is exported.
Example output
example.txt
$ ros2 launch robco_description view_model.launch.py
[INFO] [launch]: All log files can be found below /home/uli/.ros/log/2026-04-27-21-04-19-855503-mypc03-927172
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [robot_state_publisher-1]: process started with pid [927193]
[INFO] [joint_state_publisher_gui-2]: process started with pid [927194]
[INFO] [rviz2-3]: process started with pid [927195]
[robot_state_publisher-1] [WARN] [1777316660.046560018] [kdl_parser]: The root link joint0 has an inertia specified in the URDF, but KDL does not support a root link with an inertia. As a workaround, you can add an extra dummy link to your URDF.
[robot_state_publisher-1] [INFO] [1777316660.046728648] [robot_state_publisher]: Robot initialized
[rviz2-3] qt.qpa.xcb: could not connect to display
[rviz2-3] qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
[rviz2-3] This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
[rviz2-3]
[rviz2-3] Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.
[rviz2-3]
[joint_state_publisher_gui-2] qt.qpa.xcb: could not connect to display
[joint_state_publisher_gui-2] qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
[joint_state_publisher_gui-2] This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
[joint_state_publisher_gui-2]
[joint_state_publisher_gui-2] Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.
[joint_state_publisher_gui-2]
[ERROR] [rviz2-3]: process has died [pid 927195, exit code -6, cmd '/opt/ros/jazzy/lib/rviz2/rviz2 --display-config /home/uli/robco_ws/install/robco_description/share/robco_description/rviz/view_model.rviz --ros-args -r __node:=rviz2'].
[ERROR] [joint_state_publisher_gui-2]: process has died [pid 927194, exit code -6, cmd '/opt/ros/jazzy/lib/joint_state_publisher_gui/joint_state_publisher_gui --ros-args -r __node:=joint_state_publisher_gui']Second shell: Export URDF
example.sh
cd robco_ws
source install/setup.sh
ros2 param get /robot_state_publisher robot_description > MyRobCo.urdfThis command has no output, and will export the full URDF to a file named MyRobCo.urdf in your current directory. You can change the filename as needed. Internally, it will generate the URDF from the xacro files.
Check out similar posts by category:
Robotics
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow