[REP Index] [REP Source]
REP: | 103 |
---|---|
Title: | Standard Units of Measure and Coordinate Conventions |
Author: | Tully Foote, Mike Purvis |
Status: | Active |
Type: | Informational |
Content-Type: | text/x-rst |
Created: | 07-Oct-2010 |
Post-History: | 31-Dec-2014 |
Contents
This REP provides a reference for the units and coordinate conventions used within ROS.
Inconsistency in units and conventions is a common source of integration issues for developers and can also lead to software bugs. It can also create unnecessary computation due to data conversion. This REP documents the standard conventions for ROS in order to lessen these issues.
The scope of potential robotics software is too broad to require all ROS software to follow the guidelines of this REP. However, choosing different conventions should be well justified and well documented.
For example, there are domains where the default conventions are not appropriate. Interstellar lengths are not appropriately measured in meters, and space-oriented libraries may wish to choose a different convention. There are other exceptions that different domains may wish to address.
We have chosen to standardize on SI units. These units are the most consistent international standard. SI units are maintained by Bureau International des Poids et Mesures. [1] There is good documentation on Wikipedia for International System Of Units [2]
These are the base units which are commonly used
Quantity | Unit |
---|---|
length | meter |
mass | kilogram |
time | second |
current | ampere |
SI defines seven base units and many derived units. If you are not using SI base units, you should use SI-derived units.
Good documentation can be found on Wikipedia about SI derived units [3]
Commonly used SI-derived units in ROS are:
Quantity | Unit |
---|---|
angle | radian |
frequency | hertz |
force | newton |
power | watt |
voltage | volt |
temperature | celsius |
magnetism | tesla |
All coordinate frames should follow these conventions.
All systems are right handed. This means they comply with the right hand rule [4].
In relation to a body the standard is:
For short-range Cartesian representations of geographic locations, use the east north up [5] (ENU) convention:
To avoid precision problems with large float32 values, it is recommended to choose a nearby origin such as your system's starting position.
In the case of cameras, there is often a second frame defined with a "_optical" suffix. This uses a slightly different convention:
For outdoor systems where it is desirable to work under the north east down [6] (NED) convention, define an appropriately transformed secondary frame with the "_ned" suffix:
There are many ways to represent rotations. The preferred order is listed below, along with rationale.
- Compact representation
- No singularities
- No singularities
- No ambiguity on order
- Used for angular velocities
- Euler angles are generally discouraged due to having 24 'valid' conventions with different domains using different conventions by default.
By the right hand rule, the yaw component of orientation increases as the child frame rotates counter-clockwise, and for geographic poses, yaw is zero when pointing east.
This requires special mention only because it differs from a traditional compass bearing, which is zero when pointing north and increments clockwise. Hardware drivers should make the appropriate transformations before publishing standard ROS messages.
Linear
float64[9] linear_acceleration_covariance # 3x3 row major matrix in x, y, z order
Angular
float64[9] angular_velocity_covariance # 3x3 row major matrix about x, y, z order with fixed axes
Six Dimensional
# Row-major representation of the 6x6 covariance matrix # The orientation parameters use a fixed-axis representation. # In order, the parameters are: # (x, y, z, rotation about X axis, rotation about Y axis, rotation about Z axis) float64[36] covariance
[1] | Bureau International des Poids et Mesures (http://www.bipm.org/en/home/) |
[2] | http://en.wikipedia.org/wiki/International_System_of_Units |
[3] | http://en.wikipedia.org/wiki/SI_derived_units |
[4] | http://en.wikipedia.org/wiki/Right-hand_rule |
[5] | http://en.wikipedia.org/wiki/Geodetic_datum#Local_east.2C_north.2C_up_.28ENU.29_coordinates |
[6] | http://en.wikipedia.org/wiki/North_east_down |
This document has been placed in the public domain.