Inverse kinematics: Defining a Jacobian of rotation

In summary, the conversation discusses an inverse kinematics problem in the context of video game development. The speaker has an algorithm that solves the basic IK equation for a chain of rigid bodies connected by joints. They have successfully extended their solver to include tip rotation, but have encountered some difficulties in finding the Jacobian matrix for the joint chain. After exploring various methods, including Euler's "generator of rotation", they realize their mistake in using linear velocity instead of angular velocity. They also discover that their solvers can handle rectangular right-hand sides.
  • #1
aubrey.r.jones
2
0
I'm working on an inverse kinematics problem (I make video games), and I'm reaching a bit beyond my education.

Right now, I've got an algorithm that solves the basic IK equation for a chain of rigid bodies connected by joints by approximately inverting ##J\Delta\theta = e##. Where ##\theta## are the joint parameters, ##J## is the Jacobian matrix of position for my joint chain, and ##e## is the offset vector between the current tip position and the target tip position. The Jacobians for each of the joints is a simple 3d vector, which is a pretty good approximation of the positional derivative. I approximate the solution with a least-squares SVD solver (and I actually solve a damped version of that equation, but I don't believe that's relevant). This all works beautifully.

This weekend I decided to extend my IK solver to also target a tip rotation. This has gone less well, and I need some help.

I have ##i## joints, each with free parameter ##\theta## which encodes an angle of rotation around fixed axis ##a##. ##R_{i}## is the rotation matrix created by the usual angle/axis method for joint ##i##. To find the rotation of the chain tip ##R_{s}##, I concatenate ##R_{1...i}##. This works fine, as I use it in my integration step.

Now, to find the Jacobian matrix of my joint chain. From the IK literature, I believe I'm looking for $$J(\theta) = (\frac{\partial R_{s}}{\partial \theta})_i$$
First I tried taking the partial derivative of my angle/axis formula. Here my lack of education shows itself, as I don't know how to say what's wrong with that answer. As far as I can tell, the Jacobian approximation assumes that scaling the joint's Jacobian column is approximately equivalent to varying ##\theta##. If the matrix has a bunch of ##\cos\theta## terms, I don't think I can just dump it in a vector to be scaled by ##\Delta\theta##.

Then, after exhaustive search, I found Euler's "generator of rotation". After playing with it in maxima for a little bit, and comparing it to the position Jacobians in my reference papers, I really think this is the right thing. It encodes the fixed plane of rotation, and for small changes in angle is an okay approximation for the change in rotation. And if I leave out the identity matrix, and deal only with the skew-symmetric part, it scales linearly with ##\theta##, and is manipulated in a plausible way by matrix operations. And it looks a little like a cross product, which also makes me like it.

So I spent today implementing the code necessary to make it work. But I made a mistake. I assumed I could make ##J(\theta)## a (4,##i##*4) matrix, and that my ##e## could be a 3d pseudo-transform! It can't! I mean, I still think that it's a reasonable approximation of the solution, but my numerical solvers can't do anything with it. They need a vector for their right-hand side. And so ##J(\theta)## needs to be a (6,##i##) matrix--six degrees of positional freedom, by ##i## joints.

This means that I need to turn my generators of rotation into a vector some how. I know of quaternions. But I don't see how to encode an infinitesimal rotation as a quaternion. And I don't think a quaternion is going to behave in any meaningful way when it's mutilated by the SVD solver.

Could somebody point me in the right direction? Or, tell me that I'm barking up the wrong tree?
 
Physics news on Phys.org
  • #2
Alright, I'm quite embarassed now by this question.

I've been solving in linear velocity the whole time, not position. I think it got in my head that it was position since the algorithm iterates to converge on a position. Similarly, it wasn't obvious to me because it's "velocity" parameterized by ##\theta## instead of time.

So the rotational analogue is angular velocity. Which is vector valued, and fits right into my Jacobian matrix. Duh. Although, given the relationship between the skew-symmetrical matrix, the generator of rotation, and the angular velocity, I was on the right track.

Also, my solvers of *course* work with rectangular right-hand sides. It's just a 4x24 matrix times a 9x1 matrix isn't a 4x4 matrix. Which should have tipped me off that my math was incorrect.
 

Related to Inverse kinematics: Defining a Jacobian of rotation

1. What is inverse kinematics?

Inverse kinematics is a mathematical method used to determine the joint parameters of a robotic arm or other mechanism in order to achieve a desired end-effector position. It involves working backwards from the desired position to calculate the required joint angles and positions.

2. What is a Jacobian in inverse kinematics?

A Jacobian is a matrix that relates the joint velocities of a robotic arm to the velocities of its end-effector. In other words, it describes how changes in the joint angles affect the position and orientation of the end-effector.

3. Why is a Jacobian needed in inverse kinematics?

A Jacobian is necessary in inverse kinematics calculations because it allows us to solve for the joint velocities that will achieve a desired end-effector position. Without it, the inverse kinematics problem would be much more complex and difficult to solve.

4. How is the Jacobian of rotation defined?

The Jacobian of rotation is defined as the partial derivative of the end-effector's orientation (typically represented by a rotation matrix) with respect to the joint angles. It represents the relationship between changes in joint angles and changes in the orientation of the end-effector.

5. What are some applications of inverse kinematics?

Inverse kinematics is commonly used in robotics, animation, and video game development to control the movement of limbs and other mechanisms. It is also used in biomechanics to study human and animal movement, as well as in medical imaging to improve the accuracy of procedures such as radiation therapy.

Similar threads

  • Special and General Relativity
Replies
8
Views
1K
Replies
2
Views
673
  • Differential Equations
Replies
11
Views
2K
Replies
7
Views
305
  • Advanced Physics Homework Help
Replies
4
Views
874
  • General Math
Replies
11
Views
1K
Replies
1
Views
66
Replies
5
Views
2K
Replies
6
Views
1K
  • Introductory Physics Homework Help
Replies
1
Views
390
Back
Top