ProjekinAja. Robotics Stage 2 · Kinematics Lesson 2.1
● Stage 2 · Lesson 2.1

Differential Drive Kinematics: FollowBot's Motion Model

The differential-drive model is elegant in theory and wrong in practice — knowing exactly how and why it fails is half of mobile robot control.

⏱ ~22 min read 🔢 Math + code 🤖 FollowBot milestone

🎯 By the end you'll understand

The unicycle abstraction and why it's the right starting model. The Instantaneous Center of Curvature (ICC) — the geometric fact that makes diff-drive motion predictable. Forward kinematics: converting left and right wheel velocities into body-frame linear and angular velocity. Inverse kinematics: converting a desired (v, ω) command into per-wheel speed targets. The non-holonomic constraint and what it means for planning. Encoder tick-to-displacement conversion. Discrete pose integration and how error compounds. And the single most consequential assumption in all of this: no wheel slip — along with what to do when that assumption fails.

KEY INSIGHTThe geometry that makes a cheap robot surprisingly capable

A differential-drive robot turns not by steering a wheel but by creating a velocity difference between two wheels. The turn radius is geometry, not mechanism — and that's why the math is exact, and why the real world breaks it so reliably.

Two wheels, each driven independently, with the turn radius determined entirely by the ratio of their speeds. No steering axle, no Ackermann geometry, no caster angle to calibrate. This kinematic simplicity is the reason almost every educational and research mobile platform — TurtleBot, FollowBot, Roomba — uses differential drive. The model is elegant enough to derive on paper in ten minutes and powerful enough to drive navigation stacks in real-world environments.

🔑 Hold onto this

Every velocity command you ever send to FollowBot — every cmd_vel message, every DWA planner output, every navigation recovery behavior — passes through the inverse kinematic model to become left and right wheel speed targets. If your kinematic model is wrong, the navigation stack is aiming at a different robot than the one on the floor. Getting this model right, and understanding where it breaks, is the foundation of everything in Stage 2.

CORE CONCEPTThe unicycle model and the Instantaneous Center of Curvature

Differential drive is almost always taught through the unicycle abstraction: forget that there are two wheels and describe the robot's motion as a single body with a linear velocity v (meters per second, forward along the robot's heading) and an angular velocity ω (radians per second, positive counterclockwise). This abstraction is exact under the no-slip assumption and it is the interface that all higher-level motion planners use. The geometry_msgs/Twist message in ROS 2 carries exactly this: linear.x = v, angular.z = ω.

But when the robot actually moves, something concrete must translate (v, ω) into wheel commands. That's where the Instantaneous Center of Curvature (ICC) comes in.

Before the diagram, find that point with your own hands. You are the engineer at the laptop, and FollowBot is parked in the test hall, facing the wrong way. Each card below sets two levers, one per wheel: forward, stop or back. Nobody tells you what a pair does. Try them, then take FollowBot through the doorway, round the pillar and nose first onto the charging dock, in as few moves as you can. Then drive again.

Game · Drive to the dock

A card holds both wheel levers for one move: knob up is forward, middle stop, down back. Blue is the left wheel, green the right. A bump costs 2 moves.

The test hall A hall floor seen from above and to one side. FollowBot is parked in the far room, facing the back wall. A wall with a doorway divides the hall. Beyond the doorway stands a pillar, and past the pillar, against the back wall, is the charging dock.
Radius R · pin to robot–
Moves · round 10
Drag to look around

FollowBot is parked facing the wall. Nobody has told you what the nine pairs do. Try one.

Moves this round

Notice what happened: you never steered. Each pair of wheel speeds chose a point on the floor, and FollowBot circled it for as long as the levers were held. Equal speeds push that point infinitely far away, so the circle is a straight line. Equal and opposite speeds put it under the middle of the axle, so the robot spins where it stands. One wheel stopped puts it on that wheel, 0.15 m from the centre. Three lever positions gave the pin only those places to stand; with in-between speeds it can sit anywhere on the line through the two wheels. That point is the Instantaneous Center of Curvature, and the diagram below gives its distance R from the robot's centre for any pair of wheel speeds.

