LESSON 08 · MOTION

Turn wheel speeds into robot motion

Calculate straight motion and turning in an ideal differential-drive model.

Environment and verification

Documented target: Ubuntu 24.04 · ROS 2 Jazzy · Gazebo Harmonic where used. Browser labs tested; ROS/Ubuntu/hardware execution not performed here.

What you will understand

  • Compute forward/yaw velocity.
  • Explain straight and turning cases.
  • Recognize slip assumptions.

Prerequisites: Configure, launch and diagnose a system and its stated environment.

The idea, made clear.

For wheel radius r, separation L and angular speeds ωL and ωR, forward speed is v = r(ωL + ωR)/2 and yaw rate is ω = r(ωR − ωL)/L. Equal speeds give straight travel. Opposite speeds rotate around the centre. These are kinematic equations, not a motor torque model.

The model assumes rolling without lateral slip. Soft tyres, uneven floors and skid steering break this assumption. Wheel odometry estimates motion; it does not prove where a robot went. Measure geometry separately from controller tuning.

Use metres, seconds and radians. Positive planar yaw is counterclockwise in a right-handed frame. A small fixed integration step limits numerical error. In the browser lab, the pose is calculated from wheel inputs; it is not received from hardware.

Wheel speedsGeometry r + LVelocity v + ωIntegrated pose
An original overview of the information or commissioning sequence.

Try it, step by step.

1

Calculate a straight command

Run in Python.

motion-and-kinematics-1.txt
r = 0.05
L = 0.30
left = right = 4.0
v = r * (left + right) / 2
w = r * (right - left) / L
print(v, w)

Expected: 0.2 m/s and 0 rad/s.

2

Explore a turn

Set left to 2 and right to 4 rad/s in the lab.

Expected: 0.15 m/s and about 0.333 rad/s.

3

Compare measurements

On hardware, only after safe commissioning, compare a measured path with the model.

Expected: Explicit calibration evidence; no physical test is claimed here.

Explore the interactive lab →

If something goes wrong

Turn sign reversed
Check labels, motor polarity and sign conventions.
Distance drifts
Review radius, encoder scale and slip before increasing gains.

Check your understanding

Equal wheel speeds produce what?

Make it yours

Calculate a circle radius v/ω and compare with the lab.

Your learning progress

Optional progress stays in this browser. No account needed.

Go to the source documentation

Commands are educational examples for the stated environment, not a transcript of local ROS execution. Verify actual behavior on your machine.

Look up a term · Version notes · Report an issue