How do I display my own URDF in rviz?
Hello!
This might be a dumb question, but how do I view my own URDF File in rviz?
My approach so far:
- Create a new catkin package named "myrobot_description" with dependencies on the urdf package
- Create a folder urdf in the folder myrobot_description/urdf
- Create a valid URDF-File (as far as
check_urdf
is concerned) - Build the package with
catkin_make install
- Source the package by invoking
source setup.bash
in the install folder - Copy the launch files and folder from the
urdf_tutorial
folder to theinstall/share/myrobot_description
folder (this doesn't feel right.) Copy the URDF folder from the
src/myrobot_description/
folder to theinstall/share/myrobot_description
folder (wtf, this doesn't feel right AT ALL)Edit the display.launch file like this:
<launch> <arg name="gui" default="False" /> <param name="robot_description" textfile="/home/viki/catkin_ws/install/share/myrobot_description/urdf/myrobot.urdf" /> <param name="use_gui" value="$(arg gui)"/> <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" /> <node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" /> <node name="rviz" pkg="rviz" type="rviz" args="/home/viki/catkin_ws/install/share/myrobot_description/myrobot.rviz" required="true" />
</launch>
Launch rviz via
roslaunch myrobot_description display.launch
- End up with a white block in rviz and Errors concerning a missing base frame
Now, as you can see, I just play around helpless and do not understand the whole process - but I do not find any ressources on how to craft a correct launch file or on "registering" my package or using rviz or which directory I should use for building URDF models etc.
I appreciate any help and pointers in any direction.
Thanks. :)