![]() |
Thanks for stopping by! Please note that this page will not be updated anymore and all content has been moved into an open-source textbook. The books is available open-source on github, compiled as PDF, and in print on Amazon.com
|
In order to plan a robot’s movements, we have to understand the relationship between the actuators that we can control and the robot’s resulting position in the environment. For static arms, this is rather straightforward: if we know the position/angle of each joint, we can calculate the position of its end-effectors using trigonometry. This process is known as forward kinematics. If we want to calculate the position each joint needs to be at, we need to invert this relationship. This is known as inverse kinematics.
The goals of this lecture are
- to introduce the forward kinematics of mobile robots
- show how solutions for the inverse kinematics for both static and mobile robots can be derived
- provide an intuition on the relationship between inverse kinematics and path-planning
It should be clear by now, that for a mobile robot, not only traveled distance per wheel matters, but also the speed of each wheel as a function of time. Lets introduce the following conventions. We establish a coordinate system on the robot and express its speed
as a vector
. Here
and
correspond to the speed along the x and y directions, whereas
corresponds to the rotation around the imaginary z-axis, that you can imagine to be sticking out of the ground. We denote speeds with dots over the variable name, as speed is simply the derivative of distance. We will also establish a world coordinate system
, which is known as the inertial frame by convention. Think about the robot’s position in
real quick. It is always zero, as the coordinate system is fixed on the robot. Therefore,
is the only interesting quantity here and we need to understand how speeds in
map to positions in
, which we denote by
. These coordinate systems are shown in the figure to the right. Notice that the positioning of the coordinate frames and their orientation are arbitrary. Here, we chose to place the coordinate system in the center of the robot’s axle and align
with its default driving direction.
Adding the rotation speeds up (with the one around the right wheel being negative based on the right-hand grip rule), leads to
Putting it all together, we can write
Inverse Kinematics
The main problem for the engineer is now to find out how to chose the control parameters to reach a desired position. This problem is known as inverse kinematics. Solving the forward kinematics in closed form is not always possible, however. It can be done for the differential wheel platform we studied above. Lets first establish how to calculate the necessary speed of the robot’s center given a desired speed in world coordinates. We can transform the expression
by multiplying both sides with the inverse of
:
which leads to . Here
which can be determined by actually performing the matrix inversion or by deriving the trigonometric relationships from the drawing. Similarly, we can now solve
for ,
. (do this!) You will now see that your kinematic constraints actually render some desired velocities, namely those that would lead to non-negative
unfeasible.
Inverse Kinematics of a Manipulator Arm
We will now look at the kinematics of a 2-link arm that was introduced in last week’s lecture. Similar to a the process of calculating the required wheel-speed for achieving a desired speed of the local coordinate system, we need to solve the equations determining the robot’s forward kinematics by solving for and
. This is tricky, however, as we have to deal with complicated trigonometric expressions.
You can give it a shot using Mathematica using the code below. For simplicity, and
are assumed to be 1.
sol = Solve[Sin[α + β] + Sin[α] == x
&& Cos[α + β] + Cos[α] == y, {α, β}];
min = sol /. {x -> 1, y -> 1}
This will solve for and
for x=1, y=1. The solutions for this case are obviously
and
. (Think about this real quick.) The solutions to this problem are not nice, however, with 8 complicated expressions, 6 of which yielding complex solutions,such as
and
As such solutions quickly become unhandy with more dimensions, you can calculate a numerical solution using an approach that we will see is very similar to path planning in mobile robotics. For this, you need to plot the distance of the end-effector from the desired solution in configuration space. To plot this, you need to solve the forward kinematics for every point in configuration space and use the Euclidian distance to the desired target as height. This is shown below and can be accomplished using the commands
x = 1; y = 1;
Show[Plot3D[ Sqrt[(Sin[α + β] + Sin[α] - x)^2 + (Cos[α + β] + Cos[α] - y)^2], {α, -π/2, π/2}, {β, -π, π}], ListPointPlot3D[{α, β, 0.1} /. {min}]]
The key point here is that the inverse kinematics problem is equivalent to a path-planning problem in the configuration space. How to find shortest paths in space, that is finding the shortest route for a robot to get from A to B will be a major part of this class.
Take-home lessons
- For calculating the forward kinematics of a robot, it is easiest to establish a local coordinate frame on the robot and determine the transformation into the world coordinate first.
- Forward and Inverse Kinematics of a mobile robot are performed with respect to the speed of the robot and not its position.
- For calculating the effect of each wheel on the speed of the robot, you need to consider the contribution of each wheel independently.
- Calculating the inverse kinematics analytically becomes quickly infeasible. You can then plan in configuration space of the robot using path-planning techniques.
Great lecture! You really made it easy to comprehend. Just wanted to let you know I think there’s a typo in the Forward Kinematics section, just before you first introduce the T(theta) matrix. In the transform equation ( XIr = T(theta)*XIi ), the inertial speed vector and robot speed vector are switched, just the subscripts.
Thanks for catching this!
[…] that cause the motion. So far, we have considered the forward kinematics of wheeled mechanisms and simple arms. The goals of this lecture are […]