From: Rosen Diankov <rosen.diankov@gm...>  20110428 04:03:57

Hi Kyle, This is an excellent question. Because the sign flip represents the same rotation, you are correct that there is a redudancy. What this means is that the jacobian can take you in two possible directions: along the shortest arc, or along the longest arc. The only way to determine the correct sign is to know the source quaterion and the destination quaterion. In CalculateRotationJacobian, the source quaternion is: qsource = Manipulator.GetEndEffectorTransform().rot The destination quaternion is something you have in your program, and it isn't passed into CalculateRotationJacobian. Therefore, you'll need to flip the signs right after CalculateRotationJacobian returns using: if( (qdestqsource).lengthsqr4() > (qdest+qsource).lengthsqr4() ) { mjacobian = mjacobian; // or the equivalent } We could overload CalculateRotationJacobian to take in a qdest. Do you think that will make things more clear? rosen, 2011/4/28 Kyle Strabala <strabala@...>: > Hello, > I'm trying to use the function "Manipulator.CalculateRotationJacobian" to do > some pseudoinverse control on my robot's endeffector, but I'm having > trouble. For the control, I use changes in the quaternion multiplied by the > pseudoinverse of the rotation jacobian to get necessary changes in the > joint angles. However, since quaternions are not unique I'm having trouble > determining the sign of the changes in the quaternion. One sign goes towards > my setpoint and the other goes away from it. > The "CalculateRotationJacobian" function calls > "CalculateActiveRotationJacobian" which uses a quaternion that I can't get, > so instead I use a quaternion which I calculate from > "Manipulator.GetEndEffectorTransform". The problem is that I have no way of > telling what sign the quaternion in CalculateRotationJacobian has, and thus > my quaternion often sends my endeffector in the wrong direction. > A few ideas: > 1) Am I missing some way of calculating the quaternion used > in CalculateRotationJacobian? > 2) Could the quaternion be changed to a unique vector? For example, always > having the w term positive? > 3) I could always calculate my own rotation jacobian from the > angularvelocityjacobian function and my own quaternion. > Thanks for any help! > Kyle >  > WhatsUp Gold  Download Free Network Management Software > The most intuitive, comprehensive, and costeffective network > management toolset available today. Delivers lowest initial > acquisition cost and overall TCO of any competing solution. > http://p.sf.net/sfu/whatsupgoldsd > _______________________________________________ > Openraveusers mailing list > Openraveusers@... > https://lists.sourceforge.net/lists/listinfo/openraveusers > > 