PX4 / PX4-Autopilot

PX4 Autopilot Software
https://px4.io
BSD 3-Clause "New" or "Revised" License
8.17k stars 13.36k forks source link

multicopter position control not responsive in 1.13 and erratic thrust #21674

Open dirksavage88 opened 1 year ago

dirksavage88 commented 1 year ago

Describe the bug

This is an issue found when testing alt/Position modes on 220 frame quad. Found on release/1.13

The FC is a Beaglebone Blue, but the issue could also persist on other autopilots

How to reproduce

1) I am running mavlink telemetry over the SoftApp (access point) 2.4ghz wifi. When pinging the beaglebone from the ground station there is high latency (100+ms end to end). The issue could be worse with Wi-Fi telemetry but not the root cause of the issue.

2) Connected to my ground station via bluetooth is a PS4 dualshock 4 controller. I have enabled all settings to accommodate the spring loaded throttle in QGC. I am able to throttle up and test pitch, roll, and yaw when hovering slightly above ground level in manual mode. Also replicated via sbus receiver and transmitter

3) In position or altitude mode with throttle zero set to full thumbstick down, letting the thumbstick raise to midpoint does not increase throttle/actuator output to increase throttle. In manual/stabilized mode, letting the thumbstick raise to midpoint does raise throttle. When throttle zero set to midpoint, the actuator output responds accordingly. Again not the root cause issue but an indirect problem exclusive to joystick use.

4) with both joystick and RC raising throttle in alt/pos modes results in throttle increasing until reaching MPC_THR_MIN at which throttle fluctuates (redlined against this min thrust value for a second or two) then randomly spikes above this value before loss of motor control is experienced which looks similar to what happened here: https://discuss.px4.io/t/delayed-commands-and-surging-throttle-behavior-in-alt-position-mode/31721/4

Expected behavior

1) The joystick/transmitter should throttle up in alt/position mode when throttle zero is set to thumbstick down and the thumbstick is raised to midpoint (via letting the thumbstick release, as it is spring loaded).

2) There is high latency between the autopilot over 2.4ghz Wifi telemetry, this may not be the issue but is not helping if the latency causes disruptions in control inputs. thrust response in position control modes seemed sluggish before losing thrust control but this delayed response was not seen in manual mode, indicating it wasn’t latency but something with MPC not sending correct values over pwm.

Drone

DronecodeBot commented 12 months ago

This issue has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:

https://discuss.px4.io/t/delayed-commands-and-surging-throttle-behavior-in-alt-position-mode/31721/6