Actuators and the Real-Time Constraint
The gap between commanded motion and delivered motion is not a software bug — it is physics, and you must model it.
🎯 By the end you'll understand
Why brushed and brushless DC motors have fundamentally different failure modes. How the torque-speed curve constrains everything a robot can do. How gear ratios trade speed for torque and why they introduce backlash. How quadrature encoders close the velocity loop and what happens when they don't. Why the control loop rate and sensor delay combine to determine stability — not just performance. And why integrator windup during actuator saturation is one of the most common instability triggers in mobile robotics practice.
KEY INSIGHTThe commanded-vs-delivered gap is physics, not a bug
A kinematic model says "turn left wheel at 0.6 m/s." The motor says "give me 40 ms and I'll get there — if the battery voltage holds." The gap between those two statements is where mobile robotics actually lives.
Every lesson so far has, at some level, assumed that when you command a velocity the robot delivers it. That assumption is now over. Real actuators have inertia, electrical time constants, thermal limits, and gear losses. The commanded motion and the delivered motion diverge, and the divergence is not random — it is governed by well-understood physics. Your job is to model that physics accurately enough to close a stable control loop around it.
State estimation (Stage 4) uses wheel encoder odometry as its motion model. If the motion model assumes ideal velocity delivery, state divergence is guaranteed when the motors saturate. Path planning (Stage 5) must produce trajectories that lie inside the motor's torque-speed envelope. Control design (Stage 3) must account for actuator delay to set stable PID gains. The actuator model is not a detail — it is the physical contract that every algorithm in the course must respect.
CORE CONCEPTDC motor models: brushed vs. brushless
FollowBot uses brushless DC (BLDC) motors for its drive wheels and servo-driven joints in its 6-DOF arm. Understanding both is necessary, because their failure modes are completely different.
Brushed DC motors have two terminals, a permanent magnet stator, and a wound rotor. Current through the rotor winding creates a magnetic force (the Lorentz force) that produces torque. As the rotor turns, mechanical brushes commutate the current — they physically switch which winding is energized. The equivalent circuit is a resistor R in series with an inductor L in series with a back-EMF voltage source:
V = IR + L(dI/dt) + Keω
Where V is the applied voltage, I is the armature current, R is the winding resistance, L is the armature inductance, Ke is the back-EMF constant (V·s/rad), and ω is the shaft angular velocity. The torque produced is: τ = KtI, where Kt is the torque constant. In SI units, Ke = Kt for the same motor. The back-EMF grows with speed, which is exactly why motors have a maximum no-load speed — at that speed, the back-EMF equals the supply voltage and current (and therefore torque) drops to zero.
The electrical time constant τe = L/R (typically 1–5 ms for small motors) governs how quickly current responds to a voltage step. The mechanical time constant τm = J/(KtKe/R) (typically 10–100 ms) governs how quickly the shaft velocity responds to a torque step. These time constants are the fundamental reason your velocity command is not delivered instantly.
Brushless DC motors (BLDC) invert the arrangement: permanent magnets on the rotor, wound stator coils. The commutation that was mechanical in a brushed motor is now electronic — the ESC (Electronic Speed Controller) reads rotor position from Hall-effect sensors or by sensing back-EMF, then switches the three-phase stator currents at the right moment. The advantages are significant: no brush wear, higher power density, better thermal characteristics. The disadvantages are also real: the ESC loop adds its own latency (typically 0.5–2 ms but as high as 8 ms at full load), and the three-phase commutation means a motor controller failure can easily drive two phases simultaneously, causing immediate motor damage rather than a gradual degradation.
CORE CONCEPTTorque-speed curves and gear ratio effects
The most important single diagram in actuator engineering is the torque-speed curve. For a DC motor operating at constant supply voltage, the relationship is approximately linear:
τ = τstall(1 − ω/ωno-load)
At ω = 0 (stall), the motor produces maximum torque τstall. At τ = 0, the motor runs at its maximum no-load speed ωno-load. Operating anywhere on this line is sustainable short-term; running near stall for extended periods is thermal suicide. The power output P = τω peaks at ωno-load/2 and τstall/2 — the middle of the curve.
Gear ratios reshape this curve. A gearbox with ratio N:1 (N motor turns per output shaft turn) multiplies output torque by N and divides output speed by N. If you need 5 N·m at 50 RPM from a motor that produces 0.5 N·m at 500 RPM, a 10:1 gearbox gets you there (minus losses, typically 5–15% per stage). The three practical consequences:
Gear ratio sets the operating point on the torque-speed curve
A robot wheel needs enough torque to accelerate the robot mass and overcome rolling resistance. Selecting gear ratio is the primary design tool for placing your operating point in the continuous zone at the expected load. Too low a ratio → motor runs fast and weak, saturates on hills. Too high a ratio → motor runs slow, maximum speed is inadequate, motor overheats at rated current because it runs near stall.
Backlash introduces position uncertainty
Mechanical gears have clearance between teeth (backlash). When direction reverses, the output shaft does not move until the motor has rotated enough to take up the backlash — typically 0.5–3° for quality planetary gearboxes, up to 10° for cheap worm gears. For a wheel encoder mounted on the motor shaft, the encoder reports motion during this gap. The wheel hasn't moved. This is a real source of odometry error that does not average out — it appears as systematic position drift after direction reversals.
Reflected inertia changes the mechanical time constant
A motor driving a load through a gear ratio N sees an effective inertia of Jload/N² plus its own rotor inertia. A 10:1 gearbox makes a 1 kg·cm² load look like 0.01 kg·cm² to the motor — dramatically reducing the mechanical time constant and improving responsiveness. But it also means the motor can accelerate rapidly into a gear limit; limit sensing or current limiting must prevent mechanical damage.
HOW IT WORKSQuadrature encoders: the velocity feedback path
An encoder without a quadrature signal tells you how fast the shaft is spinning but not which direction. A quadrature encoder produces two square-wave signals, A and B, with a 90° phase shift. When A leads B, the shaft is rotating forward; when B leads A, backward. The resolution is determined by the number of encoder lines (pulses per revolution, PPR). A typical robotics encoder has 100–4096 PPR.
Counting only rising edges of channel A gives 1× resolution (PPR counts/rev). Counting both edges of A gives 2× (2×PPR). Counting all edges of both A and B gives 4× resolution (4×PPR) — called "4× decoding" and is standard in embedded motor controllers. FollowBot's wheel encoders are 1000 PPR with 4× decoding → 4000 counts/rev. With a 65 mm wheel diameter (wheel_radius = 0.0325 m), each count represents (2π × 0.0325 m) / 4000 = 0.051 mm of linear travel. This resolution is excellent; the limit on odometry accuracy is not the encoder but the tire slip and the backlash discussed above.
The encoder closes the velocity loop. The motor controller reads encoder counts at a fixed rate (typically 1–10 kHz), computes velocity via finite-difference, and adjusts the PWM duty cycle to minimize the error between commanded and measured velocity. This is the inner control loop — the one that runs fastest. When people talk about a "100 Hz control loop" in mobile robotics, they often mean the outer loop (velocity commands from the planner). The inner encoder loop runs much faster inside the motor driver, typically at 1–4 kHz.
IN PRACTICEPower budgets and thermal limits
The number on a motor's spec sheet is the rated continuous torque — the torque at which the motor can run indefinitely without overheating. Exceeding it triggers thermal runaway: higher current → more resistive heating (P = I²R) → higher winding temperature → higher resistance → less back-EMF headroom → higher current. The thermal time constant is typically 1–10 minutes for small motors, which means you can run at 2× rated torque for 30 seconds before damage begins, but not for 5 minutes.
| Parameter | Typical small BLDC (FollowBot wheel) | What it constrains |
|---|---|---|
| Rated voltage | 24 V | Maximum supply; higher → faster but ESC/winding damage |
| No-load speed | ~3000 RPM at 24 V | After gearing: ≈ 1.3 m/s at 10:1 with 65 mm wheel (r = 0.0325 m) |
| Stall torque | ~1.8 N·m | Maximum acceleration force on ground |
| Rated torque (continuous) | ~0.4 N·m | Sustained climbing / carrying load |
| Rated current | ~3 A | Budget per wheel × 2 wheels = 6 A minimum |
| Peak current (2–5 s) | ~12 A | Acceleration bursts; battery C-rate constraint |
| Electrical time constant | ~2 ms | Current step response; ESC bandwidth |
| Mechanical time constant | ~35 ms | Velocity step response; minimum useful loop period |
For FollowBot's total power budget, the drive motors are not the only consumers. A realistic breakdown at full operation:
Drive motors (2×): 6–24 A at 24 V = 144–576 W peak; 72–144 W nominal. Onboard compute (Jetson Orin NX): ~10–25 W at 12 V. RPLIDAR A2: ~2.5 W at 5 V. RealSense D435i: ~2 W at 5 V. 6-DOF arm servos: 5–30 W depending on load. IMU + miscellaneous: ~2 W. Total: ~90–200 W continuous, ~600 W peak for 2 s burst acceleration. A 24 V, 10 Ah LiPo (240 Wh) gives ~1.2–2.7 hours at nominal operation — reduced by sharp maneuvers that consume peak current and heat the battery. Current limiting is not optional; it is how you prevent battery sag from corrupting the motor controller's supply voltage.
CORE CONCEPTThe real-time constraint: why loop rate and delay determine stability
The mechanical time constant of FollowBot's drive motors is approximately 35 ms, giving a mechanical bandwidth of approximately 1/τ_m ≈ 28.6 Hz. The Bode stability criterion in discrete time tells us that the control loop rate must be at least 5–10× faster than this bandwidth. That means we need at least 5 × 28.6 ≈ 143 Hz minimum — so 140–300 Hz for a stable velocity loop.
But rate is only half the constraint. Sensor delay — the time from the physical event to the controller receiving a valid measurement — is equally important and often overlooked. A delay D in a feedback loop adds phase lag of D × f × 360° at frequency f. At the crossover frequency fc (where the loop gain is 0 dB), excessive phase lag reduces the phase margin below 0° and the loop becomes unstable.
For a simple PID velocity controller, instability onset occurs when the total loop delay (sensor delay + computation time + actuator response) exceeds approximately 1/(4 × bandwidth). A motor with 10 Hz mechanical bandwidth tolerates at most 25 ms of total delay. Beyond that, the derivative term amplifies stale error signals, the integral term accumulates incorrect error, and the system oscillates. This is not a software tuning issue — it is a consequence of the delay being baked into the physics of the communication and sensing chain.
Two mechanisms drive instability as delay increases:
1. PD term destabilization: the proportional and derivative terms act on the error signal. With significant delay, the error signal the controller sees is the error from D milliseconds ago — not the current error. If the robot is already correcting, the delayed error still says "overcorrect," and the D term amplifies that stale signal. The corrective action arrives after the correction was unnecessary. Classic symptom: oscillation that grows at a frequency roughly equal to 1/(2D).
2. Integrator windup amplification: the integral term accumulates error over time. When the actuator is saturated (the motor cannot deliver the commanded velocity), the velocity error never reaches zero. The integrator continues accumulating — charging up, in effect. When the saturation condition ends (the person slows down), the accumulated integral drives the motor past the set-point before the integrator can discharge. The larger the delay, the more cycles of accumulation occur before the saturation is resolved. This is integrator windup, and the next section covers it in clinical detail.
SEE ITMotor latency simulator — stability boundary explorer
Below is a PD velocity controller closing the loop around a simulated DC motor (mechanical time constant 35 ms, matching FollowBot's drive motors). Set the control loop rate and the sensor delay, then watch the velocity response to a step command. The controller attempts to bring wheel velocity from 0 to 0.6 m/s. Observe the maximum stable delay at each loop rate, and watch integrator windup onset when saturation is enabled.
HOW IT WORKSIntegrator windup: the mechanism, not the metaphor
Integrator windup is often described colloquially as "the integrator gets stuck." The actual mechanism is worth understanding precisely, because the fix depends on understanding it correctly.
A standard PID velocity controller computes:
u(t) = Kp·e(t) + Ki·∫e(t)dt + Kd·(de/dt)
Where e(t) = vcmd − vmeasured is the velocity error, and u(t) is the command sent to the motor (typically a current set-point or PWM duty cycle). The integral term ∫e(t)dt accumulates error over time; its purpose is to eliminate steady-state error caused by disturbances (like friction or a slight slope).
Windup occurs when the actuator saturates. Suppose vcmd = 1.8 m/s (the person is running) but the motor can only deliver 1.2 m/s. The error e(t) = 1.8 − 1.2 = 0.6 m/s is persistently positive. The integral term keeps growing: ∫e(t)dt → large positive number. The u(t) command is irrelevant at this point — the actuator is already at its hardware limit and sending a larger u(t) changes nothing. But the integrator doesn't know this. It keeps accumulating.
When the person slows to 0.4 m/s, the planner finally drops vcmd. Now e(t) = 0.4 − 1.2 = −0.8 m/s (the robot is overspeed). The proportional and derivative terms immediately see this negative error and try to slow down. But the integral term is still enormous and positive — the windup. It continues to drive the motor toward maximum velocity long after the set-point changed. The robot overshoots, closes to 0.3 m from the person, and triggers a safety stop.
The correct fix is anti-windup clamping: when the actuator command u(t) would exceed the saturation limit, stop accumulating the integral. In code:
class VelocityPID: def __init__(self, kp, ki, kd, u_max): self.kp, self.ki, self.kd = kp, ki, kd self.u_max = u_max # actuator saturation limit self.integral = 0.0 self.prev_err = 0.0 def update(self, error, dt): # Compute unclamped output p_term = self.kp * error d_term = self.kd * (error - self.prev_err) / dt if dt > 0 else 0.0 u_unclamped = p_term + self.ki * self.integral + d_term # Anti-windup: only integrate if NOT at saturation limit # OR if integration would pull us BACK from the limit at_limit = abs(u_unclamped) >= self.u_max would_worsen = (error > 0 and u_unclamped >= self.u_max) or \ (error < 0 and u_unclamped <= -self.u_max) if not (at_limit and would_worsen): self.integral += error * dt # safe to accumulate self.prev_err = error return max(-self.u_max, min(self.u_max, u_unclamped))
The highlighted lines are the anti-windup guard. The key insight: integration is suppressed only when it would worsen the saturation (same sign as the unsaturated output). If the system is saturated high but the error has gone negative (the robot overshot), the integral is allowed to decrease — that is actively helpful. This "conditional integration" approach is simple and robust; more sophisticated methods (back-calculation, observer-based anti-windup) exist but are rarely needed for mobile-base velocity control.
FOLLOWBOTActuator choices for FollowBot's drive system
The Stage 1 milestone for FollowBot includes a complete URDF with correct inertial parameters. The actuator choice is part of that definition — URDF specifies joint types, axis limits, and effort limits that must match the physical hardware.
FollowBot uses BLDC motors with planetary gearboxes for the drive wheels (gear ratio 10:1), and digital servo motors for the 6-DOF arm joints. Here is the reasoning for each choice:
| Component | Choice | Why not the alternative |
|---|---|---|
| Drive motors | 24V BLDC, 10:1 planetary | Brushed DC: brush wear in an indoor robot running continuously is a maintenance problem. Stepper motors: open-loop, no inherent velocity feedback, heavy for equivalent torque. |
| Drive ESC | FOC-capable (Field-Oriented Control) | Trapezoidal commutation produces torque ripple at low speed (person following requires smooth low-speed control). FOC eliminates ripple by controlling current in the rotating frame. |
| Wheel encoders | Magnetic quadrature, 1000 PPR, on wheel shaft (not motor shaft) | Motor-shaft mounting measures motor angle, not wheel angle — backlash is invisible. Optical encoders: fine indoors but sensitive to dust and brake dust in mixed environments. |
| Arm joints | Digital servo (Dynamixel XM430) | Built-in position, velocity, and torque control; RS485 serial bus; integrated encoder. Custom BLDC + controller for each joint is more capable but adds 4× the integration complexity for Stage 1. |
The URDF velocity and effort limits for the drive joints must match these physical parameters. If you set max_velocity="10.0" in the URDF but the actual motor saturates at 1.3 m/s (ωmax at wheel ≈ 40 rad/s), the URDF is lying to the planner. Nav2 will happily plan trajectories at 10 m/s, your velocity controller will chronically saturate, and integrator windup will become a constant companion rather than an edge case.
<!-- left wheel continuous joint with correct actuator limits --> <joint name="left_wheel_joint" type="continuous"> <parent link="base_link"/> <child link="left_wheel"/> <axis xyz="0 1 0"/> <!-- ~40 rad/s = 1.3 m/s with 65mm wheel (ω · r = 40 × 0.0325 m/s) --> <!-- 3.0 N·m rated continuous torque (0.4 Nm motor × 10:1 gear × 75% eff) --> <limit effort="3.0" velocity="50.0"/> <dynamics damping="0.1" friction="0.05"/> </joint>
The <dynamics> tag is critical and often left at defaults. The damping value (N·m·s/rad) acts like viscous friction in simulation — it determines how quickly Gazebo's physics engine damps free rotation. Set it too low and the simulated wheels spin freely and unrealistically. Set it correctly and the simulated velocity step response matches the physical motor's mechanical time constant. This is your first sim-to-real alignment task, and it lives in the URDF.
Command a voltage step to the motor via its ESC, record the velocity response via the encoder, and fit an exponential: v(t) = vss(1 − e−t/τm). In ROS 2, log /joint_states velocity at 200 Hz and post-process. Two measurements: the 63.2% velocity point gives τm directly. For FollowBot's motors, τm ≈ 30–40 ms. Use the measured value in both the URDF dynamics tag and in your controller's gain calculation — not the datasheet estimate, which assumes no gear losses.
WEAKNESSWhere this bites
The most common actuator-related instability in practice: gains that are "theoretically correct" for the motor's mechanical time constant but ignore the sensor-to-controller delay. A 35 ms mechanical time constant suggests aggressive gains are safe. But a 20 ms encoder latency (ROS 2 topic delay over a USB serial bridge) plus a 10 ms processing cycle means the effective delay is 30 ms — nearly equal to the mechanical time constant. The gain that was stable in simulation (where delay is often zero or not modeled) becomes unstable on hardware. The systematic fix: measure total loop delay before tuning. Log encoder timestamps against the header timestamp in the joint state message; the difference is your actual latency, not the theoretical latency.
Windup onset does not require the robot to physically hit a wall. It begins the moment the commanded velocity exceeds the motor's torque-limited velocity at the current load — which happens, for example, during uphill climbing on a grade the robot was not designed for. The robot is not stalled; it is moving, but slower than commanded. The integral continues accumulating throughout the entire slope. When the slope ends, the windup drives the robot into an overspeed condition on flat ground. This is particularly dangerous on a robot following a person up and down a ramp. The fix: monitor the actuator current. If the motor is drawing rated current but not reaching the commanded velocity, you are in the soft-saturation regime and anti-windup should be active even though the robot is nominally moving.
In ROS 2, the velocity controller (Act node) and the path planner (Plan node) are separate nodes running at different rates. A common mistake: set both to 10 Hz to "keep it simple." The velocity controller at 10 Hz is too slow for the mechanical dynamics of a 35 ms time constant motor — the bandwidth criterion demands at least 140 Hz minimum. The result is a sluggish, oscillatory base motion that makes every downstream behavior (person tracking, arm coordination) look broken. Always run the Act node at 140–200 Hz as a separate timer callback, completely decoupled from the 10–20 Hz planning node. They communicate via the cmd_vel topic, which the controller holds until updated — not via synchronous calls.
KEY INSIGHTHow this connects
- Sensors: Physics, Noise Models, and Failure Modes (1.6) — this lesson is the actuator complement to 1.6's sensor treatment. Just as sensors introduce noise and saturation into the Sense node, actuators introduce delay and saturation into the Act node. Together they define the physical limits of the closed-loop system the controller must work within.
- FollowBot System Architecture: Requirements to Block Diagram (1.8) — the Stage 1 milestone where all hardware choices — including actuator limits, loop rates, and URDF joint parameters — are assembled into a complete system specification. Everything in this lesson feeds directly into the requirements specification and block diagram produced there.
Actuator modeling is not completed at Stage 1. Stage 3 (Dynamics Control) derives the full dynamic model — inertia matrix, Coriolis terms, gravity — that extends the kinematic model to account for force and torque. Stage 3's control designs (PID, LQR, model-predictive) all depend on the torque-speed curves and time constants introduced here. Stage 4 (State Estimation) shows how actuator slip and backlash corrupt odometry and why encoder-based odometry requires slip detection to be reliable beyond short distances.
GLOSSARYKey terms introduced
- Back-EMF
- The voltage induced by a rotating motor shaft opposing the applied supply voltage (V = Ke·ω). As shaft speed increases, back-EMF increases, reducing current and torque. It is the fundamental reason DC motors have a no-load speed limit at a given supply voltage.
- Mechanical time constant (τm)
- The time for a motor's shaft velocity to reach 63.2% of its final value in response to a voltage step, with no external load. Approximately J·R/(Kt·Ke). Governs the minimum useful control loop period; the control loop must be much faster than τm.
- Torque-speed curve
- The linear relationship between a DC motor's output torque and shaft speed at a fixed supply voltage. Maximum torque (stall) at zero speed; maximum speed at zero torque; peak power at the midpoint. The fundamental design constraint for gear ratio selection.
- Quadrature encoder
- An incremental rotary position sensor producing two 90°-phase-shifted square waves, enabling direction detection in addition to speed measurement. 4× decoding uses all edges of both channels, quadrupling effective resolution over the base PPR rating.
- Integrator windup
- The unbounded accumulation of error in a PID integral term when the actuator is saturated and cannot reduce the error. Produces large overshoot when the saturation condition ends. Prevented by conditional integration (anti-windup clamping): halt integration when the unclamped output is beyond the saturation limit and the error has the same sign.
- Phase margin
- The amount of additional phase lag (in degrees) a feedback loop can tolerate before becoming unstable (phase margin = 0° → oscillation onset). Total loop delay D reduces phase margin by D × fc × 360°, where fc is the crossover frequency. The control-loop stability budget that sensor delay and computation time must fit within.
- FOC (Field-Oriented Control)
- A BLDC motor control algorithm that independently controls the torque-producing and flux-producing current components by transforming to the rotating magnetic frame (Park transform). Eliminates torque ripple and enables smooth low-speed operation — essential for FollowBot's low-speed person-following task.
- Backlash
- The mechanical play between gear teeth: the dead zone of motor rotation within which the output shaft does not move during direction reversal. Causes systematic odometry error that does not average out over time, appearing as position drift after each direction change.
ACTIVE RECALLCheck your understanding
Answer in your own words first, then reveal.
1FollowBot's velocity controller is running at 10 Hz and you observe slow, oscillatory velocity response. Before touching any PID gains, what do you check first and why?›
Check the total loop delay first — not the gains. At 10 Hz, the control period is 100 ms. The motor's mechanical time constant is ~35 ms. The Nyquist stability condition for the velocity loop requires the control period to be much shorter than τm — typically at most τm/5 = 7 ms, implying at least 140 Hz. At 10 Hz you are fundamentally undersampled relative to the mechanical dynamics. No gain tuning can fix this: at 10 Hz, even a P-only controller with Kp = 0.01 will be sluggish, and any gain aggressive enough to achieve fast response will cause oscillation because the feedback is arriving many time constants late. Fix: raise the control loop rate to at least 140 Hz (= 5 × mechanical bandwidth). Then tune gains.
2Explain integrator windup using the specific scenario of FollowBot following a person who sprints at 2.5 m/s for 3 seconds then stops suddenly.›
During the sprint: the planner commands 2.5 m/s but the motor is limited to 1.2 m/s. Velocity error = 2.5 − 1.2 = 1.3 m/s, persistently positive. The integral accumulates: ∫1.3 dt over 3 seconds → ~3.9 m of accumulated error (in velocity-seconds). The integral term drives a large positive command, but the actuator is already saturated at its hardware limit — the extra command does nothing. When the person stops: the planner drops to 0 m/s. Now the error = 0 − 1.2 = −1.2 m/s. The proportional term immediately responds negatively. But the integral term is +3.9 m·s worth of windup, producing a large positive command that overrides the proportional response. The robot continues accelerating toward 1.2 m/s instead of slowing down. It overshoots, reaches 0.3 m from the stopped person, triggers the safety stop. With anti-windup: during the 3-second sprint, the integral is frozen. On person stop, the error immediately drives deceleration without the windup offset.
3A colleague suggests placing the wheel encoder on the motor shaft rather than the wheel shaft to get higher resolution (since the motor turns 10× faster before the gearbox). What failure mode does this introduce that motor-shaft mounting hides?›
Motor-shaft mounting makes backlash invisible. During a direction reversal, the motor shaft rotates (the encoder reports motion), but the wheel shaft does not move — it is sitting in the backlash dead zone. The odometry model believes the wheel traveled a small distance during the reversal; the wheel actually stayed put. This error appears every time the robot changes wheel direction (sharp turns, oscillations in the velocity controller). Over time it manifests as systematic position drift that is correlated with maneuver complexity rather than distance traveled — and is therefore very hard to attribute to backlash without careful analysis. Wheel-shaft mounting measures what actually happened at the wheel, backlash and all, though at 1/10th the resolution. For FollowBot's 1000 PPR encoder with 4× decoding and 65 mm wheels, wheel-shaft mounting still gives 0.051 mm per count — more than sufficient.
4What does the URDF <dynamics damping="..." friction="..."/> tag actually do in Gazebo simulation, and why does getting it wrong matter for the Stage 1 milestone?›
The damping parameter adds a viscous friction torque to the simulated joint: τdamping = −damping × ω. Combined with the rotor inertia (specified in the link's <inertial> tag), this determines the joint's effective mechanical time constant in simulation: τm,sim ≈ inertia / damping. Setting it incorrectly means the simulated motor responds to velocity commands at a fundamentally different rate than the physical motor. If the simulated τm is 5 ms and the physical τm is 35 ms, the PID gains tuned in Gazebo will be 7× too aggressive on hardware — producing immediate instability on first deployment. The Stage 1 milestone requires the URDF to be physically accurate; the damping value should be set to match the empirically measured mechanical time constant (J/τm,measured), not left at the Gazebo default of 0.