Skip to content

ROS 2Units, Frames and Simulation

Units and Axes: REP 103

ROS uses SI units (meters, seconds, radians) and right-handed frames: x forward, y left, z up.

Not started Jump to practice

When many people write nodes for one robot, they must agree on units and directions. ROS has written agreements called REPs; REP 103 sets units and axes.

Key idea

REP 103: use SI units: meters, seconds, kilograms, radians (and m/s, rad/s). Frames are right-handed. On a robot's body: $x$ forward, $y$ left, $z$ up. Positive rotation about $z$ is counterclockwise seen from above, so a positive turn is to the left.
The robot's body frame: $x$ forward, $y$ to its left.

Why it works

A node that publishes centimeters or degrees, while every other node expects meters and radians, gives answers off by a factor of 100 or 57. Agreeing once, in writing, avoids a whole family of bugs.

Worked example: Convert

A heading of 45Β° in a ROS 2 message?
  1. $45 \times \pi/180 \approx 0.785$.

Answer: About 0.785 rad.

Common mistake

Publishing degrees or centimeters where every other node expects radians and meters.

Practice

Pass with 3 right answers, the last 2 in a row. Each right answer earns 2 XP.

Loading practice…

Builds on

Leads to

Sources and further reading