Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to create the odom --> base_link transform in gmapping

Hi

We are trying to run gmapping using ROS Indigo on Ubuntu 14.04 . The problem we are encountering is that the transform between "odom" and "base frame" is not created correctly. Even though we think it should exist since the transform is visible when echoing rostopic. Should the way we are launching gmapping work or is the problem that the robot is not publishing the transforms correctly? Also how do we create the transform between odom and base_link.

running:

rosrun rqt_tf_tree rqt_tf_tree

yields the following result:

link to tf_tree

As you can see the link between odom and base_link is missing

however when we run

rostopic echo cvc/tf

The transform between odom and base_link is visible

transforms: 
  - 
    header: 
      seq: 0
      stamp: 
        secs: 1539863401
        nsecs: 756178000
      frame_id: odom
    child_frame_id: base_link
    transform: 
      translation: 
        <omitted to save space
      rotation: 
        <omitted to save space>

We are using the following launch file:

<launch>
  <param name="robot_description"
    textfile="/home/pd/vmc/Thesis_tools/SLAM_launch/gmapping/charm.urdf" /> 

  <node name="robot_state_publisher" pkg="robot_state_publisher"
    type="robot_state_publisher" /> 

  <node pkg="tf" type="static_transform_publisher" name="base_laser" args="0.23 0 0 0 0 0 1 base_link laser_frame 100" />

  <node name="gmapper" pkg="gmapping" type="slam_gmapping" args=""  output="screen">
    <param name="scan_frame" value="cvc/scan"/>
    <param name="odom_frame" value="odom"/>
    <param name="base_frame" value="base_link"/>
    <param name="map_frame" value="map"/>
  </node>

  <node name="rviz" pkg="rviz" type="rviz" required="true"
      args="-d gmapping.rviz" />

</launch>

Thanks in advance for any help.