RobCo: Wie generiert man URDF für seinen Roboter?
Nachdem Sie unseren Anweisungen wie man RobCos ROS2-Binding installiert gefolgt sind, führen Sie diese Schritte aus, um ein URDF zu exportieren.
Erste Shell: view_model.launch.py ausführen
Sie benötigen nicht zwingend eine GUI dafür, SSH-Zugriff ist ausreichend.
run_view_model.sh
cd robco_ws
source install/local_setup.sh
ros2 launch robco_description view_model.launch.pyLassen Sie diese Shell laufen, bis das URDF exportiert wurde.
Beispielausgabe
view_model_output.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']Zweite Shell: URDF exportieren
export_urdf.sh
cd robco_ws
source install/setup.sh
ros2 param get /robot_state_publisher robot_description > MyRobCo.urdfDieser Befehl hat keine Ausgabe und exportiert das vollständige URDF in eine Datei namens MyRobCo.urdf in Ihrem aktuellen Verzeichnis. Sie können den Dateinamen nach Bedarf ändern. Intern wird das URDF aus den xacro-Dateien generiert.
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