PX4-Autopilot icon indicating copy to clipboard operation
PX4-Autopilot copied to clipboard

[Bug] VTOL will crash in return mode after velocity control via offboard mode

Open vegetable-to-kou-foot opened this issue 4 months ago • 4 comments

Describe the bug

Hi, we are testing the VTOL drone using PX4 1.14.3+MAVROS 1.19.0+Ubuntu 20.04, but we found that after offboard velocity control in fixed wing mode, the drone crashed when switched to return mode.

Based on the logs, we found that the fixed-wing motor's RPM was constant in return mode, which could lead to the drone not having enough lift and thus crashing. As a comparison, drone wont crash in return mode after position control, which makes us wonder.

We tested this in version 1.13.2, 1.14.0 and 1.14.3, where 1.14 had this issue, but 1.13 was fine. I think some logic error may happened in the 1.14 update, but due to specific sensor requirements, we can only use the version above 1.14. I sincerely want to know how to deal with this issue.

There are our logs and runnable primary code.

Velocity control, return and crash in real flight: https://logs.px4.io/plot_app?log=f2a737ec-4436-4806-92e6-f8fc320d4b4c d1389463b8c4283262f122667ad0e07aa30cfc4d

The oscillations of the TECS controller do not seem to be related to this problem, since we can still reproduce the problem in HITL after solving the oscillations. Crash in HITL: https://logs.px4.io/plot_app?log=56f79dc6-ca1a-44b5-a0dd-dcb45118fbe8 image

Position control and successfully return in real flight: https://logs.px4.io/plot_app?log=473e2a04-2c2e-42df-9c6c-3dd0ca746df1 38736411ac9462fabefe1d3523b06701f1cd2455

Runnable primary code: https://paste.ubuntu.com/p/bhxjVzG2Vv/

Thank you!

To Reproduce

  1. Drone switched on
  2. Took off
  3. Switched to fixed-wing
  4. Switched to offboard mode
  5. Sent velocity control command
  6. Stop velocity control, drone exited offboard mode and activated failsafe mode(set to return mode)
  7. Fixed-wing motor’s RPM was constant
  8. Crashed

Expected behavior

Fixed wing motor's RPM should be controlled to vary.

Screenshot / Media

No response

Flight Log

No response

Software Version

NuttShell (NSH) NuttX-11.0.0 nsh> ver all HW arch: PX4_FMU_V5 HW type: V5006000 HW version: 0x006 HW revision: 0x000 PX4 git-hash: 1dacb4cdef2d7145754fc788fa8dc482eed74b40 PX4 version: Release 1.14.3 (17695743) OS: NuttX OS version: Release 11.0.0 (184549631) OS git-hash: de41e7feaeffaec3ce65327e9569e8fdb553ca3d Build datetime: May 30 2024 03:29:42 Build uri: localhost Build variant: default Toolchain: GNU GCC, 9.3.1 20200408 (release) PX4GUID: 00020000000036323635303351130044003b MCU: STM32F76xxx, rev. Z

Flight controller

CUAV V5 nano

Vehicle type

Hybrid VTOL

How are the different components wired up (including port information)

No response

Additional context

No response

vegetable-to-kou-foot avatar Oct 17 '24 03:10 vegetable-to-kou-foot