I have been flying with a 20 kg vehicle with the Octorotor Coaxial airframe (Airframes Reference | PX4 Guide (main)) and having an uncommanded yaw during some acceleration and deceleration. The pitch/roll arm length is 45cm. The vehicle keeps altitude and position track but has a yaw of up to 100 degrees. This behavior seems to occur as soon as the vehicle enters the NAV_ACC_RAD. MPC_JERK_AUTO has been minimized. Minimizing the MPC_ACC_HOR doesn’t seem to have a consistent effect on the behavior. Activating MC_AIRMODE seems to introduce oscillations.
I would prefer the vehicle to have smoother vehicle motions and limited agility such as for video shooting. Has anyone seen this behavior and have recommendations for getting rid of this yaw behaviour?
That doesn’t sound right. Could it be that you have the PID gains too high/aggressive? What sort of oscillations do you see, in which axes? I’m not sure from the log what you mean.
RTH was initiated because the motors were throttling to 0% which is reflected in the logs of the thrust (vehicle_local_setpoint/thrust.02). The attitude of the aircraft was oscillating and the motor outputs were saturating. From the setpoints, it looks to be commanded in the pitch/roll while uncommanded in the yaw. Pitch/roll/yaw was derived from quaternions vehicle_attitude_q.00/01/02/03 and setpoints are from vehicle_attitude_setpoint. There is also an instance where Motor Output 5 (motor 6) is disarmed (900 us) during this behaviour.
This sounds problematic. Are you sure that’s not causing your problems? To improve yaw performance it’s usually a good idea to slighly tilt the motors, so that their tilt helps with yaw. For more info see: Info about Angled Motor Mounts for Multicopters - Oscar Liang
Initially vehicle was tested with default gains and started tuning from there following PX4 PID tuning guide but it only made the yaw behavior more aggressive and more frequent. Then the idea was having lower gains on attitude loop to limit/smooth immediate changes especially on pitch/roll which were deprioritizing the yaw control. Yaw controls were tuned to be better to respond commands and not create bigger convergence. Its observed that it improved the yaw rate response and limited some uncommanded yaw.
Another consideration was that default gains might be too high which were set for smaller and lighter vehicle. Basically the performance aimed is slow transition up to higher speeds(15-17 m/s) in a straight line. I appreciate any recommendations to configure or tune my vehicle within PX4 to have slower and smoother acceleration/deceleration before completely moving to tilted configuration.
I have some tests competed with tilted but initial tests introduced increased accelerometer clippings and vibration warnings which also caused excessive oscillations on attitude during tuning. Another challenge is coaxial configuration requires tilting the motors on the same arm to different directions so tilting arm wouldn’t be sufficient.