Ask Your Question

Canonical scan matcher with hints - TF conflict?

asked 2011-06-14 00:31:06 -0500

splasho gravatar image

updated 2011-06-15 03:49:38 -0500

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2011-06-15 04:14:03 -0500

Wim gravatar image

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.

edit flag offensive delete link more


Thank you for the detailed answer! Very helpful.
splasho gravatar image splasho  ( 2011-06-15 13:26:26 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2011-06-14 00:31:06 -0500

Seen: 309 times

Last updated: Jun 15 '11