Let's learn and implement the velociy of the robot first by calculating. We will also learn inverse calculation. We will calculate the velocity of the wheels by knowing the overall velocity of the robot. Our purpose is to send the velocity directly to the robot like rotating moving forward and backward.
All the motion in robot is done with the two motors we have. So we will control these two motors. Let's learn some mathematical tools to understand the relationship between rotational velocity of the two motors with the overall velocity of the robot.
Let's say that we want to move the robot with 0.5rad/s clockwise, then at should be speed of the two wheels?. We will solve this through kinematics.
Kinematics would help us to know the relationship between the rotational speed of the robot' motors with the overall velocity of the robot with the help of two sets of equations.
By knowing the speed of the wheels we will find the overall velocity of the robot is called Forward kinematics. And the equation let's us know rotational velocity of the wheels by knowing the overall speed of the robot is called Inverse kinematics.
Before looking in detail the forward and the inverse kinematic equations for a mobile robot. And so before even starting the study of the motion of the robot in the space as a function of the speed that is applied to its wheels, let's first see how can we express in a mathematical form the pose of a mobile robot in the bidimensional space?
What is the pose of a mobile robot?
We can simplify our mobile robot as an object that is restricted to move in a two dimensional plane. So assuming that we have a top down view of the robot, it will only be able to move on the x y plane.
Let's define a fixed reference frame called world.
So W and the problem of defining the pose of the robot in the two dimensional space converts to the problem of defining the position and the orientation of an object with respect to a fixed reference frame.
W so the one of the world. To further simplify this concept, let's introduce a new reference frame, this time a mobile reference frame that is attached to 2D robot. And so that moves as the robot moves.
This second reference frame is called R. This is a mobile frame since it moves along with the robot and for this reason it is called an inertial frame. As we can see, while the reference frame of the word W is fixed and remains fixed and therefore this is an non-inertial frame, the reference frame R instead moves along with the robot and that's why it's called inertial.
Thus the problem of defining the pose of a robot in the two dimensional space now becomes the problem of defining the position and the orientation of the reference frame. R With respect to the reference frame W. Having significantly simplified our problem, we can now intuitively say that we just need three variables to define the pose of the frame. R With respect to the frame.
W So the pose is defined by two variables that represents the x y coordinates of the center of the frame. R with the respect to the center of the frame W and the angle theta that represents the orientation of the frame. R with respect to the frame w.
Together, these three variables express the pose of one reference frame with respect to another frame. And therefore, since we consider the frame R to be attached to the robot and to move with it, these three variables also represents the pose of the robot as it moves in the two dimensional space.
Although we have highly simplified our problem and we reduce it to the calculation of just three variables, we can simplify it further and break down the problem into two separate problems.
The pose, in fact, can be considered as the combination of two elementary components of the motion that are the translation and the rotation.
So we will separately study the position of the robot that is defined by the x y components of the pose and the orientation of the robot that is defined instead by the theta angle, by the theta component of the pose.
Then, after studying each component separately, we will combine the result into the more general roto translation