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

hector_slam sporadic update error of /odom

asked 2012-11-07 02:46:19 -0600

tropic gravatar image

updated 2012-11-08 20:46:54 -0600


We use a non-holonomic wheeled platform with two SICK s300 laser scanners, and have recently tried to apply hector_slam instead of gmapping because gmapping uses almost 100% cpu and hector_slam uses close to 0%. We run Fuerte and Ubuntu 12.04 LTS. The software is running on one computer on the platform.

However, we have one problem with hector_slam and that is sporadic updates of the odometry.

We have made a launch file with the following

<?xml version="1.0"?>
  <node pkg="hector_mapping" type="hector_mapping" name="hector_mapping" output="screen">
        <!-- Frame names -->
        <param name="map_frame" value="/map" />
        <param name="base_frame" value="/base_link" />
        <param name="odom_frame" value"/odom" />
        <param name="scan_topic" value="/scan_unified/scan"/>
        <!-- Tf use -->
        <param name="pub_map_odom_transform" value="true"/>

When we run the mapping the map updates and builds fine in rviz when moving linearly, but when we start to rotate the robot the scans and map do not align anymore. When looking at the odometry in rviz, it continuously goes between an error and OK. The error we receive is

For frame [odom]: No transform to fixed frame [/map]. TF error: [unable to lookup transform, cache is empty, when looking up transform from frame [/odom] to frame [/map]]

Anyone got an idea to why we receive this sporadic error of the odometry, it shifts between the error and OK every second, sometimes faster, sometimes slower?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2012-11-08 04:05:27 -0600

This sounds like a problem with the robot setup and shouldn't be specific to hector_mapping. If you have different computers contributing to tf, this could be a problem with non-synchronized clocks between computers.

edit flag offensive delete link more


Hi Stefan. We recently moved the whole setup to run on just one computer, so this should not be the problem. What I find weird is that we have no problems with our gmapping setup, and as I understand we should be able to use hector_slam more or less 1:1, right?

tropic gravatar image tropic  ( 2012-11-08 20:39:16 -0600 )edit

Probably you already did this, but did you check e.g. via rosrun tf view_frames if theres nothing else besides hector_mapping publishing the map->odom transform?

jodafo gravatar image jodafo  ( 2012-11-12 01:54:15 -0600 )edit

Question Tools


Asked: 2012-11-07 02:46:19 -0600

Seen: 361 times

Last updated: Nov 08 '12