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

Why /base_footprint's position is not (0,0,0) in /tf?

asked 2013-09-26 07:01:36 -0600

sam gravatar image

I echo /tf:

 - 
    header: 
      seq: 0
      stamp: 
        secs: 1310
        nsecs: 562000000
      frame_id: /base_footprint
    child_frame_id: /base_link
    transform: 
      translation: 
        x: 0.0
        y: 0.0
        z: 0.051
      rotation: 
        x: 0.0
        y: 0.0
        z: 0.0
        w: 1.0

But I found that in gazebo it shows (0,0,0).

image description

What's happened?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
4

answered 2013-09-26 22:43:52 -0600

dornhege gravatar image

Everything in tf is relative. There is no absolute position, so nothing is at 0,0,0.

TF only describes transformations between different frames. In your case base_footprint and base_link. The footprint is "on the ground" while the base_link is setup a little bit higher as the wheels make the robot a bit above the ground. That's the only thing that you see in the tf output.

As this is relative, if you'd move the robot in gazebo, the transform will also stay the same.

Of course gazebo has to have some global coordinate system, but that is independent of tf, unless you anchor a fixed frame at gazebo's world frame.

edit flag offensive delete link more

Comments

I understand 0.051 means the offset between base_footprint and base_link. Why gazebo don't use the same coordinate system like tf? Thank you~

sam gravatar image sam  ( 2013-09-27 03:06:02 -0600 )edit
1

TF sits on top of that, i.e. after gazebo. Gazebo just simulates a robot. tf information is computed from gazebo data in the same way it would be for a real robot. There is no tf coordinate system as all tf information is produced somewhere in the system (e.g. from gazebo).

dornhege gravatar image dornhege  ( 2013-09-27 04:55:08 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2013-09-26 07:01:36 -0600

Seen: 867 times

Last updated: Sep 26 '13