The system is not able to move in certain directions( Right and back to be exact) when the system is in position mode with collision prevention enabled.
As mentioned above, the drone is not accepting stick movements in position mode when collision prevention is enabled. I did a couple of test with collision prevention enabled, collision prevention was working, but I was not able to move in certain directions(right and back to be exact). In mpc_pos_mode accerelation based the system is taking in stick control, but in simple and direct mode the system is not able to move in certain directions. I disabled collision prevention from parameters and the drone is taking stick input in position mode.
Hardware: arkv6x
PX4 Version: 1.14.0 (Stable Release)
Companion Computer: jetson orin nano
Distance Estimator: d435i
Position Estimate: ARK Flow
cp_distance was 1m.
cp_go_no_data was enabled.
cp_guide_angle was default.
I am sharing the flight logs here for your reference.
https://review.px4.io/plot_app?log=f88b3d1e-c65e-43ba-95d0-8b413264daa4
https://review.px4.io/plot_app?log=66952776-0e51-423a-8caf-023cacef54a8
@MaEtUgR This might be of interest - in particular what’s happening with stick control in various modes:
In mpc_pos_mode accerelation based the system is taking in stick control, but in simple and direct mode the system is not able to move in certain directions.
Is this a bug that should be posted on github? I’m not sure we even have testing for collision prevention (though there is no reason we couldn’t because it doesn’t rely on a companion being present).
The OP is using an Ark Flow with EKF2_RNG_CTRL enabled. Looking at the logs the rangefinder is active via uavcan:
nsh> e[Kuavcan_rangefinder adding channel for topic distance_sensor node 123…
uavcan_rangefinder channel 123 instance 0 ok
Since CP_Dist is set to 1m, and the local position z is something like 0.5 meter above the ground, it looks like the rangefinder from the flow sensor could be feeding into collision prevention which is problematic (and could cause CP to think there are obstacles in front of the drone whereas it’s just the downward lidar reading the terrain).
Thank you for your response @hamishwillee @dirksavage88
Update
I think the code I was using was causing the problem, not allowing the drone to move. This is the code I was using (vision_to_mavros/scripts/d4xx_to_mavlink.py at 139f199fcc82199e357279b11b94e651b07c284e · thien94/vision_to_mavros · GitHub). This code was tested with ardupilot and not with PX4, when I used it with PX4 I had this problem. But when I wrote my own code to get distance estimates with similar logic used in the github code and sent it via mavros, there’s no more problem of not responding to stick inputs.
I am now able to move the system in all directions, but there is delay while giving stick input. I was able to move in all directions, in all mpc_pos_mode. The problem is there is a delay when the drone moves, so if the stick input is given, the drone is responding after some time, not immediately.
I am sharing the flight logs here for your reference.
https://review.px4.io/plot_app?log=0b888e81-41e7-4fea-97bb-ad92c1afba48
https://review.px4.io/plot_app?log=c92ff78c-7293-49a7-8360-bafd657b6ce9