ICC heading θ v_L v_R b b R (turn radius) ICC Geometry R = b · (v_L + v_R) / (v_R − v_L) ω = (v_R − v_L) / (2b) v = (v_R + v_L) / 2 b = half-axle width (m) At every instant, a diff-drive robot rotates about a single point: the ICC. R = ∞ when v_L = v_R (straight). R = 0 when v_L = −v_R (spin in place).
The Instantaneous Center of Curvature (ICC) is the point about which the robot pivots at any given instant. Its distance R from the robot's center is set entirely by the ratio of wheel velocities. When both wheels turn at equal speed, R = ∞ and the robot goes straight. When they spin opposite and equal, R = 0 and the robot spins in place.

The ICC is not a physical axle or pivot — it's a geometric consequence of the no-slip assumption applied to two independently driven contact patches. At every instant, the constraint that each wheel rolls without sliding forces both velocity vectors to be perpendicular to the line from the wheel to the ICC. Two such constraints (left wheel, right wheel) uniquely determine the ICC location. This is why the model is called kinematic rather than dynamic: it's pure geometry, with no mass, force, or friction modeled. Dynamics enter when you need torques, and the kinematic model breaks when slip occurs. More on that in the failure-mode section.

📖 Non-holonomic constraint

A differential-drive robot cannot move sideways — it can only move in the direction its wheels are pointing. Formally, the robot's instantaneous velocity must lie along its heading axis. This is the non-holonomic constraint: ẏ_body = 0 (zero lateral velocity in the robot's body frame). The constraint reduces the reachable instantaneous velocities from the full 3-DOF plane motion to a 2-DOF subspace (forward + rotate). You can reach any (x, y, θ) pose — but you cannot do it in a straight line from all configurations. A non-holonomic robot cannot park perfectly sideways in a single motion; it must maneuver. This constraint is precisely why path planning for diff-drive robots is harder than for a point mass.

HOW IT WORKSForward kinematics: from wheel velocities to body velocity

Given the left and right wheel velocities (v_L and v_R in m/s) and the half-axle width b (distance from robot center to each wheel contact patch, in meters), the forward kinematic equations yield the robot's body-frame velocity:

📐 Forward kinematics equations

v = (v_R + v_L) / 2
ω = (v_R − v_L) / (2b)
where: v = linear velocity (m/s), ω = angular velocity (rad/s), b = half-axle width (m)

These equations follow directly from the ICC geometry. The body moves at the average wheel speed; it rotates at a rate proportional to the speed difference divided by the axle width. Larger axle width → smaller ω for the same speed difference — a wider robot is harder to turn quickly at fixed wheel speed.

To go from wheel speeds to the change in world-frame pose, you integrate through the robot's heading θ:

📐 Continuous kinematic equations (world frame)

ẋ = v · cos(θ)
ẏ = v · sin(θ)
θ̇ = ω
State: (x, y, θ) in the world frame. These are nonlinear ODEs — cos/sin of the current heading.

The nonlinearity (trigonometry in x and y) is important. It means you cannot simply add up velocity vectors over time — the heading must be integrated simultaneously. This is the source of discretization error when you approximate these continuous equations with a finite time step Δt.

Encoder ticks to displacement

In practice you don't directly measure v_L and v_R — you count encoder ticks. A quadrature encoder with N ticks per revolution, on a wheel of radius r, converts as follows:

📐 Tick-to-displacement conversion

d_L = (Δticks_L / N) · 2π · r
d_R = (Δticks_R / N) · 2π · r
d = displacement per control cycle (m). Divide by Δt to get velocity (m/s).

FollowBot uses quadrature encoders with 1000 PPR and 4× decoding → 4000 counts/rev, with wheels of radius 0.0325 m. Each count therefore represents 2π × 0.0325 / 4000 ≈ 0.000051 m = 0.051 mm of wheel travel. At 1 m/s the encoder generates about 19,600 counts/second — well within the microcontroller's counter bandwidth. At low speeds (below ~0.05 m/s), individual ticks arrive so infrequently that velocity estimates become very noisy; this is the "low-speed encoder noise floor" that EKF tuning must account for.

