ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A answers.ros.org

Hector_mapping results in tf transformation error


#1

The hector mapping package is not finding the TF even though I have created a static reference TF. I keep getting the following error when I try to launch the training.launch file located in ~/hector_slam/launch. I modified the training.launch file in order to create my TF. The hector_slam package partially works but it does not publish the map_odom transformation so I have no way of knowing the relative location of my rover from the initial location. Can you please help?

The error is:

[ERROR] [1513111318.589547578, 1512355461.660118665]: Transform failed during publishing of map_odom transform: Lookup would require extrapolation into the future. Requested time 1512355460.650420421 but the latest data is at time 1512355460.113152033, when looking up transform from frame [base_link] to frame [nav]


#2

Was your error resolved?


#3

Hello,

I am trying to use tf in my code. My requirement is as below:

  • An image sensor is mounted at a location with IR, that is providing xyz coordinates for my target
  • I need to convert those coordinates from Sensor frame of reference to my ARM frame of reference.

One solution can be to use Matrix for conversion. I think this can also be used with tf.
Can you suggest some good source to understand the tf.

Saurabh


#4

To fix:

  1. sudo gedit /opt/ros/kinetic/share/hector_mapping/launch/mapping_default.launch
  2. change default value of odom_frame from nav to odom
  3. make sure you have static tf transforms from /map to /laser_frame; something likeā€¦
<node pkg="tf" type="static_transform_publisher" name="map_to_odom" 
      args="0.0 0.0 0.0 0 0 0.0 /map /odom 40" />
<node pkg="tf" type="static_transform_publisher" name="odom_to_basefootprint" 
      args="0.0 0.0 0.0 0 0 0.0 /odom /base_footprint 40" />
<node pkg="tf" type="static_transform_publisher" name="base_footprint_to_base_link" 
      args="0.0 0.0 0.0 0 0 0.0 /base_footprint /base_link 40" />
<node pkg="tf" type="static_transform_publisher" name="base_link_to_laser" 
      args="0.2245 0.0 0.2 0.0 0.0 0.0 /base_link /laser_frame 40" />