0
$\begingroup$

Rosanswers logo

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:

image description

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:

image description

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:

image description

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]
 

Thanks in advance.
Naman Kumar


Originally posted by Naman on ROS Answers with karma: 1464 on 2015-06-25

Post score: 1


Original comments

Comment by yigit on 2015-06-27:
There might be a problem with map->odom_combined tf. What is the output of rosrun tf tf_echo map odom_combined?

Comment by Naman on 2015-06-29:
Thanks for the reply. I have updated my original question. Please have a look. TIA

Comment by yigit on 2015-06-29:
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.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by Naman with karma: 1464 on 2015-06-29

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by yigit on 2015-06-29:
Sure. I'm glad I could help.

$\endgroup$

Your Answer

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