Page 1 of 1

The crazyflie's kalman filter estimated quaternion show opposite sign with the quaternion of Optitrack?

Posted: Tue Jun 29, 2021 1:06 am
by DarkKnight
Hello,

According to the documentation of crazyflie(https://www.bitcraze.io/documentation/s ... te-system/) and motion capture system(Optitrack), they are both right-hand Z-up coordinate. Therefore, I use scf.cf.extpos.send_extpose() function send the position and quaternion of Optitrack into crazyflie's kalman filter directly.

I have done one flight test(I grab the crazyflie, and then move and rotate it) and logged the stateEstimate data from kalman filter and Optitrack. The position from Optitrack and estimated position works well(they are similar).

I converted the quaternion data of the Optitrack into euler angle, and then compared with kalman filter estimated euler angle. Under this case, pitch angle shows a opposite sign(see subfigure3 and subfigure6 in the attached figure). I have noticed thathttps://www.bitcraze.io/documentation/s ... te-system/: For crazyflie, roll and yaw are clockwise rotating around the axis looking from the origin (right-hand-thumb), and pitch are counter-clockwise rotating around the axis looking from the origin (left-hand-thumb). So is my experimental result normal?

However, all four quaternion component show a opposite sign(see subfigure2 and subfigure5 in the attached figure). Is this reasonable? what kind of operation for Optitrack's quaternion so that I can make it compatible with crazyflie's unusual Euler angle definition(note:pitch are counter-clockwise rotating around the axis looking from the origin (left-hand-thumb).

Thanks in advance!

Re: The crazyflie's kalman filter estimated quaternion show opposite sign with the quaternion of Optitrack?

Posted: Tue Jul 06, 2021 12:53 pm
by kimberly
Sorry for the late reply!

It is a bit unclear what you are exactly are asking... we don't work with optitrack ourselves so we can not confirm for you if your results look okay. The important thing, is to send the ext_pos in the same coordinate system as the coordinate system that we declare on our page.

Quaternions are usually difficult to interpreted and it's not sure in which coordinate system optitrack works. We do have an example for the qualisys system that you perhaps can take a look at?