# specifying base_link frame for the Transformation tree

Hi all,

The base_link frame of my robot is 16 cm above the ground (or base_footprint frame) and laser frame is 8 cm above the base_link frame and I have specified all the transformations with respect to base_link frame. The origin is set to the map frame. Here is my TF tree:

Now my doubt is when I open RViz and see the robot_footprint with all the frames, base_link frame is on the ground and base_footprint is 16 cm below it, see the image:

This causes laser to be 8 cm above the ground instead of 24 cm (16 cm + 8 cm) in RViz. Shouldn't the base_footprint be on the ground and base_link frame 16 cm above it? Can anyone tell me what is wrong here and how can I correct it so that the base_footprint is on the ground and base_link frame is 16 cm above it or am I misinterpreting something?

Update: The odom_combined frame is also below the ground by 16 cm and is aligned with the base_footprint frame to start with:

Update 2: The output of rosrun tf tf_echo map odom_combined is :

At time 1435579139.606
- Translation: [2.414, 1.156, -0.160]
- Rotation: in Quaternion [-0.003, 0.015, 0.680, 0.733]
in RPY [0.016, 0.025, 1.496]
At time 1435579140.606
- Translation: [2.414, 1.156, -0.160]
- Rotation: in Quaternion [-0.003, 0.015, 0.680, 0.733]
in RPY [0.016, 0.025, 1.496]


Naman Kumar

edit retag close merge delete

1

There might be a problem with map->odom_combined tf. What is the output of rosrun tf tf_echo map odom_combined?

( 2015-06-27 19:40:50 -0500 )edit

Thanks for the reply. I have updated my original question. Please have a look. TIA

( 2015-06-29 06:59:53 -0500 )edit
1

So, 16 cm of difference in Z-direction is caused by that tf. map->odom_combined is provided by amcl node. I'm not experienced enough to pinpoint the error by looking at this information. I suspect there is something wrong with your amcl parameters. Maybe you should share your launch file too.

( 2015-06-29 07:23:46 -0500 )edit

Sort by » oldest newest most voted

So, I figured out the problem. The base_frame_id in the amcl launch file should be base_footprint and not base_link. In my amcl.launch file, I changed <param name="base_frame_id" value="base_link"/> to <param name="base_frame_id" value="base_footprint"/> and now the transformations look correct. Thanks a lot to @yigit for helping me out.

more

Sure. I'm glad I could help.

( 2015-06-29 08:11:25 -0500 )edit

Well, I guess this is only a visualization issue.

In rviz, you can set the fixed_frame (i.e. the origin) to any frame you want. I guess you have set it to base_link. Try setting it to base_footprint or map to achieve the desired result.

more

Thanks for the reply. But I have set the origin to map.

( 2015-06-26 06:49:28 -0500 )edit