0
$\begingroup$

Rosanswers logo

Hi.

I'm trying to learn how to build a visual robot model from scratch with this tutorial.

When I run the first shape it works fine, but when I try to run the others shapes rViz show messages like these:


base_link: Transform OK

box: No transform from [box] to [/base_link]

gripper_pole: No transform from [gripper_pole] to [/base_link]

head: No transform from [head] to [/base_link]

left_back_wheel: No transform from [left_back_wheel] to [/base_link]

...

right_tip: No transform from [right_tip] to [/base_link]

URDF: URDF parsed OK


I have readed all about the topic, but I don't find any solution. This is a problem in the tf? I'm copy-pasting the code of the robots and following step by step the tutorial, where is the problem?

Sorry for my poor english and thanks!


Originally posted by mbj on ROS Answers with karma: 197 on 2011-03-09

Post score: 5

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

If you have any movable joints these need to be published. There is a package called joint_state_publisher which you can use (not part of the ROS install).

http://www.ros.org/wiki/joint_state_publisher

Build that package, then create a launch file similar to the following:

 <launch>
   <param name="robot_description" textfile="myrobot.urdf" />
   <arg name="gui" default="False" />
   <param name="use_gui" value="$(arg gui)"/>
   <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>

You can then launch as follows:

roslaunch myrobot.launch gui:=true

If you're not using joint_state_publisher then you will need to publish the movable joint states using sensor_msgs:JointState. One mistake I made with this is that all joint positions should be published at the same time by adding them to the JointState object. If you try to publish them separately then problems similar to the above can occur.


Originally posted by JediHamster with karma: 995 on 2011-03-09

This answer was ACCEPTED on the original site

Post score: 7


Original comments

Comment by emillumi1 on 2020-04-08:
Hi, im having trouble with the same .. have ros melodic and the issue is not No transform from [anything] to [/base_link] my display.launch file is

its the default launch file from urdf_tutorial file. i have installed joint_state_pulisher already... please help!!! The 'state_publisher' executable is deprecated. Please use 'robot_state_publisher' instead ///error from console

Comment by gvdhoorn on 2020-04-09:
Please do not post questions as comments under answers on already answered questions.

Post a new question.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.