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

odom not aligned with base_link?

asked 2018-08-03 14:46:09 -0600

asabet gravatar image

When viewing my robot in rviz, the odom link seems not to be aligned with the rest of the robot https://imgur.com/a/4exMRIa . What could causing this?

edit retag flag offensive close merge delete

Comments

Why do you think odom should be lined up with the rest of the robot?

stevejp gravatar image stevejp  ( 2018-08-03 16:03:00 -0600 )edit

Doesn't odometry output the pose of the robot?

asabet gravatar image asabet  ( 2018-08-03 16:04:31 -0600 )edit

I think you have a little misconception between "odometry" and the "odom frame". Googling these terms should get you back on the right path :)

stevemacenski gravatar image stevemacenski  ( 2018-08-04 02:38:36 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-08-07 04:26:53 -0600

Tom Moore gravatar image

updated 2018-08-07 04:27:17 -0600

The odom frame is a "world-fixed" frame. The (0, 0) point in the odom frame is where your robot was when you started it. So if you turn your robot on, and drive 10 meters forward, then turn left 90 degrees, and then drive 5 meters, your robot's pose in the odom frame is (10, 5) with a yaw/heading of pi/2. The odom frame will not move, because it is "fixed" to the world, and not your robot. The base_link frame is fixed to your robot, so it will move as the robot moves. Note that your robot's pose in the odom frame is equivalent to the odom->base_link transform.

For more information on coordinate frames in ROS, see REP-105.

edit flag offensive delete link more

Comments

To be fair, localization packages like amcl will move the odom frame relative to your world based on scan data. So it's not completely fixed.

pcoenen gravatar image pcoenen  ( 2018-08-07 05:39:39 -0600 )edit
2

In the context of the question (the image lacks a map frame), it is fixed with respect to the robot's base. You could make the argument that the odom frame moves and the base frame remains fixed, but then I could make the argument that the map frame moves as the odom frame remains fixed.

Tom Moore gravatar image Tom Moore  ( 2018-08-07 06:20:03 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-08-03 14:46:09 -0600

Seen: 1,465 times

Last updated: Aug 07 '18