PX4 / PX4-Autopilot

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

Drone isn't stopping on releasing Roll/Pitch stick of RC while using ARKFlow for local positioning #22385

Closed MuhammadBilal1 closed 11 months ago

MuhammadBilal1 commented 11 months ago

Describe the bug

I performed two flights with the ARKFlow sensor in "Position" flight mode. I was expecting the stable flight as shown in the video by ARKFlow. Followed the configurations given on the PX4 documentation about ARKFlow.

Problem:

Primary Problem: (the drone isn't stable in position mode)

Secondary Problem: (the parameters not found which are given in PX4 documentation)

I wasn't able to find the following parameters in PX4 1.14.0 (Stable), whereas, the PX4 documentation says the parameters are available and the parameters are available in the PX4 source code also.

Tried the same ARK Flow sensor on two different autopilots:

  1. Pixhawk 6C
  2. ARKV6X

Tried solutions to find the missing parameters:

  1. Clear the cache of QGroundControl from "appdata" directory of windows 11.
  2. Uninstalled (from ControlPanel) and installed the latest version of QGroundControl (v4.2.9)

To Reproduce

Perform flight with ARKFlow in position flight mode without GPS.

Expected behavior

Drone should fly stable in local positioning without GPS, and using ARKFlow sensor.

Screenshot / Media

param show UAVCAN_RNG_MIN :arrow_down:

QGC_1

uavcan status :arrow_down: uavcan_status-01

uavcan_status-02

Flight Log

Flight Log (PX4 - Pixhawk 6C): https://review.px4.io/plot_app?log=d0797dde-2bf8-41be-8ae3-b0104ebedf24

Flight Log (PX4 - ARKV6X) https://review.px4.io/plot_app?log=2644a76b-d062-4220-b4f1-c22c4661b438

Software Version

PX4 1.14.0 (Stable)

Flight controller

Pixhawk 6C

Vehicle type

Multicopter

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

No response

Additional context

No response

AlexKlimaj commented 11 months ago

In your ARKV6X log, EKF2_OF_CTRL is set to 0, which caused position mode not to activate. It was in altitude mode the whole flight. Also UAVCAN_ENABLE is set to 0 instead of 2.

The params are all in the 6C log. https://review.px4.io/download?log=d0797dde-2bf8-41be-8ae3-b0104ebedf24&type=1

But they are missing in the ARKV6X log due to UAVCAN_ENABLE being set to 0. https://review.px4.io/download?log=2644a76b-d062-4220-b4f1-c22c4661b438&type=1

MuhammadBilal1 commented 11 months ago

In your ARKV6X log, EKF2_OF_CTRL is set to 0, which caused position mode not to activate. It was in altitude mode the whole flight. Also UAVCAN_ENABLE is set to 0 instead of 2.

The params are all in the 6C log. https://review.px4.io/download?log=d0797dde-2bf8-41be-8ae3-b0104ebedf24&type=1

But they are missing in the ARKV6X log due to UAVCAN_ENABLE being set to 0. https://review.px4.io/download?log=2644a76b-d062-4220-b4f1-c22c4661b438&type=1

Ok. What's the feedback on the Pixhawk 6C? It's my bad I might have missed the parameters, but what about the flight with the 6C, whereas, all the required parameters were there.

AlexKlimaj commented 11 months ago

I would recommend building and flashing main on the ARK Flow and testing again.

The default position mode is smooth acceleration, so it won't stop immediately while it slows down.

MuhammadBilal1 commented 11 months ago

Ok. I will try to flash the ARK Flow using the instructions here.

The default position mode is smooth acceleration, so it won't stop immediately while it slows down.

PX4 documentation says otherwise about the Position flight mode.

What should be the solution if I want "When the sticks are released/centered the vehicle will actively brake, level, and be locked to a position in 3D space" (while using ARK Flow and without the use of GPS)?

DronecodeBot commented 11 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/arkflow-1-14-stable-documentation/35274/6

DronecodeBot commented 11 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/arkflow-1-14-stable-documentation/35274/7

AlexKlimaj commented 11 months ago

Ok. I will try to flash the ARK Flow using the instructions here.

The default position mode is smooth acceleration, so it won't stop immediately while it slows down.

PX4 documentation says otherwise about the Position flight mode.

What should be the solution if I want "When the sticks are released/centered the vehicle will actively brake, level, and be locked to a position in 3D space" (while using ARK Flow and without the use of GPS)?

Yes it does a smooth acceleration brake until it stops and holds position. Can you share a video of the flight behavior?

MuhammadBilal1 commented 11 months ago

Ok. I will try to flash the ARK Flow using the instructions here.

The default position mode is smooth acceleration, so it won't stop immediately while it slows down.

PX4 documentation says otherwise about the Position flight mode. What should be the solution if I want "When the sticks are released/centered the vehicle will actively brake, level, and be locked to a position in 3D space" (while using ARK Flow and without the use of GPS)?

Yes it does a smooth acceleration brake until it stops and holds position. Can you share a video of the flight behavior?

Here is the video of the flight: https://vimeo.com/885640985 Password: pass654123

Log: https://review.px4.io/download?log=d0797dde-2bf8-41be-8ae3-b0104ebedf24&type=1

AlexKlimaj commented 11 months ago

It could be that floor is too difficult for the optical flow sensor, reflective with few features. You could try placing some cross hatch tape on the floor as a test.

MuhammadBilal1 commented 11 months ago

It could be that floor is too difficult for the optical flow sensor, reflective with few features. You could try placing some cross hatch tape on the floor as a test.

I just put some random cloth stuff on my floor and it worked fine. Thank you. Now, my drone is flying stable indoor without GPS while using the ARK Flow sensor as local positioning solution.

Upon updating the QGroundControl to latest release (4.3.0) I got the missing parameters SENSFLOW(MINHGT, MAXHGT, MAXR).