# Understanding inverse kinematics

This topic is 2975 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hey guys !

After having surfed the net for a good day, I think I'm closing in on a solution for inverse kinematics. For a system of revolute joints, I calculate the jacobian matrix as suggested here.

Now, it seems that I have the option of using the transpose of this matrix instead of its pseudo-inverse (which seems like a really nice alternative). What I don't understand is in the next step where I'm supposed to calculate the angular change for each joint, it seems I should calculate the dot product for one row in the jacobian and the distance between the end effector and goal point. This to me sounds like a 1x6 vector in the jacobian and a 1x3 vector, what is it I'm missing here?

Many thanks for any help !

##### Share on other sites
There are a couple inverse kinematics problems. In one you want to set the orientation (position + rotation) of the end-effector; in another you just want to set the position. For simplicity I'll talk like it's the second problem.

The forward kinematic map takes you from N joint angles to a point in 3-space. It's a map from R^N to R^3. So the Jacobian is 3xN. Denote it J.

Now, at each step, you compute the position error. This is in R^3; denote it e. You'll in essence be exerting a proportional force on the end-effector.

The quantity J^T e is the resulting torques at the joints. This multiplication makes sense: J^T is Nx3, e is 3x1; you get an Nx1 vector.

Now you move your joint-space position a little in the J^T e direction, and repeat.

##### Share on other sites
Thanks for the response Emergent :)

I'll try to organize my subsequent curiosity into three questions:

1. There are so many terms and different techniques to this that I've probably got a lot of things confused. I've been taught that the jacobian is a Nx6 matrix, which in the case of a revolute joint system is composed of columns
[ k x d   k ]T

where
k = joint hinge alignment
d = distance from joint to end effector
for each joint.
I read that there are at least two types of jacobian, this one would be a geometric one and then there would be an analytical one. Does this relate to what you mentioned about the two types of problems (position + rotation and simply position)?

2. Assuming I've got the jacobian right, I would then be able to get JT and I wonder is this really a simple transpose of the jacobian (flipping it around) or is it actually a new matrix derived by calculating the torque vector for each joint?

3. Lastly, I've realized that the torque t for a given joint can be calculated as
[ k x d   k ][ Fe Ne ]T

where
Fe = some kind of velocity vector for the end effector
Ne = some kind of rotation vector for the end effector
I assume that Fe is the distance the end effector has moved from one step to another, but I don't quite understand what the Ne vector is all about.

Sorry about this textual mess, I really think you can help me understand this thing once and for all and I really appreciate it ! :)

##### Share on other sites
Quote:
 Original post by Vanderry1. There are so many terms and different techniques to this that I've probably got a lot of things confused. I've been taught that the jacobian is a Nx6 matrix,

Are you sure you don't mean 6xN? ((# of Rows) x (# of Columns)).

If not, then maybe you're working with row vectors where I'm working with column vectors.

The number is "6" if you're doing IK with both position and orientation and "3" if it's just position (these are the dimensions of the tangent bundles of SE(3) and R^3, respectively).

Quote:
 I read that there are at least two types of jacobian, this one would be a geometric one and then there would be an analytical one.

If this means what I think it does, then it should be the same either way. You can slog through taking derivatives, or you can compute some cross products; either way you get the same matrix. So really the cross products are the derivatives; it's just not obvious that this is the case at first.

Quote:
 Does this relate to what you mentioned about the two types of problems (position + rotation and simply position)?

No... but I think the earlier part of my post about "6" vs. "3" answers this.

Quote:
 2. Assuming I've got the jacobian right, I would then be able to get JT and I wonder is this really a simple transpose of the jacobian (flipping it around)

Yes.

Quote:
 calculating the torque vector for each joint?

You're just calculating a scalar for each joint. You have N joints and N scalars; these get stacked up in a single N-dimensional "torque vector."

##### Share on other sites
Quote:
 Original post by EmergentAre you sure you don't mean 6xN? ((# of Rows) x (# of Columns)).

Yeah, my mistake. I've got a 6xN matrix and from there I've seen 2 ways of calculating the torque (or angular change) for each joint.

ti = JiT · (goal point - end effector)
ti = [ ki x di ki ][ Fe Ne ]T

I suspect they both mean pretty much the same, but in the first case what I see is dot product between a 1x6 vector and a 1x3 vector which doesn't make sense to me.

In the second example, at first glance it seems like matrix multiplication between a 1x6 and 6x1 matrix which seems reasonable. Then I read that Fe is the force and Ne the torque applied to the end effector. I can guess that Fe is the velocity vector for the end effector as it approaches the target, but if Ne is the torque, doesn't that make it a scalar?

Sorry if I seemed to repeat my questions.

##### Share on other sites
Quote:
 Original post by Vanderryti = JiT · (goal point - end effector)ti = [ ki x di ki ][ Fe Ne ]TI suspect they both mean pretty much the same, but in the first case what I see is dot product between a 1x6 vector and a 1x3 vector which doesn't make sense to me.

Oh! I see the problem.

"goal point - end effector" is a vector that points in the direction you want to go... in what space?

If it's in R^3, then you should be using the 3xN Jacobian (the one for the R^N-->R^3 kinematic map), not the 6xN Jacobian (the one for the R^N-->SE(3) map). This is just the 6xN Jacobian with the last three rows cut out.

If it's in SE(3) -- i.e., you also have a goal orientation for the end-effector -- then you need to be more precise about what you mean by "goal point - end effector," because, really, it makes no sense to subtract points in SE(3) from one another. What does make sense is to compute the versor from one point to another (this is just the tangent vector at the current point to the shortest geodesic joining it to the goal point in SE(3)).

So, do you care about the orientation of the end-effector?

##### Share on other sites
Aha, the pieces are coming together. Yeah, I'm working in 3D space. I guess the orientation of the end effector doesn't really matter that much, as long as the joints in the chain maintain their rotational constraints. On the other hand it doesn't sound too complicated and I can certainly see when it could come in handy to control the end effector orientation.

It's a shame it's not easier to express math more clearly in plain ASCII text. I'm not entirely sure what the SE(3) expression means but let's say I'm interested in reaching the goal point with a certain orientation in the end effector. This would have to be a 1x6 matrix, right?

I couldn't help but paste the explanatory image I was provided with, in case it's any hint to my confusion. Is there any useful information in it to help obtain the versor?

I have a feeling these might be my last questions, hope I haven't kept you away from something important ^^

##### Share on other sites
Quote:
 Original post by VanderryI'm not entirely sure what the SE(3) expression means

"SE(3)" refers to the Special Euclidean Group. It's written in text, just like that, "SE(3)," so ASCII is no limitation.

A point Q in SE(3) is a pair Q=(p,R), where p is a 3-vector and R is a 3x3 rotation matrix. The set of rotation matrices, by the way, is called SO(3) (for "Special orthogonal group").

Quote:
 Is there any useful information in it to help obtain the versor?

Given two two points Q1=(p1,R1), Q2=(p2,R2) in SE(3), the versor at Q1 pointing towards Q2 is the pair (v, w), where

v = p2 - p1

and

w = logSE3(R2 R1^T)

where logSE3 denotes this.

##### Share on other sites
Quote:
 Original post by VanderryIt's a shame it's not easier to express math more clearly in plain ASCII text.

See the post at the top of this forum: here

1. 1
Rutin
46
2. 2
3. 3
4. 4
5. 5
JoeJ
19

• 11
• 15
• 9
• 10
• 13
• ### Forum Statistics

• Total Topics
633004
• Total Posts
3009840
• ### Who's Online (See full list)

There are no registered users currently online

×