Ask Your Question
4

What are the units and coordinate conventions in ROS?

asked 2011-02-15 07:04:04 -0500

mwise gravatar image

updated 2014-01-28 17:09:07 -0500

ngrennan gravatar image

Has ROS agreed on a units standard?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
7

answered 2011-02-15 07:07:55 -0500

mmwise gravatar image

REP 103 outlines in detail the standard units of measure and coordinate conventions that are used in ROS.

edit flag offensive delete link more
7

answered 2011-02-15 08:47:45 -0500

Chad Rockey gravatar image

Melonee, as Melonee pointed out in REP 103, the units for ROS are mostly consistent with SI. The only exception being that celsuis is used for temperature instead of the kelvin base unit. However, unless you are performing absolute energy calculations, this is not likely to affect you.

The base coordinate frame in ROS follows the right hand rule and is essentially "engineering" frame as used by most mathematics and engineering professors I've encountered. This would be x-axis forward, y-axis left, and z-axis up.

Also, be aware that there are a few traps in this question with the coordinate frames. The first being that airplanes and other avionics love using the not-ROS compatible compass aligned coordinate frame. This frame is known for 0 degrees north, 90 degrees east, etc with x-axis north, y-axis east, and z-axis DOWN. While this is strange because altitudes above sea-level are now negative, heading is consistent with compass heading and positive pitch will pull you away from the ground. ROS coordinate frames provide for z-axis UP, so this resolves the altitude strangeness. However, heading now goes the opposite direction (consistent with the right-hand rule) and if you have positive pitch (about the y-axis), your plane will be heading into the ground! This is a tricky situation and one of the oldest coordinate frame battles between ground and aerial programmers. However, as long as you are careful and program your controls and your robots in ROS frame, all will work well.

The other main issue is that coordinate frames often don't follow magnetic or true north. While this is expected for the robot's internal coordinate frame and odometry frames, while being completely acceptable for map frames, there are differing opinions for globally aligned frames. Since compass heading doesn't match ROS heading, I have seen implementations that use 0 heading as north with pi/2 being west. However, others have had 0 heading being east with pi/2 being north. The good news is that so far no one has forced a choice, so you can use whatever you are most comfortable with. Just keep in mind that the rotation goes opposite that from a compass reading.

edit flag offensive delete link more

Comments

As far as a global (term used loosely here, in GPS terms, this is local) coordinate frame, it would probably be best to adopt something like ENU (east, north, up). This makes a plane tangent to the Earth's surface, and defines east as x, north as y, and up z.
mjcarroll gravatar imagemjcarroll ( 2011-02-15 10:12:49 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-02-15 07:04:04 -0500

Seen: 3,022 times

Last updated: Feb 15 '11