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.