I'm using LPE firmware burned on px4 autopilot with external heading option (mocap heading), The autopilot is connected to odroidXU3 board that runs ROS kinetic versionand. I am also using opti-track system for the indoor test below.
The problem is as the following:
If I rotate the drone clockwise (in Yaw) the orientation signs for x, y, z and w from the /mavros/local position/pose topic are the same as the data signs that is coming from /mavros/mocap/pose . However, if the drone is rotated counter clockwise the orientation signs are swapped in these two topics (similar problem is shown in the figure below that was posted in this page https://github.com/mavlink/mavros/issues/510)
I tried to fly the drone in position hold mode and I got the following results (please see the yaw - third and fourth figures- as I think the problem appeared there
The performance of the drone when switched to position hold was unstable and the plots below for the local position show that
Any suggestion ??