In this robotics and control engineering tutorial, we explain how to develop a simple discrete-time model of a mobile robot that can be used for the development of algorithms for localization, Simultaneous Localization And Mapping (SLAM), and dead reckoning.
We develop a discrete-time kinematics model and we explain several important aspects of this model. This model is used in our other tutorials for the development of robotics algorithms. This is arguably the simplest possible model of a mobile robot. For simplicity and clarity of this tutorial, we focus on a differential drive mobile robot introduced in our previous tutorial given here. Consequently, we strongly suggest to the reader of this tutorial to first thoroughly read and understand the material presented in our previous tutorial.
Although simple, the model developed in this tutorial can still be used in practical applications and the modeling ideas presented in this tutorial can be used as an inspiration to develop models of robots with various configurations.
We use two approaches to develop the discrete-time kinematics model. Both approaches result in the same discrete-time model. The first approach is based on the direct discretization of the continuous-time model of the robot kinematics. The second approach uses simple trigonometry and physical intuition to develop the model. The YouTube tutorial accompanying this tutorial is given below.
Continuous-Time Model of Mobile Robot
The figure below shows a graphical representation of a differential drive robot introduced in our previous tutorial given here.
The robot consists of the robot base with two active (actuated) wheels and a third passive caster wheel. The third passive caster wheel provides the stability of the robotic platform (passive means that is not actively actuated, however, the wheel can still move around two perpendicular axes). This third wheel is not shown on the graph for clarity. We introduce the following quantities:
- Inertial coordinate system
– (denoted by uppercase letters and ). This coordinate system is fixed. - Body coordinate system
– (denoted by uppercase letters and ). The body coordinate system is also called the body frame. This coordinate system is rigidly fixed to the robot body or robot base. Its center is at the point . Usually the point is the center of the mass or the center of the symmetry of the robot body or the robot base. The body coordinate system moves together with the robot. - The coordinates
and are horizontal and vertical positions of the body coordinate system – with respect to the inertial coordinate system – . - The angle
is the angle that the body coordinate system makes with the axis of the inertial coordinate system. That is, the angle is the rotation of the body coordinate system with respect to the inertial coordinate system. The angle is called the orientation angle or angular orientation. This angle is also called the bearing angle (or simply bearing) or heading angle (or simply heading). Since the body coordinate system is firmly attached to the robot body the angle is the rotation of the robot body. is the instantaneous velocity of the center of the body frame. is the instantaneous angular velocity of the robot.
Next, we need to define what is a robot pose. The (robot) pose is the vector
(1)
The (robot) pose completely defines the position (location) and orientation of the robot with respect to the fixed inertial frame
The precise knowledge of the robot pose is important for a number of reasons. First of all, it determines the precise location and orientation of the robot in space. Secondly, the robot pose is used for feedback control. Finally, robot pose information is used in other robotic algorithms, such as path planning, obstacle avoidance, and SLAM algorithms.
In our previous tutorial given here, we derived the continuous-time kinematics model describing the robot motion
(2)
This model relates the instantaneous velocity
Derivation of the Robot Model by Using Discretization
Here, we obtain the robot model by using the forward Euler discretization. By using the forward Euler method, we discretize the time derivatives of
(3)
where
(4)
where
From (4), we obtain the discretized kinematics model of the robot
(5)
Next, we need to observe the following
- The product
is the distance traveled in the direction of the velocity vector (the velocity vector is actually determined by the intensity given by and direction determined by the angle ). It should be kept in mind that the velocity vector is constant between the time instant and . The distance traveled between the time instant and is denoted by(6)
- Since
is the angular velocity, the product is the rotation angle of the robot body between the discrete-time instant and . We denote this angle by(7)
Finally, by using (6) and (7), the final discretized model of the robot kinematics takes the following form
(8)
Derivation of the Robot Model by Using Trigonometry and Physical Intuition
First, let us analyze the discrete-time model (8) obtained by using the forward Euler method. If we ignore the last equation in (8), the resulting two equations
(9)
describe the translation of the robot body along the direction of the instantaneous velocity vector, where the orientation angle
(10)
then, this equation describes the rotation for the angle of
Let us not use this principle to rederive the kinematics model (8) by using a more intuitive approach that does not explicitly rely upon the model discretization.
We formally decompose the motion of the robot from the starting point (at the discrete-time
- From the starting point
(location at the discrete-time instant ) to the endpoint (location at the discrete-time instant ), the robot moves along a straight line. That is, during the motion from the point to the point , the orientation angle is constant, and the position coordinates and are changing. - At the point
, the orientation angle is changed, such that the orientation becomes .
This is just a formal mathematical decomposition of the motion, since in practice, the actual motion between the two points might not look like this. This is an approximation of the motion that enables us to mathematically analyze the geometry and kinematics of motion. However, if the time interval
To repeat, from the mathematical point of view, the motion is decomposed into a series of straight-line motions and orientation changes. Let us illustrate this with the example shown in the figure below.
The goal is to move from the point
In step 2, we move from the point A to the point
In step 3, we adjust the orientation of the robot for the angle
In step 4, we move along the straight line from the point
Next, we develop the kinematics model of the robot that mathematically describes this motion. Consider the figure shown below.
Here, we remind the reader that
(11)
where
(12)
From the discrete-time instant
(13)
These equations describe the location of the robot at the time instant
In the endpoint, we perform the rotation for the angle
(14)
By combining (13) and (14), we obtain the final kinematics model of the mobile robot
(15)
That is precisely the kinematics model (8) obtained by using discretization.
Important Remarks About the Derived Model
Here, for clarity, we repeat the derived model
(16)
Usually, the traveled distance
(17)
where
(18)