ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
For non-fixed joints you need some source that publishes the joint states, otherwise the model cannot be displayed correctly, as the state of the joints is unknown.
A simple launch files for testing a URDF model in rviz using the joint_state_publisher looks like this:
<launch>
<param name="robot_description" command="$(find xacro)/xacro.py $(find yourrobot_urdf)/yourrobot/robot_base.urdf.xacro" />
<param name="use_gui" value="True"/>
<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" ></node>
<node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" />
<node name="rviz" pkg="rviz" type="rviz" />
</launch>
2 | No.2 Revision |
For non-fixed joints you need some source that publishes the joint states, otherwise the model cannot be displayed correctly, as the state of the joints is unknown.
A simple launch files for testing a URDF model in rviz using the joint_state_publisher looks like this:
<launch>
<param name="robot_description" command="$(find xacro)/xacro.py $(find yourrobot_urdf)/yourrobot/robot_base.urdf.xacro" />
<param name="use_gui" value="True"/>
<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" ></node>
<node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" />
<node name="rviz" pkg="rviz" type="rviz" />
</launch>
</launch>