Ask Your Question
1

No transform from links to odom in rviz

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

Kishore Kumar gravatar image

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

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

<gazebo>
<plugin name="differential_drive_controller"
    filename="libgazebo_ros_diff_drive.so">
    <leftJoint>Wheel_L</leftJoint>  
    <rightJoint>Wheel_R</rightJoint>
    <robotBaseFrame>base_plate</robotBaseFrame>
    <wheelSeparation>0.235</wheelSeparation>
    <wheelDiameter>0.12</wheelDiameter>
    <publishWheelJointState>true</publishWheelJointState>
    </plugin>
<plugin name="joint_state_publisher"
    filename="libgazebo_ros_joint_state_publisher.so">
    <jointName>Castor_F, Castor_R</jointName>
    </plugin>       
</gazebo>

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

<launch>
 <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/jmbot.world"/>
    <!-- more default parameters can be changed here -->
  </include>
<!-- 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"/>
</launch>
edit retag flag offensive close merge delete

Comments

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 imagefsteinhardt ( 2016-01-06 17:03:20 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

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

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

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

Seen: 1,983 times

Last updated: Jan 07 '16