2

When the Rodrigues function is called with a rotation matrix as argument it provides 2 results.

I understand that the first item returned is the vector around which the rotation occurs and that the magnitude of the vector provides the angle of rotation. It seems that it provides a number (in radians) in the range (0,180) degrees for rotations covering (0,360) degrees, therefore there must be a way to determine the sign of the rotation. How do you do that.

As a supplimentary question, I understand that the second result is a Jacobian matrix. How do you use that?

Christoph Rackwitz
  • 11,317
  • 4
  • 27
  • 36
Alan Johnstone
  • 455
  • 1
  • 7
  • 24

1 Answers1

2

The rotation is always positive, and when it "needs" to be negative (equivalently, closer to 360 than 0 degrees), the vector is simply flipped to the other side, so now it can be positive.

There is the "right hand rule". Right hand grabs vector, thumb pointing along the vector. Fingers indicate positive rotation around vector.

Example: Place your (right) fist on the desk, thumb up. Going +90 degrees is a quarter turn counterclockwise (inward). Going -90 degrees is a quarter turn clockwise (outward)... or +90 degrees with your thumb pointing into the desk.

The Jacobian is a bunch of derivatives, a vector in output-space for each component of the input. It tells you how stable the calculation is, i.e. how easily perturbed the result is, were any of the elements of your input vector to fluctuate by a bit.

Jacobians also show up in robotics. You can use them for inverse kinematics, combined with a solver. Given the Jacobian of your "robot arm", a tool center point, and a target, some math involving a Jacobian tells you what joints to move (a little bit) in which way to get closer to the target. The Jacobian depends on the current pose (i.e. it's not a constant matrix), so you'd recalculate it all the time.

Christoph Rackwitz
  • 11,317
  • 4
  • 27
  • 36
  • Thank you for that. I am still not quite certain about the Jacobian. I know it is a bunch of 9 derivatives so I assume that the top row of 3 are the derivatives wrt the x cood of the vector. But what is changing? Is it the rotation about the world coord x,y and z axis – Alan Johnstone Aug 26 '22 at 09:07
  • docs say *"Optional output Jacobian matrix, 3x9 or 9x3, which is a matrix of partial derivatives of the output array components with respect to the input array components."* -- *what is changing?* what's changing is *one component* of the input vector or matrix, and the Jacobian tells you how that affects all the components of the result. I think a thorough introduction to Jacobians and partial derivatives is best left to textbooks and other resources. all I can do here is point you in the right direction (see links in answer) – Christoph Rackwitz Aug 26 '22 at 09:13