HOW IT WORKSInverse kinematics: from cmd_vel to wheel commands

The navigation stack operates in unicycle space: it publishes a desired (v, ω) to /cmd_vel. The motor driver node must convert that to per-wheel speed targets. Invert the forward kinematic equations:

📐 Inverse kinematics equations

v_R = v + ω · b
v_L = v − ω · b
Verify: subtract to get v_R − v_L = 2ωb → ω = (v_R − v_L)/(2b) ✓

This is a clean linear inversion — no approximations, no singularities. But the result is only meaningful if the motor can actually deliver v_R and v_L. You must clamp both to the robot's maximum wheel speed before sending them:

diff_drive_controller.pyrclpy · inverse kinematics + clamping
import rclpy
from rclpy.node import Node
from geometry_msgs.msg import Twist
from std_msgs.msg import Float64MultiArray
import math

# FollowBot hardware constants
HALF_AXLE  = 0.150    # b — meters from center to wheel
WHEEL_RAD  = 0.0325   # r — wheel radius in meters
MAX_WHEEL  = 1.3      # m/s — hardware limit per wheel

class DiffDriveController(Node):
    def __init__(self):
        super().__init__('diff_drive_controller')
        self.create_subscription(Twist, '/cmd_vel',
                                  self.cmd_cb, 10)
        self.pub = self.create_publisher(Float64MultiArray,
                                          '/wheel_commands', 10)

    def cmd_cb(self, msg):
        v = msg.linear.x         # m/s, forward
        w = msg.angular.z        # rad/s, CCW positive

        # Inverse kinematics
        v_r = v + w * HALF_AXLE
        v_l = v - w * HALF_AXLE

        # Clamp to hardware limits (preserving ratio)
        scale = max(abs(v_r), abs(v_l), MAX_WHEEL) / MAX_WHEEL
        v_r /= scale
        v_l /= scale

        out = Float64MultiArray()
        out.data = [v_l, v_r]    # [left, right] m/s
        self.pub.publish(out)

def main():
    rclpy.init()
    rclpy.spin(DiffDriveController())
    rclpy.shutdown()

Three things in that snippet deserve attention. First, the clamping preserves the ratio v_R / v_L — it slows both wheels proportionally rather than hard-clamping each independently, which would silently change the commanded curvature. Second, the clamping is in wheel-speed space, not unicycle space — never clamp v and ω independently upstream, because that also changes the effective curvature. Third, this node runs at the velocity-command rate (10 Hz from the nav stack), not the control rate (100 Hz); the actual PID loop running at 100 Hz lives in the motor driver and closes the velocity loop independently.

SEE ITDiff-drive simulator: wheel velocities, ICC, and slip

In the hall you set the wheels and watched the body follow. This simulator works the other way round, and then breaks the model. In cmd_vel mode, set desired (v, ω) and compute the wheel commands, clamped to the hardware limit — FollowBot traces its path on the grid, and the ICC, shown as a live point, is now free to sit anywhere on the line through the wheels. In square-path mode, the slip slider adds a proportional error to the right wheel — run the square path and watch dead-reckoning error compound. The worst decision here is maximum slip with no correction: observe how quickly the estimated pose diverges from the true path.

⚙ Interactive · Diff-drive kinematics & slip simulator
0.60 m/s
0.50 rad/s
→ v_L = —    v_R = —
x (m)0.00
y (m)0.00
θ (°)0.0
v (m/s)0.00
ω (rad/s)0.00
ICC R (m)∞

Set v and ω; inverse kinematics computes the wheel commands. The ICC point is shown in gold.

