Mode
Twist
Cart
A shopping cart moving on a flat surface can be seen as a flexible model for wheeled robots. By treating the cart as a planar rigid body, every point is understood to share a common motion, consisting of a translation and a rotation in the plane. This viewpoint does not depend on the number or placement of wheels, which makes it broad enough to capture the motion of differential-drive robots, car-like vehicles, omni-directional platforms, and more. Building on this, we now turn to the cart’s kinematics and dynamics.
1) Motion of a Planar Rigid Body
1.1 Positions and the rigidity constraint
The cart is a rigid body with a reference point \(G\) (its geometric center, center of mass, or any convenient fixed point in the body).
Any other body point \(P\) has position
\[ \mathbf r_P(t) \;=\; \mathbf r_G(t) + \mathbf R(\theta(t))\,\mathbf r_{PG}, \tag{1} \]
where
- \(\mathbf r_G(t)\in\mathbb R^2\) is the world position of \(G\),
- \(\theta(t)\) is the body’s orientation angle,
- \(\mathbf r_{PG}\in\mathbb R^2\) is the constant body-fixed vector from \(G\) to \(P\),
- \(\mathbf R(\theta)\) is the 2×2 rotation matrix
\[ \mathbf R(\theta)= \begin{bmatrix} \cos\theta & -\sin\theta\\ \sin\theta & \ \cos\theta \end{bmatrix}. \]
Rigidity is encoded by \(\mathbf r_{PG}\) being time-invariant.
1.2 The derivative of a planar rotation
Consider a small time step \(\Delta t\). Define \(\Delta\theta = \theta(t+\Delta t)-\theta(t)\). Using the angle-addition identity,
\[ \mathbf R(\theta+\Delta\theta) = \mathbf R(\theta)\,\mathbf R(\Delta\theta). \]
For small \(\Delta\theta\),
\[ \mathbf R(\Delta\theta) = \begin{bmatrix} \cos\Delta\theta & -\sin\Delta\theta\\ \sin\Delta\theta & \ \cos\Delta\theta \end{bmatrix} \approx \begin{bmatrix} 1 & -\Delta\theta\\ \Delta\theta & 1 \end{bmatrix} = \mathbf I + \Delta\theta\,\mathbf J, \]
where \(\mathbf J=\begin{bmatrix}0 & -1\\ 1 & 0\end{bmatrix}\) is a 90° rotation (counterclockwise).
Thus,
\[ \mathbf R(\theta+\Delta\theta)-\mathbf R(\theta) = \mathbf R(\theta)\big(\mathbf R(\Delta\theta)-\mathbf I\big) \approx \mathbf R(\theta)\,\Delta\theta\,\mathbf J. \]
Divide by \(\Delta t\) and let \(\Delta t\to 0\) (so \(\Delta\theta/\Delta t \to \dot\theta(t)\equiv \omega(t)\)):
\[ \dot{\mathbf R}(\theta) = \lim_{\Delta t\to0}\frac{\mathbf R(\theta+\Delta\theta)-\mathbf R(\theta)}{\Delta t} = \mathbf R(\theta)\,\omega\,\mathbf J. \tag{2} \]
1.3 Velocity of a point
Differentiate (1):
\[ \dot{\mathbf r}_P(t) = \dot{\mathbf r}_G(t) + \dot{\mathbf R}(\theta(t))\,\mathbf r_{PG}. \]
Insert (2):
\[ \dot{\mathbf r}_P = \underbrace{\dot{\mathbf r}_G}_{\mathbf V_G} \;+\; \mathbf R(\theta)\,\omega\,\mathbf J\,\mathbf r_{PG}. \]
Because \(\mathbf R(\theta)\mathbf r_{PG} = \mathbf r_P-\mathbf r_G\) (from (1)), we get
\[ \boxed{\;\mathbf v_P(t) \;=\; \mathbf V_G(t)\;+\;\omega(t)\,\mathbf J\big(\mathbf r_P(t)-\mathbf r_G(t)\big)\;} \tag{3} \]
with \(\mathbf V_G(t)=\dot{\mathbf r}_G(t)\).
In 2D, \(\mathbf J\mathbf a = \hat{\mathbf k}\times\mathbf a\) (perpendicular in-plane rotation). Thus (3) is the planar form of
\[ \boxed{\;\mathbf v_P(t)=\mathbf V_G(t)+\omega(t)\,\hat{\mathbf k}\times\big(\mathbf r_P(t)-\mathbf r_G(t)\big)\;} \tag{3′} \]
where \(\hat{\mathbf{k}}\) is the unit vector perpendicular to the plane, \(\mathbf V_G\) the translational velocity of the body’s reference point and \(\mathbf v_i\) is the local velocity of an arbitrary point \(i\).
2) The instantaneous center of rotation (ICR)
If \(\omega(t)\neq 0\), the question arises for which point \(\mathbf r_C(t)\) does the body move as if it were purely rotating about \(C\)? That means the velocity of \(G\) should be the rotational velocity around \(C\):
\[ \mathbf V_G(t) \stackrel{!}{=} \omega(t)\,\mathbf J\big(\mathbf r_G(t)-\mathbf r_C(t)\big). \tag{4} \]
Solve (4) for \(\mathbf r_C\). Multiply both sides by \(\mathbf J^\top=-\mathbf J\) (since \(\mathbf J^\top \mathbf J = \mathbf I\)):
\[ \mathbf J^\top \mathbf V_G = \omega \,\mathbf J^\top \mathbf J(\mathbf r_G-\mathbf r_C) = \omega \,(\mathbf r_G-\mathbf r_C). \]
Rearranging yields:
\[ \boxed{\;\mathbf r_C(t) \;=\; \mathbf r_G(t)\;-\;\frac{1}{\omega(t)}\,\mathbf J^\top \mathbf V_G(t)\;} \quad\;\;(\mathbf J^\top=-\mathbf J). \tag{5} \]
In cross-product form, since \(\mathbf J^\top \mathbf v = -\mathbf J \mathbf v = \hat{\mathbf k}\times \mathbf v\) rotated the other way:
\[ \boxed{\;\mathbf r_C(t)=\mathbf r_G(t)-\frac{1}{\omega(t)}\,\hat{\mathbf k}\times \mathbf V_G(t)\;} \tag{5′} \]
This identifies the ICR from instantaneous translation and rotation.
Once \(C\) is known, the velocity of any point is also purely rotational about \(C\):
\[ \boxed{\;\mathbf v_P(t)=\omega(t)\,\mathbf J\big(\mathbf r_P(t)-\mathbf r_C(t)\big)\;} \tag{6} \]
(which is equivalent to (3) using (4)).
Special cases drop out immediately:
- \(\omega(t)=0\): the ICR “goes to infinity” → pure translation with \(\mathbf v_P=\mathbf V_G\).
- \(\mathbf V_G(t)=0\): the ICR is at \(G\) → pure rotation in place.
3) Newton–Euler Dynamics
So far we have kinematics. To relate to forces and torques, we derive the Newton–Euler relations in the plane to know where \(\mathbf V_G(t)\) and \(\omega(t)\) come from.
3.1 Linear momentum balance
Let the total external force at time \(t\) be \(\sum \mathbf F_i(t)\). By Newton’s second law,
\[ \frac{d}{dt}\big(m\,\mathbf V_G(t)\big) \;=\; \sum \mathbf F_i(t), \]
so
\[ \boxed{\;m\,\mathbf a_G(t) \;=\; \sum \mathbf F_i(t)\;},\qquad \mathbf a_G(t)=\dot{\mathbf V}_G(t). \tag{7} \]
3.2 Angular momentum balance
Let \(\sum \mathbf M_G(t)\) be the sum of pure external moments about \(G\), and let forces act at points \(\mathbf r_i(t)\). The angular momentum about \(G\) for a planar rigid body is \(I_G\,\omega(t)\), where \(I_G\) is the scalar moment of inertia about \(\hat{\mathbf k}\) through \(G\). Angular momentum balance gives
\[ \frac{d}{dt}\big(I_G \omega(t)\big) = \sum \big(\mathbf r_i(t)-\mathbf r_G(t)\big)\times \mathbf F_i(t)\;+\;\sum \mathbf M_G(t). \]
Hence
\[ \boxed{\;I_G\,\dot\omega(t) \;=\; \sum \big(\mathbf r_i(t)-\mathbf r_G(t)\big)\times \mathbf F_i(t)\;+\;\sum \mathbf M_G(t)\;}. \tag{8} \]
Additivity insight. (7) and (8) are linear: forces add to the net translation; torques (including those generated by off-center forces) add to the net rotation. Integrating \(\mathbf a_G(t)\) and \(\dot\omega(t)\) over time gives \(\mathbf V_G(t)\) and \(\omega(t)\), which feed the kinematics (3)–(6).
4) Wheels impose rolling constraints; inverse kinematics emerges
Consider wheel \(i\) mounted at a fixed body offset \(\mathbf r_{W_iG}\) relative to the cart. Its world position is
\[ \mathbf r_{W_i}(t)=\mathbf r_G(t)+\mathbf R(\theta(t))\,\mathbf r_{W_iG}. \tag{9} \]
Using (3), its center velocity is
\[ \mathbf v_{W_i}(t) = \mathbf V_G(t) + \omega(t)\,\mathbf J\big(\mathbf r_{W_i}(t)-\mathbf r_G(t)\big). \tag{10} \]
4.1 Ideal rolling (no lateral slip)
An ideal wheel can roll forward/backward but not sideways. Therefore, its steering angle \(\theta_i(t)\) must coincide with the direction of \(\mathbf v_{W_i}(t)\) (when \(\|\mathbf v_{W_i}\|>0\)):
\[ \boxed{\;\theta_i(t)=\operatorname{atan2}\!\big(v_{W_i,y}(t),\,v_{W_i,x}(t)\big)\;}. \tag{11} \]
The rolling speed along its axis is \(\|\mathbf v_{W_i}(t)\|\). If its physical wheel radius is \(R_i\), then the spin rate
\[ \boxed{\;\dot\phi_i(t)=\frac{\|\mathbf v_{W_i}(t)\|}{R_i}\;}, \tag{12} \]
with sign chosen to match the wheel’s forward sense.
When \(\mathbf v_{W_i}(t)=\mathbf 0\) (the wheel sits on the ICR), the steering angle is geometrically undefined but immaterial; the wheel need not spin.
4.2 Equivalent ICR-based form (clean geometry)
Using (6),
\[ \mathbf v_{W_i}(t) \;=\; \omega(t)\,\mathbf J\big(\mathbf r_{W_i}(t)-\mathbf r_C(t)\big), \tag{13} \]
so
\[ \|\mathbf v_{W_i}(t)\| \;=\; |\omega(t)|\,\|\mathbf r_{W_i}(t)-\mathbf r_C(t)\|. \tag{14} \]
The wheel axis must align with the tangent at \(\mathbf r_{W_i}\) about \(C\); hence (11) becomes
\[ \boxed{\;\theta_i(t)\,=\,\operatorname{atan2}\!\Big(\big[\mathbf J(\mathbf r_{W_i}-\mathbf r_C)\big]_y,\ \big[\mathbf J(\mathbf r_{W_i}-\mathbf r_C)\big]_x\Big)\;}. \tag{15} \]
And (12) becomes, via (14),
\[ \boxed{\;\dot\phi_i(t)\,=\,\frac{|\omega(t)|}{R_i}\,\|\mathbf r_{W_i}(t)-\mathbf r_C(t)\|\;}. \tag{16} \]
Equations (15)–(16) are the inverse kinematics (IK) for each wheel given the ICR and \(\omega(t)\).
5) Inputs and outputs
We now assemble the pipeline so that at each \(t\) we can compute wheel commands:
5.1 Inputs at time \(t\)
- ICR position \(\mathbf r_C(t)\in\mathbb R^2\) (in world coordinates).
- Angular velocity about ICR \(\omega(t)\in\mathbb R\).
- ICR translational velocity \(\mathbf V_C(t)\) (optional drift of the whole motion; if absent, set \(\mathbf V_C(t)=\mathbf 0\)).
- Cart pose \(\big(\mathbf r_G(t),\,\theta(t)\big)\) — needed to locate wheels.
- Wheel geometry \(\mathbf r_{W_iG}\) and radii \(R_i\).
5.2 From inputs to body twist
If the body rotates about \(C\) with \(\omega(t)\), then the velocity of any point is the sum of the rotation about \(C\) plus any drift \(\mathbf V_C(t)\). In particular, the reference point:
\[ \boxed{\;\mathbf V_G(t)=\omega(t)\,\mathbf J\big(\mathbf r_G(t)-\mathbf r_C(t)\big) + \mathbf V_C(t)\;}. \tag{17} \]
This is equivalent to (4) with an added drift term. We also retain \(\omega(t)\) as the body’s angular rate.
5.3 Wheel velocities and IK at time \(t\)
- Locate wheel \(i\): \(\mathbf r_{W_i}(t)=\mathbf r_G(t)+\mathbf R(\theta(t))\mathbf r_{W_iG}\).
- Its velocity via ICR + drift:
\[ \boxed{\;\mathbf v_{W_i}(t)=\omega(t)\,\mathbf J\big(\mathbf r_{W_i}(t)-\mathbf r_C(t)\big) + \mathbf V_C(t)\;}. \tag{18} \]
- Inverse kinematics outputs:
\[ \theta_i(t)=\operatorname{atan2}\!\big(v_{W_i,y}(t),\,v_{W_i,x}(t)\big),\qquad \dot\phi_i(t)=\frac{\|\mathbf v_{W_i}(t)\|}{R_i}. \tag{19} \]
If you prefer to not specify \(C\) directly, you may instead give the body twist \(\big(\mathbf V_G(t),\omega(t)\big)\) and compute \(C\) from (5′). Both parameterizations are equivalent when \(\omega(t)\neq 0\).
6) How dynamics drives these kinematics (time-indexed view)
If the cart is subject to known external forces \(\{\mathbf F_j(t)\}\) and moments \(\{M_j(t)\}\), then
\[ m\,\dot{\mathbf V}_G(t)=\sum \mathbf F_j(t),\qquad I_G\,\dot\omega(t)=\sum\big(\mathbf r_j(t)-\mathbf r_G(t)\big)\times \mathbf F_j(t)+\sum M_j(t). \tag{20} \]
Given \(\mathbf V_G(t_0),\ \omega(t_0)\) at an initial time \(t_0\), integrating (20) forward in time yields \(\mathbf V_G(t),\ \omega(t)\). From \(\mathbf V_G(t),\ \omega(t)\), recover \(\mathbf r_C(t)\) by (5′), and then wheel IK by (18)–(19).
Additivity clarified. Translational forces add to give \(\dot{\mathbf V}_G(t)\). Rotational torques add to give \(\dot\omega(t)\). At the kinematics level, the velocity of any point is the sum of translation and rotation contributions (3). These are different “sums” but both are linear, which is why composing translation and rotation works so cleanly in both dynamics and kinematics.
7) Practical notes that remove common sticking points
- When \(\omega(t)\to 0\): (5′) suggests \(C\) moves to infinity. Use the twist form (3) or (10) directly; i.e., \(\mathbf v_{W_i}\approx \mathbf V_G\) and all wheels align to a common direction.
- Wheel at (or near) the ICR: if \(\mathbf r_{W_i}\approx \mathbf r_C\), then \(\|\mathbf v_{W_i}\|\approx \|\mathbf V_C\|\). If also \(\mathbf V_C=\mathbf 0\), the wheel’s linear speed is near zero and the steering angle can be held at its last valid value (hysteresis in implementations).
- Nonholonomic constraint: ideal wheels forbid lateral slip, which we enforced by making the wheel axis coincide with \(\mathbf v_{W_i}\). If you must allow slight slip (e.g., caster dynamics), you can relax by adding a small lateral compliance or damping in dynamics before applying IK.
8) A compact “at time \(t\)” algorithm
Given inputs \(\mathbf r_C(t), \omega(t), \mathbf V_C(t)\), \(\mathbf r_G(t), \theta(t)\), wheel geometry \(\{\mathbf r_{W_iG}, R_i\}\):
- For each wheel \(i\): \(\mathbf r_{W_i}(t)=\mathbf r_G(t)+\mathbf R(\theta(t))\,\mathbf r_{W_iG}\).
- Wheel velocity: \(\mathbf v_{W_i}(t)=\omega(t)\,\mathbf J\big(\mathbf r_{W_i}(t)-\mathbf r_C(t)\big)+\mathbf V_C(t)\).
- Wheel IK outputs: \(\theta_i(t)=\operatorname{atan2}(v_{W_i,y}(t),v_{W_i,x}(t))\), \(\dot\phi_i(t)=\|\mathbf v_{W_i}(t)\|/R_i\).
- Optionally report the body twist for logging or control: \(\mathbf V_G(t)=\omega(t)\,\mathbf J(\mathbf r_G(t)-\mathbf r_C(t))+\mathbf V_C(t)\).
If instead you’re given the twist \(\big(\mathbf V_G(t),\omega(t)\big)\) rather than \(\mathbf r_C(t)\), compute \(\mathbf r_C(t)=\mathbf r_G(t)-\frac{1}{\omega(t)}\,\mathbf J^\top \mathbf V_G(t)\) when \(\omega(t)\neq 0\), then continue at step 1.