Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Okay, I just found my mistake, as expected, it was very easy:

The multiplication of quaternions is not cummutative. With respect to that, I just had to change the calculation of the quaternion from

q_equilibrium = tf.transformations.quaternion_multiply(q_relative, q_equilibrium)

to

q_equilibrium = tf.transformations.quaternion_multiply(q_equilibrium,q_relative)

If we change the order of the multiplication, we also change the frames which we want to rotate.

Okay, I just found my mistake, as expected, it was very easy:

The multiplication of quaternions is not cummutative. With respect to that, I just had to change the calculation of the quaternion from

q_equilibrium = tf.transformations.quaternion_multiply(q_relative, q_equilibrium)

to

q_equilibrium = tf.transformations.quaternion_multiply(q_equilibrium,q_relative)

If we change the order of the multiplication, we also change the frames which we want to rotate.

EDIT:

I also had to change from this:

q_relative = tf.transformations.quaternion_multiply(q_2, q_1_inv)

to this

q_relative = tf.transformations.quaternion_multiply(q_1_inv, q_2)