|Title:||Standard Units of Measure and Coordinate Conventions|
|Author:||Tully Foote, Mike Purvis|
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.  There is good documentation on Wikipedia for International System Of Units 
These are the base units which are commonly used
SI defines seven base units and many derived units. If you are not using SI base units, you should use SI-derived units.
Commonly used SI-derived units in ROS are:
All coordinate frames should follow these conventions.
In relation to a body the standard is:
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:
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.
float64 linear_acceleration_covariance # 3x3 row major matrix in x, y, z order
float64 angular_velocity_covariance # 3x3 row major matrix about x, y, z order with fixed axes
# 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 covariance
|||Bureau International des Poids et Mesures (http://www.bipm.org/en/home/)|
This document has been placed in the public domain.