Differential Mobile Robot Kinematics
Skills: Kinematics, trajectory generation, MATLAB
Demo:
This project simulates a 2D differential mobile robot following a defined trajectory.
Equation of motion
Consider a mobile robot in the world frame of reference $(X_w,Y_w)$. The robot is at position $(x,y)$ with respect to its center of mass. The robot has width of $2b$ and wheel radius of $2R_l$ and $2R_r$, left and right respectively. The angular velocity of the left and right wheels are $\dot{\phi}_l$ and $\dot{\phi}_r$ repectively. The robot’s frame, linear velocity, angular postion, angular velocity of the robot about its center is given by $(X_r,Y_r)$, $v$, $\theta$, $\omega$ respectively.
The pose of the robot is denoted by \(\xi = [x, y, \theta]^T\)
$x, y, \theta$ needs to be determined in terms of $\dot{\phi}_{l,r}$.
\[\dot{\theta} = \omega\] \[\dot{x} = vcos\theta\] \[\dot{y} = vsin\theta\]- The above equation can be written in terms of rotation matrix in the $(X_w,Y_w)$ plane denotated as shown below;
- if the robot is said to roll without slipping $V_A = R_r\dot{\phi_r}$, $V_B = R_l\dot{\phi_l}$
but $V_C = V$. adding and substracting both terms in equation (2) we obtain
\[v = \frac{R_r}{2}\dot{\phi_r} + \frac{R_l}{2}\dot{\phi_l}, \quad \omega = \frac{-R_r}{2b}\dot{\phi_r} + \frac{R_l}{2b}\dot{\phi_l}\]This can further be expressed in matrix form as
\[\begin{bmatrix} v\\ \omega \end{bmatrix} = \begin{bmatrix} \frac{R_r}{2} & \frac{R_l}{2} \\ \frac{-R_r}{2b} & \frac{R_l}{2} \end{bmatrix} \begin{bmatrix} \dot{\phi_r}\\ \dot{\phi_l} \end{bmatrix} \tag{3}\]- Finally, combining equation (1) and (2) the differential forward kinematics of the mobile robot is obtained as shown in equation (4)