[ros-users] Coordinate frames for robot vs world
Wim Meeussen
meeussen at willowgarage.com
Tue Apr 5 19:01:40 UTC 2011
Hitesh,
> From the wiki, the robot is using a front-x, left-y coordinate convention.
> In rviz upon start, my robot faces in the front direction as the laser scan
> data is towards the forward direction. But when I give a goal, for example x
> = 1, y = 0 to frame base_link using simple_navigation_goals, which means it
> should move forward 1m, it is displayed 1m to the right of the robot on the
> odom (world) frame in rviz. In order to move the robot 1m forward, I have to
> give a y = 1, x = 0 goal. It seems the odom frame is following a x-right,
> y-front coordinate system.
> Is there a 90 degrees rotation between the two frames? This means that all
> velocities and distances reported by odometry have to be rotated 90 degrees
> clockwise? Or am I doing something wrong?
The odom frame is attached to the world. So as the robot drives
around, it is going to be in a different position/orientation relative
to the odom frame. On startup it just happens to be that the robot is
turned 90 degrees relative to the odom frame, but this angle will
change as the robot moves around.
The navigation goals you send to the robot are specified in the odom
frame. So you tell the robot where to go in absolute world
coordinates. It sounds like you want to command the robot in relative
coordinates (move 1 meter forward from where ever the robot is right
now). To do that, you have to convert the relative goals in absolute
coordinates. Tf can help you do this.
Hope this helps,
Wim
--
--
Wim Meeussen
Willow Garage Inc.
<http://www.willowgarage.com)
More information about the ros-users
mailing list