Pixhawk quaternion error

Hello dear community,

I wanted to reach out regarding an issue I’m facing with my setup using a Pixhawk 4, Jetson Nano, and T265 RealSense camera for onboard navigation Visual-Inertial Odometry (VIO). I have been following the instructions provided by PX4 on their website (Visual Inertial Odometry (VIO) | PX4 User Guide), specifically the recommendation to yaw the vehicle until the quaternion of the ODOMETRY message is very close to a unit quaternion (w=1, x=y=z=0).

However, despite rotating the drone as instructed, I have not been able to achieve quaternion values close to 0,0,0,1, especially for the ‘w’ value. The ‘w’ value only reaches up to 0.71 and then decreases. Previously, I was using the VIO package from Auterion, which is no longer available on GitHub. However, I still have the package in my own GitHub repository (GitHub - DiegoHerrera1890/VIO_T265: from auterion vio ros package). About four months ago, everything was working fine until the camera broke, and I replaced it with a new one. I also updated the firmware of the Pixhawk to the latest stable version.

I wanted to share a part of the launch file where I modify the distance and orientation of the camera:

phpCopy code

<!-- Launch static transform publishers -->
<node pkg="tf" type="static_transform_publisher" name="tf_baseLink_cameraPose"
      args="0.10 0.01 -0.032 0 0 0 base_link camera_pose_frame 1000"/>

Additionally, I want to mention that the parameters EKF2_EV_POS_X, EKF2_EV_POS_Y, and EKF2_EV_POS_Z are set to their default values (0).

I would greatly appreciate your support and any advice you can provide to help resolve this issue. Thank you in advance for your assistance.

do u think yaw the drone multiple times can help converge the quaternion ? I am not expert on this, but I experienced similar when I use vicon, I have to yaw the drone till it converge at beginning.

@subarashi Check for the pose values that your getting, like using the rostopic echo and see how it is, and then verify whether the mavros topic that is publishing the pose data

I apologize, it was my mistake. The launch file of the T265 was set in a forward direction while the camera was facing down.