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.

I’m having the exact same issue. Anybody?

Try PRX1_TYPE: 4 Range Finder

Getting this RC8 message.

you dont need the RC8 switch, that is only for disabling it not enabling it.

Thanks. I tried W/O the RC8 but issue persist. Similar to @Elena, even though the proximity sensor is outputting distances, the obstacle avoidance shows as not present.

@Elena:
I just finished testing and the Simple Object avoidance works even if the Temp indicator shows as disabled. I’m not sure why it does not update.
From your parameters is should work unless you have a hardware issue.
Hope this helps!

1 Like

@Gusasas I just try it and it works! Same as you, eventhough the temp shows obstacle avoidance disable it works. Thank you!

About the RC, if you are sending this via mavlink message RC_CHANNELS_OVERRIDE (70), you also need to change the parameter RC_OVERRIDE_TIME (Timeout after which RC overrides will no longer be used, and RC input will resume), it is set by default at 3 seconds. If you set it at -1, the message will never time out. However, use this only if you want to dinamically enable and disable it. It works perfectly fine without it as @geofrancis said.