title: Differential wheeled robot
text: # Differential wheeled robot
  
  A differential wheeled robot is a mobile robot whose movement is based on two separately driven wheels placed on either side of the robot body. It can thus change its direction by varying the relative rate of rotation of its wheels and hence does not require an additional steering motion. Robots with such a drive typically have one or more castor wheels to prevent the vehicle from tilting.
  
  ## Details
  
  If both the wheels are driven in the same direction and speed, the robot will go in a straight line. If both wheels are turned with equal speed in opposite directions, as is clear from the diagram shown, the robot will rotate about the central point of the axis. Otherwise, depending on the speed of rotation and its direction, the center of rotation may fall anywhere on the line defined by the two contact points of the tires. While the robot is traveling in a straight line, the center of rotation is an infinite distance from the robot. Since the direction of the robot is dependent on the rate and direction of rotation of the two driven wheels, these quantities should be sensed and controlled precisely.
  
  A differentially steered robot is similar to the differential gears used in automobiles in that both the wheels can have different rates of rotations, but unlike the differential gearing system, a differentially steered system will have both the wheels powered. Differential wheeled robots are used extensively in robotics, since their motion is easy to program and can be well controlled. Virtually all consumer robots on the market today use differential steering primarily for its low cost and simplicity.
  
  ## Kinematics of Differential Drive Robots
  
  The illustration on the right shows the differential drive kinematics of a mobile wheeled robot. The variables are expressed using the following notation: X{\textstyle X} and Y{\textstyle Y} are the global coordinate system. Using the point midway between the wheels as the origin of the robot, one can define $X_B{\textstyle$ X_{B}} and $Y_B{\textstyle$ Y_{B}} as the locale body coordinate system. The orientation of the robot with respect to the global coordinate system is the angle φ{\textstyle \varphi }. The radius of the wheels is r{\textstyle r} and the width of the vehicle b{\textstyle b}. Assuming that the wheels are at any time in contact with the ground (there is no slip), the wheels describe arcs in the plane in such a way that the vehicle always rotates around a point (referred to as ICR{\textstyle ICR}⁣ - instantaneous center of rotation). The ground contact speed of the left wheel $v_L{\textstyle$ v_{L}} and the right wheel $v_R{\textstyle$ v_{R}} lead to a rotation of the vehicle by the angular velocity ω{\textstyle \omega }. Following the definition of angular velocity, one obtains:
  
  ${\begin{aligned}\omega \cdot (R+b/2)&=v_{R}\\\omega \cdot (R-b/2)&=v_{L}\\\end{aligned}}$
  
  Solving these two equations for ω{\textstyle \omega } and R{\textstyle R}, while the latter is defined as the distance from ICR{\textstyle ICR} to the center of the robot
  
  ${\begin{aligned}\omega &=(v_{R}-v_{L})/b\\R&=b/2\cdot (v_{R}+v_{L})/(v_{R}-v_{L})\\\end{aligned}}$
  
  Using the equation for the angular velocity, the instantaneous velocity $V$ of the point midway between the robot's wheels is given by
  
  $V=\omega \cdot R={\frac {v_{R}+v_{L}}{2}}$
  
  The wheel tangential velocities can also be written as
  
  ${\begin{aligned}v_{R}&=r\cdot \omega _{R}\\v_{L}&=r\cdot \omega _{L}\end{aligned}}$
  
  where $\omega _{R}$ and $\omega _{L}$are the left and the right angular velocities of the wheels around their axes. The robot kinematics in local body coordinates can thus be written as
  
  ${\begin{bmatrix}{\dot {x}}_{B}\\{\dot {y}}_{B}\\{\dot {\varphi }}\end{bmatrix}}={\begin{bmatrix}v\,{x}_{B}\\v\,{y}_{B}\\\omega \end{bmatrix}}\overbrace {=} ^{v=r\omega }{\begin{bmatrix}{\frac {r}{2}}&{\frac {r}{2}}\\0&0\\-{\frac {r}{b}}&{\frac {r}{b}}\end{bmatrix}}{\begin{bmatrix}\omega _{L}\\\omega _{R}\end{bmatrix}}$
  
  Using a coordinate transformation (Rotation of axes), the robot's kinematic model in global coordinates can finally be obtained
  
  ${\begin{bmatrix}{\dot {x}}\\{\dot {y}}\\{\dot {\varphi }}\end{bmatrix}}={\begin{bmatrix}\cos {\varphi }&0\\\sin {\varphi }&0\\0&1\end{bmatrix}}{\begin{bmatrix}V\\\omega \end{bmatrix}}$
  
  where $V$ and $\omega$ are the control variables.
  
  ### Differential Drive Controller
  
  One might face a situation where the velocity V{\textstyle V} and the angular velocity ω{\textstyle \omega } are given as inputs, and the angular velocities of the left $ω_L{\textstyle$ \omega _{L}}and right wheels $ω_R{\textstyle$ \omega _{R}} are sought as control variables (see figure above). In this case, the already mentioned equation can be easily reformulated. Using the relations R=V/ω{\textstyle R=V/\omega } and $ω_R=v_R/r{\textstyle$ \omega _{R}=v_{R}/r} in
  
  $\omega \cdot (R+b/2)=v_{R}$
  
  one obtains the equation for the angular velocity of the right wheel $ω_R{\textstyle$ \omega _{R}}
  
  $\omega _{R}={\frac {V+\omega \cdot b/2}{r}}$
  
  The same procedure can be applied to the calculation of the angular velocity of the left wheel $ω_L{\textstyle$ \omega _{L}}
  
  $\omega _{L}={\frac {V-\omega \cdot b/2}{r}}$
  
  ## Examples of differential wheeled robots
  
  * Pioneer, PeopleBot, PowerBot & PatrolBot- the ActivMedia Robotics mobile robots.
  * Armadillo, Robotican
  * Khepera and e-puck
  * Sbot
  * Alice
  * Roomba
  * RoboMow
  * Shonkbot, a minimal-cost, Arduino-based teaching robot
  * Thymio
  * Edison
  * Giraff
  * Big Trak
  * SCUTTLE An open-source payload-capable robot for hobby and university research.
  