Describe the bug
I am working on implementing the PX4 Auterion VIO code on a drone and I have noticed that every time I start the launch file (bridge_mavros.launch), it changes the orientation of the drone to due east on the QGC compass - regardless of which way the drone is actually oriented. This then causes issues with the Pixhawk IMU’s and the camera data as they believe they are pointing different ways. Has anyone else had this issue? The fix I have been using is to simply point the drone east when I run the VIO code but that is obviously not an ideal solution. This definitely resolves the problem but for my application it is not realistic to point the drone east every time I start it up. It appears that there is some confusion between the camera and the pixhawk coordinate frames. Something is not lining up and I believe the pitch of the camera is being translated to the yaw when sent to the Pixhawk.
Right when I start the VIO node and without moving the drone, I echo the topic mavros/odometry/out. The result is a quaternion [w, x, y, z]= [.710567, .0005966, .70363, .001054]. This relates to a yaw of ~90 degrees which I think is causing the issue. Watching the odometry message in QGC also shows a similar quaternion for the attitude which is why it is saying its yaw is 90 degrees. Any suggestions help! Thank you!
Not sure if this is an issue with something I did wrong or a universal problem. I simply downloaded the source VIO code and tried to run it and ran into this issue.
I would expect the VIO node to initialize at 0 degrees heading.
Log Files and Screenshots
A sample log file can be seen here PX4 Flight Review. It doesn’t show much but you can see the heading starts at 90 degrees.
Here is the tf tree as well:
The transform from base_link to camera_pose_frame is rotated 90 degrees about the y axis so that it is facing down. This makes sense I think because the camera is facing the ground.
If there is anything else I could add that would aid in debugging this issue, please let me know. Thank you!