OBSTACLE_DISTANCE (330) not working

Hi all,

I am working on collision prevention algorithm as stated in Collision Prevention · PX4 v1.9.0 User Guide. I am using raspi 3 as companion board and mavlink communication is established with the help of pymavlink. For collision prevention I had the settings as below:
MPC_COL_PREV_D = 100 cm
min = 50 cm
max = 4000 cm
Dummy object distance = 100 cm

Firstly code checks that it is working on mavlink 2 version and then start exchange of heartbeat message.after that it starts to send OBSTACLE_DISTANCE msg with frequency of 30Hz.
And when I tried to fly the drone it does not stops or breaks.
I don’t know how to check that this message is received by flight controller and what is happening with it.

Hi. Did you found the problem? Have similar problem whit sending mavlink_msg_obstacle_distance message

yes!.. I’m facing the same problem with Raspberry Pi 4 and mavros in QGC. Able to send Obstacle_Distance message (330) from RPI 4 but not displaying in QGC. While COMMAND_ACK shows result : 4 while reciving the message.

Can anyone explain?

Hi Did u tried implementing the code on drone?? is it working?? actually i also want to implement collision prevention sort of things on my drone using depth camera i need some help in sending obstacle distance message can you please help me out