Try these specific configurations and notice the results. Setting ω = 0 makes v_L = v_R and moves the robot straight (ICC at infinity). Setting v = 0 makes v_L = −v_R with equal magnitudes and produces a pure spin (ICC at center). Setting v = 0.30 m/s and ω = 2.00 rad/s makes v_L = 0 and pivots around the left wheel. These are the three cases you found with the levers. Now switch to square-path mode, add 15% slip, and run the path — after four sides the dead-reckoning pose is significantly wrong even though the commands were "correct." This is the accumulation problem that wheel odometry alone cannot solve.

CORE CONCEPTDiscrete integration and the accumulation of error

The continuous kinematic equations ẋ = v cos θ, ẏ = v sin θ, θ̇ = ω must be integrated numerically at each control cycle. The simplest approach — forward Euler with time step Δt — is what almost every embedded motor driver uses:

📐 Euler pose integration (one control cycle)

θ_new = θ + ω · Δt
x_new = x + v · cos(θ) · Δt
y_new = y + v · sin(θ) · Δt

This is numerically wrong: it uses the heading at the start of the step rather than the average heading. For turning motion, the average-heading (midpoint Euler or Runge-Kutta) integration is more accurate:

📐 Midpoint Euler (recommended for odometry)

θ_new = θ + ω · Δt
θ_mid = (θ + θ_new) / 2
x_new = x + v · cos(θ_mid) · Δt
y_new = y + v · sin(θ_mid) · Δt

The midpoint method halves the integration error for a given time step. For FollowBot running at 100 Hz (Δt = 10 ms), the difference is usually negligible for straight-line motion but measurable during sharp turns. At 10 Hz (Δt = 100 ms), the difference matters even during gentle curves.

💡 Why dead-reckoning error is cumulative, not bounded

Each integration step adds a small error. Unlike measurement noise, which averages out, systematic errors (from slip, from encoder resolution, from wheel radius miscalibration) accumulate monotonically. A 0.5% wheel radius error causes the robot to think it has traveled 1 m when it has traveled 1.005 m — harmless after one meter, catastrophic after 200 meters. This is precisely why odometry alone is insufficient for long-range navigation and why external reference (LIDAR scan matching, visual features, or GPS) must be fused via an EKF. Lesson 2.2 addresses this directly.

The odometry node publishes the integrated pose as a nav_msgs/Odometry message on /odom. It also broadcasts the odom → base_link TF transform so every node that needs the robot's pose can query the TF tree rather than subscribing to /odom directly. The covariance fields in the Odometry message — often set to a constant diagonal and then ignored — actually carry load-bearing information for the EKF fuser: get them wrong and the EKF will weight odometry incorrectly relative to LIDAR.

FOLLOWBOTImplementing the kinematic model in ROS 2

FollowBot's Stage 2 milestone requires two concrete deliverables. The forward kinematic model (encoder ticks → /odom) and the inverse kinematic model (/cmd_vel → wheel speed commands), both running as ROS 2 nodes at appropriate rates. Here is the odometry node — it reads the differential encoder counts published by the microcontroller and integrates them into the robot's pose.

odometry_node.pyrclpy · forward kinematics + /odom publisher
import rclpy
from rclpy.node import Node
from nav_msgs.msg import Odometry
from std_msgs.msg import Int32MultiArray
from geometry_msgs.msg import TransformStamped
import tf2_ros, math
from rclpy.time import Time

# FollowBot encoder / geometry constants
TICKS_PER_REV = 4000   # 1000 PPR × 4× quadrature decoding
WHEEL_RAD     = 0.0325  # meters
HALF_AXLE     = 0.150   # b, meters
TICK_TO_M     = (2 * math.pi * WHEEL_RAD) / TICKS_PER_REV

