ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

The transforms are only available if you use the package: Robot State Publisher.

This package use your URDF to generate a TF tree. The URDF by itself can't do such a thing.

If you still have any questions after visiting the robot state publisher page. Please, comment below and I make a more complete answer.

The transforms are only available if you use the package: Robot State Publisher.

This package use uses your URDF to generate a TF tree. The URDF by itself can't do such a thing.

If you still have any questions after visiting the robot state publisher page. Please, comment below and I make a more complete answer.

__________ EDIT __________

First of all, you need at least two files: robot.launch and (robot.urdf or robot.urdf.xacro)

In the launch file, you must load the robot_description parameter and run robot_state_publisher:

robot.launch:

<launch>
  <param name="robot_description" command="$(find xacro)/xacro --inorder '$(find birhex_description)/urdf/tutorial.urdf.xacro'"/>
  <node pkg="rviz" type="rviz" name="rviz" />
  <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" />
</launch>

In this example, I also included RViz but it isn't crucial.

In the image below we have the TF tree and the model in Rviz. Remember, to be able to visualize the model in Rviz you must add the display type: Robot Model image description

The transforms are only available if you use the package: Robot State Publisher.

This package uses your URDF to generate a TF tree. The URDF by itself can't do such a thing.

If you still have any questions after visiting the robot state publisher page. Please, comment below and I make a more complete answer.

__________ EDIT __________

First of all, you need at least two files: robot.launch and (robot.urdf or robot.urdf.xacro)

In the launch file, you must load the robot_description parameter and run robot_state_publisher:

robot.launch:

<launch>
  <param name="robot_description" command="$(find xacro)/xacro --inorder '$(find birhex_description)/urdf/tutorial.urdf.xacro'"/>
  <node pkg="rviz" type="rviz" name="rviz" />
  <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" />
</launch>

In this example, I also included RViz but it isn't crucial.

In the image below we have the TF tree and the model in Rviz. Remember, to be able to visualize the model in Rviz you must add the display type: Robot Model image description

And this must solve your problems with No tf data..

However with Visual Code URDF preview, I'm open with the 3D Format .dae and it's working properly. Could you please provide your STL model?