As you may know, robot kinematics is the study of motion without considering the forces that affect the motion, and robot dynamics is the study of the forces acting on a robot. In this section, we will discuss the kinematics of a differential robot.
Typically, a mobile robot or vehicle can have six degrees of freedom (DOF), which are represented as x, y, z, roll, pitch, and yaw. The x, y, and z degrees are translation, and roll, pitch, and yaw are rotation values. The roll movement of robot is sideways rotation, pitch is forward and backward rotation, and yaw is the heading and orientation of the robot. A differential robot moves along a 2D plane, so we can say it will have only three DOF, such as x, y, and theta, where theta is the heading of the robot and points along the forward direction of the robot.
The following figure shows the coordinate system of a differential-drive robot:
So how to control this robot? It has two wheels, right? So the velocity of each wheel determines the new position of the robot. Let's say V-left and V-right are the respective wheel velocities, (x, y, θ) is the standing position of the robot at time t, and (x', y', θ') is the new position at time t+ δt, where δt is a small time interval. Then, we can write the standard forward kinematic model of a differential robot like this:
Here are the unknown variables in the preceding equation:
R = l/2 (nl + nr ) / (nr - nl )
ICC = [ x-R sinθ, y+R cosθ ]
ωδt = (nr - nl ) step / l
nl and nr are encoder counts for left and right wheels. l is the length of the wheel axis and step is the distance covered by the wheel in each encoder ticks.
ICC stands for instantaneous center of curvature, and it is the common point for rotation of the robot wheels.
You can also refer the equations of inverse kinematics of mobile robotics from the following reference.
So we've seen the kinematics equations of this robot; the next stage is to simulate the robot.