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

Revision history [back]

click to hide/show revision 1
initial version

The configuration that most people with a lidar start with has a Transform Tree that looks like this:

map -> odom -> base_link -> scan
  • map->odom TF is generated by amcl using map + scan input.
  • odom->base_link TF is generated by odometry using wheel_encoder input.
  • base_link->scan TF is a static (fixed) transform.
  • the base_link x,y pose must be at the center-of-rotation for the robot (i.e. midway between the drive wheels for differential drive).

You should really try to debug why your encoder odometry is bad. As long as your wheels are not slipping on the ground, the output should be pretty accurate over a few meters/turns. If you see a lot of drift, I expect that you probably have an odometry calculation error (a lot of people get the plus/minus sign for the axel direction of rotation wrong.)

Using my TF names from above, amcl's odom_frame_id is "odom" and base_frame_id is "base_link".

While I believe it is possible to use laser_scan_matcher to generate odometry, I've never tried to do that. Typically laser_scan_matcher would substitute for amcl and generate the map->odom TF (but laser_scan_matcher is less capable than amcl, so nobody does this without a real good reason.)