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

No transform from links to odom in rviz

asked 2016-01-06 11:18:38 -0500

Kishore Kumar gravatar image

updated 2016-01-07 13:52:40 -0500

lucasw gravatar image

I built an URDF model from scratch and launched successfully in gazebo. Then i added the differential_drive and joint_state plug-ins to the urdf model as follows

<plugin name="differential_drive_controller"
<plugin name="joint_state_publisher"
    <jointName>Castor_F, Castor_R</jointName>

Finally i launched the model in Gazebo and when visualized in rviz, there comes the error "no transform from [links] to [odom]" ref the image below

image description

The bizarre is the error doesn't occur when the fixed frame is set to any links. I have launched the empty world and spawned the robot in it. I have also launched robot_state_publisher and below is my launch file

 <param name="robot_description" textfile="$(find jmbot_description)/urdf/jmbot.urdf" />  
<!-- We resume the logic in empty_world.launch, changing only the name of the world to be launched -->
  <include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="world_name" value="$(find jmbot_gazebo)/worlds/"/>
    <!-- more default parameters can be changed here -->
<!-- Spawn a robot into Gazebo -->
<node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-file $(find jmbot_description)/urdf/jmbot.urdf -urdf -z 1 -model jmbot" />
   <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher"/>
edit retag flag offensive close merge delete


Have a look at your TF Tree, is there a connection from odom to the robot frames? Maybe you are just missing a static transform from odom to base_plate?

fsteinhardt gravatar image fsteinhardt  ( 2016-01-06 17:03:20 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2016-01-07 10:23:10 -0500

Kishore Kumar gravatar image

Thank you fsteinhardt, I figured it out besides your comment.

The problem is in urdf file, precisely in plug-in. In <robotBaseFrame>base_plate</robotBaseFrame> my original link Base_plate was misspelled as base_plate. So the transform was not published from my base_link which screwed the entire model because it is the parent link.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2016-01-06 11:18:38 -0500

Seen: 3,921 times

Last updated: Jan 07 '16