MOTIVATION
We have been using px4 v1.8.2 and mavros v0.31.0 for a while now.
The SITL has worked very well for us, and usually real flight tests have been good too.
But recently (past 6 months), we’ve experienced a lot of frustrating pre-flight failures during real flight tests.
After analysis of many px4 ulogs and ekf2_main.cpp, PreFlightChecker.cpp, it seems that large magnetometer innovations in the ekf were the primary cause of these failures.
Typically, the pre-flight failure flag would trigger immediately upon disarm.
px4 v1.9.0+ seems to have some improvements related to our pre-flight failure problem, including additional log data in estimator_status.msg
As reference, see Octorotor EKF errors
UPGRADE
With upgraded px4 (and mavros), I’m experiencing a new problem now with essentially our same software and configuration.
When upgrading from px4 v1.8.2 to v1.9.0+, some minor changes were required to our gazebo model and world, posix_sitl_default vs. px4_sitl_default, etc.
Perhaps I missed something required for the transition from v1.8.2 to v1.9.0+.
I have tried px4 v1.9.2 and v1.10.1 and mavros v0.31.0, v0.33.0, and v1.0.0.
I’ve only been able to test in SITL (with our modified solo model) and not real flight tests.
We typically want to see our system working well in SITL before attempting any real flight tests.
PROBLEM
Due to their flexibility, we like to use raw setpoints published to /mavros/setpoint_raw/local.
Depending on the state of our system, the bitmask will be set to: (1) vel xyz + yaw, (2) pos xyz + yaw, (3) vel xyz, or (4) pos xyz.
With px4 v1.8.2, raw setpoints have worked very well for us in SITL and real flight tests.
But, with px4 v1.9.0+, only the yaw component of the raw setpoints is executed (causes vehicle motion).
A couple years ago, I wrote a simple offboard figure-8 routine intended for mag calib and safety pilot observation/paranoia.
With px4 v1.8.2, motion of the UAV during the figure-8 routine looks great (in SITL and real flight tests).
With px4 v1.9.0+, I only see yaw motion (in SITL).
Depending on a boolean parameter, this figure-8 routine publishes raw setpoints of either (1) vel xyz + yaw, or (2) pos xyz + yaw.
In both cases, I see the uav rotate (for heading alignment along figure-8 path), but no translational motion.
When I echo the command topic /mavros/setpoint_position/local, the pos+yaw or vel+yaw values look correct.
When I echo the loopback topic /mavros/setpoint_raw/target_local, the position values remain constant (current uav position?) and the velocity values are very small. What does this mean?
When attempting to execute these raw setpoints, QGroundControl does not show any errors or warnings.
With px4 v1.9.0+, I’ve also tried position and velocity setpoints published to /mavros/setpoint_position/local and /mavros/setpoint_velocity/cmd_vel_unstamped
Surprisingly, these two types of setpoints DO appear to work (causes expected vehicle motion).
What am I missing?
What log data can I analyse to understand and fix this problem?
What changes between px4 v1.8.2 and v1.9.0+ may be related?
Thanks for any help you guys can provide. I’m stuck
– John