Object avoidance in guided mode shows no reaction

I’ve currently equipped a Quadcopter running ArduCopter 4.5.4 with two ultrasonic sensors of type MB1242 in directions 0 and 315 degrees (I’m planning on using eight, but I want to test with two first).

I can see plausible readings on Mission Planner’s proximity radar (strg-f in the map screen, followed by the button “Proximity” in the new window. Also, simple object avoidance in loiter mode seems to work.

However, I’m having trouble using object avoidance in missions. To test this, I made the companion computer fly the drone back and forth on a slow speed, stood in it’s way as it approached, and luckily jumped out of the way in time, because the drone didn’t show any reaction to me. There were no evasive actions, it just continued on it’s path.

The flight logs clearly show that the sensors did see me, though.

The complete flight log can be found here.
In short, the relevant parameters are:

OA_BR_CONT_ANGLE,75
OA_BR_CONT_RATIO,1.5
OA_BR_LOOKAHEAD,5
OA_BR_TYPE,1
OA_DB_ALT_MIN,0
OA_DB_BEAM_WIDTH,5
OA_DB_DIST_MAX,0
OA_DB_EXPIRE,10
OA_DB_OUTPUT,1
OA_DB_QUEUE_SIZE,80
OA_DB_RADIUS_MIN,0.01
OA_DB_SIZE,100
OA_MARGIN_MAX,5
OA_OPTIONS,1
OA_TYPE,1
PRX1_ADDR,0
PRX1_IGN_ANG1,0
PRX1_IGN_ANG2,0
PRX1_IGN_ANG3,0
PRX1_IGN_ANG4,0
PRX1_IGN_WID1,0
PRX1_IGN_WID2,0
PRX1_IGN_WID3,0
PRX1_IGN_WID4,0
PRX1_MAX,7.65
PRX1_MIN,0.2
PRX1_ORIENT,0
PRX1_TYPE,4
PRX1_YAW_CORR,0
RNGFND_FILT,0
RNGFND1_ADDR,24
RNGFND1_FUNCTION,0
RNGFND1_GNDCLEAR,10
RNGFND1_MAX_CM,765
RNGFND1_MIN_CM,20
RNGFND1_OFFSET,0
RNGFND1_ORIENT,0
RNGFND1_PIN,-1
RNGFND1_POS_X,0
RNGFND1_POS_Y,0
RNGFND1_POS_Z,0
RNGFND1_PWRRNG,0
RNGFND1_RMETRIC,1
RNGFND1_SCALING,3
RNGFND1_STOP_PIN,-1
RNGFND1_TYPE,2
RNGFND2_ADDR,18
RNGFND2_FUNCTION,0
RNGFND2_GNDCLEAR,10
RNGFND2_MAX_CM,765
RNGFND2_MIN_CM,20
RNGFND2_OFFSET,0
RNGFND2_ORIENT,7
RNGFND2_PIN,-1
RNGFND2_POS_X,0
RNGFND2_POS_Y,0
RNGFND2_POS_Z,0
RNGFND2_PWRRNG,0
RNGFND2_RMETRIC,1
RNGFND2_SCALING,3
RNGFND2_STOP_PIN,-1
RNGFND2_TYPE,2

Does anybody know why the object avoidance won’t work?

Regards.

Update

I meanwhile found out that you need to enable the option “Waypoint navigation used for position targets” for parameter GUID_OPTIONS. This equals bit 6, which equals decimal value 64 (note that the counting starts at bit 0 and then continues with bit 2, leaving out bit 1).

However, when this option and object avoidance (OA) are enabled, the drone starts to act very funny. The takeoff still seems to work, but when the final altitude is reached and the command to approach the first waypoint is issued, the drone starts to make unexpected movements in different directions until I switch to loiter and manually fly it back. According to the log, the OA shouldn’t have triggered, and even so, it shouldn’t have resulted in that kind of movement.

In the following log, you see a short flight where the problem occured:
https://www.dropbox.com/scl/fi/7hulay0jj07aj1d5z6jij/2024-10-01-16-01-32.bin?rlkey=q8i9hv9vjm9p78w2qi395scu9&st=9l2bjghu&raw=1

In the following log, you see a flight of the same mission where “Waypoint navigation used for position targets” was enabled, but OA was disabled (by setting PRX1_TYPE to “0”). This flight worked without issues and shows the behaviour I would have expected from the previous flight:
https://www.dropbox.com/scl/fi/upc7a9mlptrq2quaoamzq/2024-10-01-16-18-24.bin?rlkey=ia5somolrpmzg9wzk9tyliqa9&st=jh85h5k4&raw=1

you cant use more than one of those sensors at a time or you will get i2c address conflicts.

I configured all sensors to have different adresses, so this shouldn’t be a problem.