class OdometryNode(Node):
    def __init__(self):
        super().__init__('odometry_node')
        self.x, self.y, self.th = 0.0, 0.0, 0.0
        self.last_ticks = None

        self.pub  = self.create_publisher(Odometry, '/odom', 50)
        self.tf_b = tf2_ros.TransformBroadcaster(self)
        self.create_subscription(Int32MultiArray, '/encoder_ticks',
                                  self.enc_cb, 50)

    def enc_cb(self, msg):
        ticks = msg.data           # [left_ticks, right_ticks]
        if self.last_ticks is None:
            self.last_ticks = ticks; return

        dl = (ticks[0] - self.last_ticks[0]) * TICK_TO_M
        dr = (ticks[1] - self.last_ticks[1]) * TICK_TO_M
        self.last_ticks = ticks

        # Forward kinematics → body velocity increments
        d_dist = (dr + dl) / 2
        d_th   = (dr - dl) / (2 * HALF_AXLE)

        # Midpoint Euler integration
        th_mid     = self.th + d_th / 2
        self.x    += d_dist * math.cos(th_mid)
        self.y    += d_dist * math.sin(th_mid)
        self.th   += d_th

        now = self.get_clock().now().to_msg()
        self._publish_odom(now, d_dist, d_th)
        self._broadcast_tf(now)

    def _publish_odom(self, stamp, d_dist, d_th):
        o = Odometry()
        o.header.stamp    = stamp
        o.header.frame_id = 'odom'
        o.child_frame_id  = 'base_link'
        o.pose.pose.position.x = self.x
        o.pose.pose.position.y = self.y
        # quaternion from yaw only (flat-ground assumption)
        q_z = math.sin(self.th / 2)
        q_w = math.cos(self.th / 2)
        o.pose.pose.orientation.z = q_z
        o.pose.pose.orientation.w = q_w
        self.pub.publish(o)

    def _broadcast_tf(self, stamp):
        t = TransformStamped()
        t.header.stamp    = stamp
        t.header.frame_id = 'odom'
        t.child_frame_id  = 'base_link'
        t.transform.translation.x = self.x
        t.transform.translation.y = self.y
        t.transform.rotation.z = math.sin(self.th / 2)
        t.transform.rotation.w = math.cos(self.th / 2)
        self.tf_b.sendTransform(t)

def main():
    rclpy.init()
    rclpy.spin(OdometryNode())
    rclpy.shutdown()

Several design decisions in this code are worth calling out explicitly. The node subscribes to encoder ticks rather than computing displacement in the microcontroller — this keeps the conversion constants (TICK_TO_M, HALF_AXLE) editable from Python without reflashing firmware. The midpoint Euler integration is used, not forward Euler — a deliberate choice that costs two lines and saves measurable drift during turning. The TF broadcast runs in the same callback as the odometry publish, ensuring the transform is never out of sync with the message. The covariance matrices are omitted here for brevity but must be filled in for the EKF in Stage 4.

🔑 Stage 2 milestone checkpoint

With this node running, FollowBot has: a forward kinematic model producing /odom and the odom → base_link TF at 100 Hz; an inverse kinematic model converting /cmd_vel to wheel commands with hardware clamping; and the wheel speed control loop closed in firmware. Test: drive the robot in a 1 m square manually and inspect the /odom pose in RViz. Without slip, the reported pose should return to within ~5 cm of the start. With typical indoor carpet friction, expect 10–20 cm error — a quantitative preview of why the EKF fuser in Stage 4 is necessary.

WEAKNESSWhere the kinematic model bites — and bites hard

✗ Wheel slip is the rule, not the exception

The kinematic model assumes zero slip: the wheel contact patch moves at exactly the speed the encoder reports. This is violated on carpet (static friction anisotropy), on slopes (gravity component adds effective torque asymmetry), and during any high-speed turn (centrifugal effects load the outer wheel and unload the inner one, changing contact patch pressure). The dangerous aspect: slip produces a systematic bias in the odometry — the robot consistently believes it has turned less sharply than it has. Over a 10-meter path, 3% slip can produce 30 cm of lateral dead-reckoning error and 5° of heading error. The model doesn't know it's wrong; it integrates confidently. The correct response is not to pretend slip doesn't happen but to inflate the odometry covariance in the EKF to reflect the true uncertainty. Never set the odometry covariance to zero — that is a lie to your filter.

✗ Wheel radius and axle width are never exactly what you think

