# Module 2.5: Static Force Duality and Mobile Bases

- Course: [Course 2: Robot Modeling, Velocities & Physical Structure](https://roboticsconcepts.dev/courses/robot-modeling-velocities-physical-structure.md)
- HTML Page: https://roboticsconcepts.dev/courses/robot-modeling-velocities-physical-structure/static-force-duality-and-mobile-bases/
- Key Concepts: Static force duality (τ = JᵀF), Holonomic vs. nonholonomic constraints, Differential drive, Ackermann & omniwheels

Here is one of my favorite surprises in all of mechanics: the exact same Jacobian matrix `J(q)` that translates joint speeds into hand velocity also works in reverse to translate forces pushing on the hand into holding torques at the motors — with zero extra geometry needed.

## Virtual work and static force duality (τ = Jᵀ F)

Suppose your robot arm is holding steady against a wall pushing back on its tip with force `F`. By conservation of energy (the principle of virtual work), power flowing in at the motors (`τᵀ q̇`) must balance power flowing out at the tip (`Fᵀ v`) for any tiny imagined motion `q̇`.

Substitute `v = J q̇` into `τᵀ q̇ = Fᵀ (J q̇)` and cancel `q̇`: you immediately get `τ = J(q)ᵀ F`. Notice the geometry flip! Near a fully stretched-out singularity, moving the arm radially is impossible — yet pushing inward straight down the outstretched bones requires almost zero motor torque because the mechanical structure carries the load directly, just like locking your knees when standing.

## Wheels, sideways friction, and nonholonomic constraints

Now swap the bolted-down arm for a robot rolling across the lab floor. Why can't a normal car slide straight sideways into a parallel parking spot without backing up and wiggling back and forth?

Because rubber tires roll forward cleanly while resisting sideways slip (`v_lateral = 0`). That restriction is a velocity constraint — a nonholonomic constraint — rather than a wall blocking the parking space itself. You can still reach every `(x, y, heading)` pose in the lot, you just can't travel directly along every velocity vector instantaneously:

- Differential drive (two independent drive wheels + caster): spins in place (`ω ≠ 0`) or drives forward/backward, pivoting around an Instantaneous Center of Curvature (ICC) along its axle line, yet zero sideways slip.
- Ackermann steering (car-like): front wheels steer by angle `δ`, bounding the turning radius and tying forward speed `v` to turning rate `ω = (v / L) tan(δ)` — it can't even spin in place.
- Omniwheel / mecanum (holonomic): rollers oriented at angles let the chassis command independent `(v_x, v_y, ω)` simultaneously, gliding diagonally or sideways without turning its nose.

## Interactive Sandbox: Wheeled Mobile Base Arena

Try the torque bars in Module 2.4 (`τ = Jᵀ F`), then explore the Wheeled Mobile Base Arena below. Switch between Diff-Drive, Ackermann, and Omniwheel, turn the wheel/steering sliders, and watch the green ICC pivot point and 3-second rollout trajectory respond.

## Planning around wheel constraints

Notice what happens to the allowed velocity arrows when you switch to Omniwheel: you get a full 360° arrow rosette and can strafe sideways cleanly. Switch back to Diff-Drive or Ackermann and those arrows collapse onto a constrained cone or curve, forcing path planners to generate smooth arcs and three-point turns instead of straight-line hops.

## Force duality & nonholonomic rolling constraint

```text
τ = J(q)ᵀ F   |   -ẋ sin(θ) + ẏ cos(θ) = 0  (zero sideways slip)
```

The Jacobian transpose maps tip forces to joint torques, while the rolling constraint forbids instantaneous lateral velocity perpendicular to the wheel axle.

## Check Your Intuition

**Question:** You have a differential-drive warehouse robot with `v_left = +0.6 m/s` and `v_right = -0.6 m/s`. Where is its Instantaneous Center of Curvature (ICC)?

- [ ] Infinitely far to the left because the robot drives straight
- [✓] Halfway between the two drive wheels — the robot spins in place
- [ ] Ten meters ahead of the nose

**Explanation:** When left and right wheel speeds are equal and opposite, `v = (v_L + v_R)/2 = 0`, so the signed radius `R = (W/2)(v_L + v_R)/(v_R - v_L) = 0` places the ICC right at the axle midpoint.

## Where You'll See This in Modern Robotics

Mobile manipulators combine both halves of this lesson: they use impedance control (`τ = Jᵀ F_desired`) so the arm feels springy and safe around humans, paired with base velocity planners that respect differential-drive or Ackermann constraints underneath.

## Companion Python Notebook: 05 · Static Force Duality & Wheeled Base Kinematics

Compute holding joint torques via τ = JᵀF and simulate differential-drive, Ackermann, and omniwheel paths around the Instantaneous Center of Curvature.

- Open in molab (WASM): https://molab.marimo.io/github/alchemicduncan/robotics-concepts-dev/blob/main/notebooks/course-2/05_static_force_duality_mobile_bases.py/wasm
- Open in Google Colab: https://colab.research.google.com/github/alchemicduncan/robotics-concepts-dev/blob/main/notebooks/colab/course-2/05_static_force_duality_mobile_bases.ipynb
- Download .py: https://roboticsconcepts.dev/downloads/notebooks/course-2/05_static_force_duality_mobile_bases.py
- Download .ipynb: https://roboticsconcepts.dev/downloads/notebooks/colab/course-2/05_static_force_duality_mobile_bases.ipynb
- Run locally: `uvx marimo edit --sandbox notebooks/course-2/05_static_force_duality_mobile_bases.py`
