Here we have our familiar 2 link robot in the configuration where Q2 is greater than 0. And over laid on that is the robot with the same end effector position but Q2 is now less than 0. These are the two possible solutions for this robot in order to achieve this particular endpoint pose. We might be interested in how the robot moves from one configuration to the other. It's an interesting motion for the robot because the end point position is exactly the same but the joint angles Q1 and Q2 need to follow some interesting trajectory to move from the first configuration to the second.
Here's a more vivid example in three dimensions. This shows a PUMA 560 robot moving to grab a ball. Now we can see that the robot is making that grasp in either the left hand configuration or the right handed configuration. We might ask the question, "How does the robot move from a left handed configuration to a right handed configuration? How do we compute the trajectory that allows that to happen?"
Once again we're going to define a model for our PUMA 560 robot. Load that into the workspace. We have the robot object. Say here. The workspace variable p560. I'm going to define a pose that I'd like my robot to adopt. And let's give him by this homogeneous transformation matrix here. I'm going to define a new workspace variable that represents the set of join angles required by the robot to adopt this particular pose in the left handed configuration. I use the ikine6s method, pass in the homogeneous transformation representing the desired pose and the switch L to indicate the robot is to be in a left handed configuration and this is the required set of joint angles. I can do the same thing for a right handed configuration. I'm going to create a new workspace for a variable called QR.
Let's have a look at these particular robot configurations. I can plot the configuration QL. And it looks like this in stick figure representation. Let me look at that from a different vantage point. And it looks like this for the right handed configuration. Now getting a little bit ahead of ourselves, what I'm going to do is to create a trajectory and show the robot moving from the configuration where all those joint angles are equal to 0 to the left handed pose. It's going to do that in 50 time steps.
Now the result of the jtraj function and we'll talk more about this later in the lecture is a matrix with 50 rows and 6 columns. Each row corresponds to particular time step. Row 1 is the first point of the trajectory. Row 50 is the last point of the trajectory. Each column represents a particular joint angle.
Now the robotic tool box can easily deal with trajectories. So I plot but instead of a particular joint angle I plot a trajectory. We see the robot now moving from 0 angle configuration to a left handed configuration. It can change this two, move from the 0 angle configuration to the right handed configuration, and once again I can plot that. See the robot doing a quite convoluted looking motion. Finally what I can do is show the robot moving from the left handed configuration to the right handed configuration.
And this is an interesting motion because the robot starts and ends the trajectory with its end effector in exactly the same pose. But in between the robot is going to go through some contortions in order to change from being a left handed robot to a right handed robot. Compute the trajectory and then we're going to have a look at that. Interesting to see what the robot does here. You can see that the motion is quite complex end effector ends up just where it started. Sometimes in a manufacturing scenario, the robot does exactly need to change from being left handed to being right handed. Perhaps it needs to access objects at the extreme ends of its workspace and needs to change configuration.
So these configuration change motions, there is no net over all the motion of the robot but while it's doing the configuration change, there can be some quite wild and exciting joint motions. You need to be a little bit careful when you command such a motion that the robot is not going to collide with anything in its workspace.
A characteristic of inverse kinematics is that there is often more than one solution, that is, more than one set of joint angles gives exactly the same end-effector pose.
This content assumes an understanding of high school level mathematics; for example, trigonometry, algebra, calculus, physics (optics) and experience with MATLAB command line and programming, for example workspace, variables, arrays, types, functions and classes.