Simple Object Avoidance for Arducopter

Hello,

I am trying to activate the Simple Object Avoidance horizontally, avoiding objects by stopping.

As a proximity sensor I have a Range Finder. I read the measurements with a companion computer and send them via mavlink to ardupilot using the message DISTANCE_SENSOR (132).

As you can see in the image below, the sensor is correctly read and I can display the proximity UI

However, the “Obstacle Avoidance” UI seems to be disabled, and when I have tried it in Loiter and Althold mode it didn’t work. Proximity avoidance enable is set to RC7 and controlled with an aux switch on the transmitter.

image (1)

When we activate the aux switch, a message is shown saying “RC7: AvoidProximity HIGH”, but on the “temp” popup screen, nothing changes. As you can see in the image below, proximity function is working but obstacle avoidance is not. We think this may be the reason why it is not working.
Imagen1

This is how I have configured in Mission Planner the Range Finder Parameters:

  • RNGFND1_ORIENT = 0
  • RNGFND1_TYPE: 10 (MAVLink)
  • RNGFND1_MAX_CM: 360
  • RNGFND1_MIN_CM: 5
  • RNGFND1_SCALING: 1

The proximity parameters:

  • PRX1_TYPE: 2 (MAVLink)

And the parameters to enable simple object avoidance according to Simple Object Avoidance — Copter documentation and Copter Object Avoidance — Dev documentation

  • AVOID_ENABLE = 7 (“All”) (I have also tried it with 2, which means only the proximity sensor)
  • AVOID_MARGIN = 1
  • AVOID_BEHAVE =1 (stop)
  • RC7_OPTION = 40

I attach the full parameter list I am currently using
Avoid_test_6cmini.param (18.4 KB)

Thank you.