explainer
Nonholonomic constraints: move sideways without sliding
Derive a wheeled robot’s no-sideways-slip constraint and trace a feasible maneuver that changes its lateral position. Separate instantaneous velocity limits from reachable poses, and see why the motion rules depend on the robot.
What you will learn
- Calculate the body-lateral component of a world-frame velocity.
- Derive the no-sideways-slip equation for an ideal unicycle model.
- Trace four feasible motions and calculate their net displacement.
- Explain why two instantaneous controls can reach a three-dimensional set of poses.
- Distinguish reversible unicycle maneuvers from a forward-only car's allowed motion.
Before you start
A wheeled robot can change its sideways position even when its wheels cannot slide sideways. Turning changes which direction counts as forward. A sequence of allowed motions can therefore reach a pose that one direct slide cannot.
This is the useful distinction behind a nonholonomic constraint: it restricts instantaneous motion without reducing the reachable configurations in the same way as a fixed position constraint.
Specify the wheeled-robot model
Represent the robot pose by q = (x, y, θ). The point (x, y) is the midpoint between its driving wheels. World x points right, world y points up, and θ measures heading counterclockwise from +x.
Use an ideal reversible unicycle model with two independent commands:
- v: signed forward speed in meters per second. Negative v drives backward.
- ω: signed yaw rate in radians per second. Positive ω turns counterclockwise.
Its kinematics are:
ẋ = v cos θ
ẏ = v sin θ
θ̇ = ω
An ideal differential drive can produce these commands by setting its two wheel speeds. The model assumes rolling without lateral slip, and it allows turns in place. The experiment omits wheel acceleration, traction limits, and obstacles.
Write the no-sideways-slip equation
The robot's forward unit direction is f = (cos θ, sin θ). Its leftward unit direction is n = (−sin θ, cos θ). These directions rotate with the robot.
Take the dot product of n with the world velocity (ẋ, ẏ). The result is the velocity component sideways across the wheels:
r_lat = −sin θ ẋ + cos θ ẏ
r_lat = 0
Substituting ẋ = v cos θ and ẏ = v sin θ makes the two terms cancel. Forward motion, reverse motion, and a turn in place all satisfy the equation.
At θ = 0, it reduces to ẏ = 0. A requested world velocity (0, 1) m/s gives residual 1 m/s and violates the model. At θ = 90°, the constraint becomes ẋ = 0, so motion along world y is now allowed.
Modern Robotics derives this rolling constraint. Its sign convention can differ by an overall minus sign; the zero-velocity condition stays the same.
Separate current velocity from reachable position
At a fixed pose, the commands span two instantaneous directions: translation along the heading and rotation. An arbitrary three-component pose velocity can include a sideways component those commands cannot produce.
That does not trap the robot on the line it currently faces. It can turn, drive, and turn again. On an unobstructed plane, this reversible model can reach any target position and heading through such sequences.
For example, start at (0, 0, 0), turn 90°, drive 1 m, and turn back. The final pose is (0, 1, 0). The robot never slid sideways relative to its own heading.
Configuration space describes possible poses. A velocity constraint describes permitted directions through that space at each instant. Reachability also depends on available space, allowed controls, and how long the robot may move.
Omnidirectional drives use passive wheel rollers to allow lateral motion. A suitable wheel layout can then control forward velocity, sideways velocity, and yaw at the same pose, within its wheel-speed limits.
Distinguish a velocity equation from nonholonomy
Writing a constraint in terms of velocity does not by itself make it nonholonomic. A fixed position constraint can also produce a velocity equation when differentiated.
A point confined to a circle obeys x² + y² = R². Differentiating gives 2xẋ + 2yẏ = 0. This velocity condition comes from a position condition; the circle is a holonomic constraint.
The wheeled robot's no-slip condition depends on heading and cannot reduce to an equivalent fixed surface of admissible poses. Its allowed velocity directions change in a way that lets sequences reach new directions. Such a nonintegrable velocity constraint is nonholonomic.
In matrix form, the rolling equation is a Pfaffian constraint:
A(q)q̇ = 0
A(q) = [−sin θ, cos θ, 0]
“Pfaffian” describes this linear-in-velocity form. Both holonomic and nonholonomic constraints can have that form. LaValle defines nonholonomy through failure of integrability.
Compose four feasible motions
A small four-part maneuver exposes how motion order creates a net displacement. Begin at (0, 0, 0), choose turn angle ε and translation distance d, then:
- Turn in place by ε.
- Drive forward by d at the new heading.
- Turn in place by −ε, restoring heading zero.
- Drive backward by d.
After the first translation, the position is (d cos ε, d sin ε). Turning back changes only heading. Reversing at heading zero subtracts d from x, giving:
x_final = d(cos ε − 1)
y_final = d sin ε
θ_final = 0
The maneuver creates lateral displacement and also a longitudinal offset. For a nonzero angle in this experiment, x_final is negative. It therefore does not produce a perfectly sideways translation by itself.
Each phase lasts one second in the widget. Its commands are (v, ω) = (0, ε), (d, 0), (0, −ε), and (−d, 0), using radians and seconds. The center travels 2d meters; the turns contribute rotation but no center distance.
Calculate the 30-degree example
Set ε = 30° = π/6 rad and d = 1 m. The forward leg reaches (√3/2, 1/2) m. After turning back and reversing, the final pose is:
q_final = (√3/2 − 1, 1/2, 0)
q_final ≈ (−0.133975 m, 0.500000 m, 0°)
At t = 1.5 s, the robot is halfway through the forward leg. Its pose is (0.433013 m, 0.250000 m, 30°). Its world velocity is (0.866025, 0.500000) m/s, with zero lateral residual because that velocity aligns with its heading.
Now compare a straight translation between the same start and final position over four seconds while holding θ = 0. That path needs constant velocity approximately (−0.033494, 0.125000) m/s. Its lateral residual is 0.125000 m/s, so it violates the no-slip condition despite reaching the same endpoint pose.
The feasible maneuver and the forbidden straight path answer different motion checks. Endpoints alone do not describe whether a robot can follow the path between them.
Inspect the pose and velocity through time
The initial view pauses halfway through the forward leg. Move the time slider through each phase. During the turns, the heading arrow rotates while the center holds its position.
Choose Turn 90° and finish the maneuver. It ends at (−1, 1) m with heading zero. Mirror the maneuver changes the sign of y while keeping the same negative x offset. No turn drives forward and then backward along the same line, returning to the start.
Changing d scales both translations and the final displacement. Changing ε rotates the forward leg and changes the lateral effect. The direct comparison always uses the same final x and y, so its dashed line also changes with those controls.
At exact phase boundaries, the readouts show the next command. At four seconds, they show zero speed and zero yaw rate. The ideal control switches need smoothing and physical checks before a real robot could execute them.
See why the order of motions matters
Turn then drive, and the translation follows the new heading. Drive then turn, and it follows the old heading. The two operations do not commute.
Write the two available vector fields in pose coordinates:
F(q) = (cos θ, sin θ, 0)
G(q) = (0, 0, 1)
q̇ = vF(q) + ωG(q)
A Lie bracket describes the leading net effect of short motion sequences. With the convention [G, F] = DF·G − DG·F, differentiation gives:
[G, F](q) = (−sin θ, cos θ, 0)
[G, F](0, 0, 0) = (0, 1, 0)
This extra direction points sideways. It is outside the span of F and G at that pose. LaValle derives the differential-drive bracket; reversing the field order reverses the sign.
For small ε in radians, our exact endpoint formula gives y_final ≈ dε and x_final ≈ −dε²/2. If both d and ε shrink by the same factor, the lateral effect shrinks quadratically and the x offset cubically. The bracket captures that small-sequence displacement; it does not grant an instantaneous sideways velocity.
For smooth constant-rank constraints, the Frobenius condition requires these brackets to stay in the allowed span for integrability. This bracket leaves that span, confirming that the rolling constraint is nonholonomic.
Match the maneuver to the robot
The same no-sideways-slip equation can appear in robots with different control limits. Our reversible unicycle permits v = 0 with nonzero ω, and it permits negative v. Both capabilities matter to this four-phase maneuver.
A forward-only car with a minimum turning radius cannot perform these turns in place or reverse legs. Its heading change must accompany forward travel. The Dubins-path lesson handles that bounded-curvature model. Ackermann steering derives the wheel angles and bicycle-model curvature behind a car-like turn.
A velocity-feasible center path also needs collision checks for the full body. The schematic robot marker has no physical footprint, and this experiment places no obstacles. Limited steering rates, traction, motor torque, and timing can further restrict a real maneuver.
Nonholonomy therefore explains one part of a motion model. Planning must also use the actual control bounds and environment.
Reproduce the maneuver in Python
This standard-library example integrates each constant command for one second. It uses the midpoint-heading form of the exact unicycle solution; sinc(0) = 1 also handles straight motion.
from math import cos, sin, radians, degrees
def step(pose, v, omega, duration):
x, y, theta = pose
half_turn = omega * duration / 2
sinc = 1.0 if half_turn == 0 else sin(half_turn) / half_turn
travel = v * duration * sinc
heading = theta + half_turn
return (x + travel * cos(heading),
y + travel * sin(heading),
theta + omega * duration)
def maneuver(angle_degrees, distance):
epsilon = radians(angle_degrees)
controls = [(0, epsilon), (distance, 0), (0, -epsilon), (-distance, 0)]
pose = (0.0, 0.0, 0.0)
largest_residual = 0.0
for v, omega in controls:
for sample in range(11):
current = step(pose, v, omega, sample / 10)
theta = current[2]
vx, vy = v * cos(theta), v * sin(theta)
residual = -sin(theta) * vx + cos(theta) * vy
largest_residual = max(largest_residual, abs(residual))
pose = step(pose, v, omega, 1.0)
return pose, largest_residual
def fmt(value):
return f"{0.0 if abs(value) < 0.5e-6 else value:.6f}"
for angle in (30, 90, -30, 0):
pose, residual = maneuver(angle, 1.0)
x, y, theta = pose
print(f"angle={angle}: final=({fmt(x)}, {fmt(y)}, {fmt(degrees(theta))} deg); "
f"max lateral residual={fmt(residual)} m/s; "
f"direct residual={fmt(y / 4)} m/s")
Expected output:
angle=30: final=(-0.133975, 0.500000, 0.000000 deg); max lateral residual=0.000000 m/s; direct residual=0.125000 m/s
angle=90: final=(-1.000000, 1.000000, 0.000000 deg); max lateral residual=0.000000 m/s; direct residual=0.250000 m/s
angle=-30: final=(-0.133975, -0.500000, 0.000000 deg); max lateral residual=0.000000 m/s; direct residual=-0.125000 m/s
angle=0: final=(0.000000, 0.000000, 0.000000 deg); max lateral residual=0.000000 m/s; direct residual=0.000000 m/s
The sample loop checks numerical evaluations of the residual. The algebraic cancellation in the kinematic equations establishes the constraint throughout each phase. At command switches, the one-sided velocities both satisfy it.
Try it yourself
1. Finish a pure sideways move. The 30° maneuver with d = 1 m ends at (−0.133975, 0.5, 0). Add one forward translation at heading zero to end at (0, 0.5, 0). How far must it travel, and does that correction satisfy the lateral constraint?
Show the correction calculation
Drive forward by 1 − cos 30° ≈ 0.133975 m. That cancels the negative x offset and leaves y unchanged. At heading zero, the correction has ẏ = 0, so its lateral residual is zero.
The complete center travel becomes approximately 2.133975 m. This construction reaches the pure lateral target through feasible motions; it makes no shortest-distance or minimum-time claim.
2. Check a velocity at a rotated heading. At θ = 90°, evaluate the lateral residual for world velocities (1, 0) m/s and (0, −2) m/s. Which can this reversible unicycle produce, and what forward command would it use?
Show the rotated-velocity check
At θ = 90°, sin θ = 1 and cos θ = 0, so the residual is −ẋ. The velocity (1, 0) gives residual −1 m/s and violates the constraint.
The velocity (0, −2) gives zero residual and comes from v = −2 m/s at that heading. With ω = 0, the robot reverses along world −y while maintaining its orientation.
Sources and further study
- Kevin Lynch and Frank Park, Modern Robotics: Configuration and Velocity Constraints. Holonomic constraints, rolling constraints, and the Pfaffian form.
- Steven LaValle, Planning Algorithms: Completely integrable or nonholonomic?. The definition of nonholonomy used here.
- Steven LaValle: Lie brackets. Motion order and the lateral effect in a differential-drive model.
- Steven LaValle: The Frobenius Theorem. The smooth, constant-rank integrability condition.
Continue with differential-drive kinematics to translate these commands into wheel motion, or Dubins paths to change the model to a forward-only car.