Degrees of freedom (DOF)
Degrees of freedom (DOF) – definition
Degrees of freedom (DOF) describe the number of independent variables required to define the state or motion of a mechanical body. In mobile robotics, DOF usually refers to how many independent translational and rotational motions a robot can perform or how many coordinates are needed to describe its pose. For an unmanned ground vehicle (UGV), the most common reference frame is a rigid body moving in 3D space, which has 6 DOF: translation along x, y, z and rotation around x, y, z. In robotics notation, these are often called surge, sway, heave, roll, pitch, and yaw.
For practical UGV operation, not all 6 DOF are controllable. A wheeled rover moving on terrain is physically embedded in 3D space, but its drive system constrains motion. A differential-drive platform such as Leo Rover is typically controlled in planar motion with 3 DOF in pose representation: x, y, and yaw. It cannot directly command sideways motion, so sway is not an actuated DOF. This distinction matters: pose DOF, actuated DOF, and estimated DOF are not the same thing.
In ROS and ROS 2, DOF appears in message semantics, transform trees, odometry, sensor fusion, and motion models. For example, geometry_msgs/Twist contains 6 velocity components, but a differential-drive rover normally uses only linear.x and angular.z. The rest may remain zero by kinematic constraint.
DOF in mobile robotics and UGV kinematics
In ground robots, DOF must be interpreted through the vehicle model. A rover can exist in full 6D pose, while its controller and planner often operate in a reduced state space. This is standard in 2D navigation stacks used with ROS 2 Nav2.
The most common cases are listed below.
| Concept | Typical DOF | Meaning in UGV context |
|---|---|---|
| Rigid-body pose in space | 6 | x, y, z, roll, pitch, yaw |
| Planar pose | 3 | x, y, yaw on approximately flat ground |
| Differential-drive command space | 2 | forward velocity and yaw rate |
| Wheel encoder state | 2 | left and right wheel motion inputs |
For nonholonomic rovers, the key issue is constraint. A differential-drive platform cannot instantaneously move in any direction in the plane. Its controllable motion is lower than the apparent dimensionality of the plane. This is why DOF is often discussed together with mobility, controllability, and kinematic constraints.
A common planar state vector is:
q = [x, y, θ]^T
For a differential-drive rover, a standard kinematic model is:
x_dot = v cos(θ)
y_dot = v sin(θ)
θ_dot = ω
where v is linear velocity and ω is angular velocity. This means the robot pose has 3 planar DOF, but the commanded motion is typically parameterized by 2 independent inputs.
How DOF is represented in ROS 2
ROS 2 does not define DOF as a standalone primitive. Instead, DOF is expressed through coordinate frames, message fields, and the assumptions of a controller or estimator. The frame conventions are documented in REP 103 for standard units and coordinate conventions, and REP 105 for mobile platform coordinate frames such as base_link, odom, and map.
Several ROS interfaces expose 6D motion even when the robot uses fewer effective DOF.
geometry_msgs/Pose– 3D position plus quaternion orientationgeometry_msgs/Twist– linear and angular velocity in 3 axes eachnav_msgs/Odometry– pose and twist with covariancesensor_msgs/Imu– angular velocity, linear acceleration, and orientationtf2transforms – full 6D relations between frames
For a planar UGV, many pipelines use a 6D message type but constrain selected variables in configuration. In robot_localization, for example, fusion can be run in two_d_mode, which projects the estimated state to planar motion and suppresses z, roll, and pitch drift for robots intended to navigate on near-flat terrain.
ekf_filter_node:
ros__parameters:
two_d_mode: true
publish_tf: true
map_frame: map
odom_frame: odom
base_link_frame: base_link
This does not mean the robot physically loses 6D existence. It means the estimator is configured to use a 3-DOF navigation assumption.
DOF on Leo Rover and Raph Rover
For Fictionlab platforms, DOF should be interpreted from the drive architecture and deployment context. Leo Rover is a 4-wheel, skid-steer mobile platform with ROS 2 support and a Raspberry Pi based compute unit. In navigation tasks, it is usually modeled as a planar nonholonomic rover.
In practice for Leo Rover:
- Pose used by Nav2 – usually 3 DOF: x, y, yaw
- Commanded base motion – 2 DOF: linear.x and angular.z
- Estimated body orientation from IMU – potentially 6D sensing, but often reduced for 2D navigation
- Terrain interaction – local roll and pitch exist physically, especially outdoors
Raph Rover is a larger platform intended for higher payload and more demanding field integration. The same base concepts apply, but the practical DOF picture is broader because added payloads may include 3D LiDAR, RTK GNSS, stereo depth, or mast-mounted sensors. The chassis is still a ground vehicle, so base locomotion is constrained, but the sensing and estimation stack may operate in full 6D for mapping or state estimation on uneven terrain.
This distinction is important in field robotics. A rover may navigate with a 2D planner while simultaneously estimating 6D pose for mapping, georeferencing, or sensor stabilization.
Key parameters and metrics related to DOF
When DOF is discussed in specifications or documentation, it should be tied to measurable system properties. The term is often used too loosely. For UGV work, the following parameters help remove ambiguity.
- Pose dimensionality – 2D or 3D state representation
- Actuated DOF – how many independent motions can be directly commanded
- Sensed DOF – how many dimensions are observable from the sensor suite
- Estimated DOF – how many state variables are solved by localization or SLAM
- Planning DOF – dimensions used by local and global planners
- Control topic semantics – for example
/cmd_velwith 6 fields, but only 2 used
Example ROS 2 inspection for a mobile base:
ros2 topic echo /cmd_vel
ros2 topic echo /odom
ros2 run tf2_tools view_frames
If /odom publishes full quaternion orientation and 6×6 covariance matrices for pose and twist, the interface is 6D-capable. Whether all dimensions are meaningful depends on the estimator, terrain, and sensors.
Common misunderstandings
DOF is frequently confused with wheel count, axle count, or the number of joints in a URDF. Those are related but not equivalent. Four wheels do not imply 4 DOF of chassis motion. Leo Rover has four wheels, but as a skid-steer UGV it is still typically commanded with 2 independent base inputs.
Another common mistake is assuming that if ROS messages are 6D, the robot is holonomic or fully actuated in 6 DOF. That is false. Message dimensionality is an interface choice. Physical mobility is determined by mechanics and contact constraints.
Normative references and standards
The interpretation of DOF in ROS-based mobile robotics is consistent with standard rigid-body mechanics and ROS frame conventions. For implementation work, the most relevant references are:
- REP 103 – Standard Units of Measure and Coordinate Conventions
- REP 105 – Coordinate Frames for Mobile Platforms
- ROS 2 message definitions for
geometry_msgs,nav_msgs,sensor_msgs robot_localizationdocumentation for planar and 3D state estimation- URDF documentation for describing joints and constrained motion in robot models
For Fictionlab deployments, the practical rule is simple: model the rover with the DOF that match the task. Use 3 DOF for standard indoor or outdoor planar navigation. Use 6D sensing and estimation when terrain, mapping accuracy, or payload integration requires it.