opencv Python Rodrigues

Question:

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?

Asked By: Alan Johnstone

||

Answers:

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.

Answered By: Christoph Rackwitz
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.