Rosanswers logo

Hi, I have pretty poor wheel odometry, so I want to supplement it with data from the Canonical Scan Matcher. I've got the scan matcher working well in its own right, but am having trouble fusing the two data sources.

I'm already publishing a /odom frame from odometry. I'm going to feed this into ~odometry_type in the scan matcher. The problem is the scan matcher documentation says

~publish_tf (bool, default: true)

whether to publish scan matcher's estimation for the position of the base frame in the world frame as a transform. Disable this if some other node is already publishing an odometric estimation.

If I diosable this I won't be able to get TF data out of the scan matcher, but I'm already publishing odometry data. What do I do? Many thanks for any advice.

Perhaps I was unclear above - my issue is that I need to publish a transform from /odom to /base_link to feed into the canonical scan matcher. But then I also want the scan matcher to publish a transform (from /world to /base_link) but that would involve two parent nodes which ROS does not support. Does anyone know the solution?

Originally posted by splasho on ROS Answers with karma: 45 on 2011-06-14

Post score: 0


1 Answer 1


Rosanswers logo

We've used two different approaches to this problem:

  1. Invert the transform from odom to base_link, so that base_link is the parent of odom. Your tf tree would be: world->base_link, base_link->odom, base_link->rest of robot. So the odom frame becomes a sidebranch of the tf tree

  2. Pub the odom frame in between base_link and world. Your tf tree would be: world->odom, odom->base_link, base_link->rest of robot. This is the approach we used on the PR2 when putting both odometry and localization in the same tf tree. To accomplish this, you need to convert the output of scan matching (world to base_link) into a new transform (world to odom) by deducting the odom to base_link transform. So scan matching would not publish world to base_link, but world to odom.

Originally posted by Wim with karma: 2915 on 2011-06-15

This answer was ACCEPTED on the original site

Post score: 1

Original comments

Comment by splasho on 2011-06-15:
Thank you for the detailed answer! Very helpful.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.