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

specifying base_link frame for the Transformation tree

asked 2015-06-25 12:39:03 -0600

Naman gravatar image

updated 2015-06-29 07:01:13 -0600

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

edit retag flag offensive close merge delete

Comments

1

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

yigit gravatar image yigit  ( 2015-06-27 19:40:50 -0600 )edit

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

Naman gravatar image Naman  ( 2015-06-29 06:59:53 -0600 )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.

yigit gravatar image yigit  ( 2015-06-29 07:23:46 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2015-06-29 07:38:25 -0600

Naman gravatar image

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.

edit flag offensive delete link more

Comments

Sure. I'm glad I could help.

yigit gravatar image yigit  ( 2015-06-29 08:11:25 -0600 )edit
0

answered 2015-06-26 01:03:04 -0600

mgruhler gravatar image

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.

edit flag offensive delete link more

Comments

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

Naman gravatar image Naman  ( 2015-06-26 06:49:28 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-06-25 12:39:03 -0600

Seen: 1,244 times

Last updated: Jun 29 '15