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

offset between base_link and base_footprint

asked 2015-07-28 01:07:51 -0500

osmancns gravatar image

hello friends. I am using laser_scan_matcher and robot_pose_ekf. everything is good. But there is a offset always between base_link and base_footprint in rviz display. you think is that normal or is there a problem ??

this my rviz diplay: http://i.imgur.com/SoIrtIu.png

this is my tf trees: http://i.imgur.com/Pknej0f.png

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2015-07-28 01:38:09 -0500

mgruhler gravatar image

updated 2015-07-28 06:04:16 -0500

Well, you do have two different tf tree branches (if this is the name for it), where the one with base_footprint is fed from slam_gmapping and the one with base_link is fed from the scan_matcher. Thus, you have two different sources of a global pose.

So as long as those two do not provide the exact same transform (which is very unlikely given the probabilistic nature of the algorithms), this can obviously happen. The way you set up your tf tree looks as if you had two different robots, and not just one.


EDIT: To shed some more light on this.

@osmancns: Yes, your problem is normal. Especially when moving the lidar with your hands. But this will not make a difference if the sensor is mounted on a robot. You do have two algorithms estimating the same position from the same sensor within the world coordinate system.

However, the algorithms are not perfect, neither is the sensor data, so there will be a drift in between the estimated poses.

And because your tf tree is set up to have two distinct branches, this is more or less something like having two robots/sensors.

In general, it makes no sense to set the robot up the way you have. If you want to have more information you would also need to share how you set up your tf tree, i.e. do you have a urdf? Another model? No model at all? And the source code (i.e. the launch and config files, as well as any custom ros nodes) would here be helpful too.

@nightblue: tf is transformation library of ROS. check out the documentation on the ROS wiki by clicking HERE. A tf tree has absolutely _nothing_ to do with OO diagrams. With tf you specify the transformation from one coordinate system to another. And due to the nature of this, this can only be a tree.

An example given the figure linked above: You have the coordinate system (also called frame) map at the very top of you tree. From there, the ROS node slam_gmapping estimates the position and orientation (also called Pose) and represents this through a transform chain, which is in this example map --> odom_combined --> base_footprint. Usually, (and this is where we probably deviate from the figure) a sensor is mounted fixed on a robot, so the transformation from base_footprint to laser is usually "hardcoded" in urdf.

Please check out the documentation on tf in detail and try to understand how transformations are represented.

edit flag offensive delete link more

Comments

thank you @mig. I have only one robot. I have two frame as laser and laser2 but these frames fed from only one lidar ( I remap scan data -> /scan and /scan2 no problem). But ı cant understand that ı have one lidar and one robot but why there is a offset this frames ?

osmancns gravatar image osmancns  ( 2015-07-28 02:00:31 -0500 )edit

and which one is my real robot ( base_link or base_footprint)

osmancns gravatar image osmancns  ( 2015-07-28 02:01:31 -0500 )edit
1

Just to complement the answer, hector_slam tutorial page has a nice picture and explanation of typical coordinate frame setup.

Boris gravatar image Boris  ( 2015-07-28 02:09:58 -0500 )edit

Thank you @Boris. You think my problem is normal ??? And ı moved my lidar with my hands. so lidar moved at different heights. Not on a straight stabile line.

osmancns gravatar image osmancns  ( 2015-07-28 02:15:44 -0500 )edit

Hi @mig, you said base_footprint is fed from slam_gmapping and base_link is fed from scan_matcher. They are Ok. but why arrows are coming from up to down? so does base_footprint feds laser2 ??? sorry Im new to ROS, I'm good at OO diagrams but I can't understand ROS tf tree diagrams in no way :(

nightblue gravatar image nightblue  ( 2015-07-28 04:20:00 -0500 )edit

Thank you @mig

nightblue gravatar image nightblue  ( 2015-09-09 09:30:15 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2015-07-28 01:07:51 -0500

Seen: 1,755 times

Last updated: Jul 28 '15