The TICK_TO_M conversion and the HALF_AXLE constant in your code are nominal values from the mechanical drawing. The actual values differ by manufacturing tolerances, tyre pressure variation (for pneumatic wheels), floor compliance (the wheel deforms), and thermal effects. A 1 mm error in wheel radius produces 3.1% odometry scale error — 31 mm per meter of travel. A 2 mm error in the 150 mm half-axle produces 1.3% angular odometry error — about 4.8° per full turn. These are not small. The correct procedure is to calibrate both parameters empirically on the actual surface: drive a measured straight line, adjust TICK_TO_M. Drive a 10-turn circle, adjust HALF_AXLE. This calibration is hardware-specific and must be redone if you change wheels or floor surface. Skipping it and trusting the CAD dimensions is a leading cause of "the robot always curves left" bugs in student projects.

✗ Dead-reckoning is not dead — it's just wrong about how wrong it is

A common mistake is to use dead-reckoning without any covariance model and then be surprised when the SLAM system rejects loop-closure candidates because the prior is too confident. The kinematic model is genuinely useful: it provides a short-range prediction that LIDAR scan matching cannot provide (scan matching fails when there is insufficient feature density). The fix is not to abandon dead-reckoning but to model its uncertainty correctly. For FollowBot on indoor carpet, empirical covariance values measured from repeated square-path experiments provide much better EKF priors than anything derived analytically from the kinematic model alone. Measure the actual error, parameterize the covariance from it, and trust the math.

KEY INSIGHTHow this connects

Differential-drive kinematics is one of two motion models you need for FollowBot — the other is the arm's forward kinematics, which generalizes from one joint to six using Denavit-Hartenberg parameters. The Jacobian that bridges this stage to dynamics and force control begins to emerge in Lesson 2.3. The key conceptual thread: every model in Stage 2 is a geometric idealization that works precisely when its assumptions hold and fails informatively when they don't. Learning the failure mode is not a footnote — it is the point.

GLOSSARYKey terms introduced

Differential drive
A mobile robot drive configuration with two independently driven wheels on a common axis. Heading is controlled by the difference in wheel velocities; no steering mechanism is required. FollowBot's base platform.
Unicycle model
An abstraction of differential-drive motion that describes the robot as a single body with scalar linear velocity v and angular velocity ω. The interface used by all higher-level motion planners and the geometry_msgs/Twist ROS 2 message type.
Instantaneous Center of Curvature (ICC)
The point about which a differential-drive robot instantaneously rotates. Located at distance R = b(v_L + v_R) / (v_R − v_L) from the robot center, perpendicular to the heading. R = ∞ for straight motion; R = 0 for in-place spin.
Non-holonomic constraint
The kinematic restriction that the robot cannot move sideways — instantaneous velocity must lie along the heading axis. Reduces reachable instantaneous velocity from 3-DOF to 2-DOF and makes path planning harder than for an unconstrained point mass.
Forward kinematics (diff-drive)
The mapping from wheel velocities (v_L, v_R) to body velocity (v, ω): v = (v_R + v_L)/2, ω = (v_R − v_L)/(2b). Used by the odometry node to integrate encoder ticks into pose.
Inverse kinematics (diff-drive)
The mapping from desired body velocity (v, ω) to wheel velocity commands: v_R = v + ωb, v_L = v − ωb. Used by the motor driver node to convert cmd_vel messages into per-wheel targets.
Dead reckoning
Pose estimation by integrating wheel encoder measurements over time, without external reference. Accurate over short distances; suffers cumulative drift from wheel slip, calibration error, and discretization. Must be fused with external reference for long-range navigation.
Wheel slip
The difference between the commanded wheel surface speed and the actual ground-relative displacement. Caused by insufficient friction, high speed, slopes, or payload shifts. Introduces systematic error into the kinematic model that dead-reckoning cannot detect or correct.

ACTIVE RECALLCheck your understanding

Answer in your own words first, then reveal.

1FollowBot's left wheel runs at 0.6 m/s and the right wheel runs at 1.0 m/s. What are v, ω, and the ICC radius R? (b = 0.15 m)›

v = (v_R + v_L) / 2 = (1.0 + 0.6) / 2 = 0.80 m/s.
ω = (v_R − v_L) / (2b) = (1.0 − 0.6) / (2 × 0.15) = 0.4 / 0.3 ≈ 1.333 rad/s (turning left / counterclockwise, since v_R > v_L).
R = b · (v_L + v_R) / (v_R − v_L) = 0.15 × 1.6 / 0.4 = 0.60 m.
The robot is turning left with a 0.60 m radius circle. Verify: at the ICC, the left wheel (radius R − b = 0.45 m from ICC) must travel at v_ICC × 0.45 = 0.6 m/s → ω_ICC = 0.6/0.45 = 1.333 rad/s ✓. The right wheel (R + b = 0.75 m) at 1.333 × 0.75 = 1.0 m/s ✓.

2The nav stack publishes cmd_vel with v = 0.5 m/s and ω = 1.0 rad/s to FollowBot (b = 0.15 m, max wheel speed = 1.3 m/s). What are the wheel commands, and are they clamped?›

v_R = v + ω·b = 0.5 + 1.0 × 0.15 = 0.65 m/s.
v_L = v − ω·b = 0.5 − 1.0 × 0.15 = 0.35 m/s.
Max(|v_R|, |v_L|) = 0.65 m/s < 1.3 m/s, so no clamping is needed. The commands are sent as-is.
Now consider v = 0.5 m/s, ω = 8.0 rad/s: v_R = 0.5 + 1.2 = 1.7 m/s, v_L = 0.5 − 1.2 = −0.7 m/s. Scale = max(1.7, 0.7, 1.3) / 1.3 = 1.7/1.3 ≈ 1.308. Clamped: v_R = 1.7/1.308 ≈ 1.30 m/s, v_L = −0.7/1.308 ≈ −0.535 m/s. Note the ratio v_R/v_L is preserved — the curvature is maintained even when clamped.

3What is the non-holonomic constraint of a differential-drive robot, and why does it complicate path planning compared to a point-mass robot?›

The non-holonomic constraint states that the robot can only instantaneously move along its current heading — it cannot slide sideways. Formally: the component of body velocity perpendicular to the heading is zero. A point-mass robot in the plane has 3 degrees of freedom and can move in any direction at any instant. A diff-drive robot has 3-DOF configuration space (x, y, θ) but only 2-DOF instantaneous velocity (forward/backward, and rotational). This matters for planning because the robot cannot reach nearby configurations that require lateral motion without first reorienting. A diff-drive robot cannot parallel-park in a single straight motion — it must execute a multi-step maneuver. Path planners like DWA must account for this by sampling trajectories that respect the curvature constraint, not arbitrary velocity vectors. Ignoring the non-holonomic constraint in a planner produces paths the robot physically cannot follow without slip.

4Why is midpoint Euler integration preferred over forward Euler for odometry, and under what conditions does the difference become significant?›

Forward Euler uses the heading at the start of the time step when computing the displacement in x and y: x_new = x + v·cos(θ)·Δt. During a turn, the heading changes across the step, so using the initial heading introduces an error proportional to ω·Δt (the heading change per step). Midpoint Euler instead uses the heading at the midpoint of the step (θ + ω·Δt/2), which is a better approximation of the average heading during the step. The difference is significant when ω·Δt is large — that is, when the robot is turning sharply and/or the control cycle is slow. At 100 Hz (Δt = 0.01 s) with ω = 1 rad/s, the heading changes 0.01 rad per step, and the error is small. At 10 Hz (Δt = 0.1 s) with ω = 2 rad/s (a sharp turn), the heading changes 0.2 rad per step — midpoint Euler reduces this integration error roughly by half. Production odometry nodes (including diff_drive_controller in ros2_control) use midpoint Euler as the default.

Next: wheel odometry, drift quantification, and the EKF interface →