Object avoidance in loiter? Use a combination of a scanning Lidar and a unidirectional Lidar in OA?

Hello @rishabsingh3003,
It looks like the documentation on Object Avoidance using Dijkstra’s with BendyRuler mentions that this only works in AUTO, GUIDED and RTL flight mode. I want to use obstacle avoidance for Loiter flight mode as well. So should I enable both “Dijkstra with BendyRuler” and “Simple Object avoidance”?
I am using LightWare SF45/B 350 Lidar and a unidirectional Lidar (LightWare SF20 / LW20) to detect objects in the region/angles at which the SF45/B cannot detect objects. But it looks like I am unable to get OA through unidirectional lidar working.
Is it possible to use a combination of a scanning Lidar and a unidirectional Lidar to detect and avoid objects?

It should be possible to use a combination of sensors via PRX1_TYPE, PRX2_TYPE etc.

You can not use a Path Planning algorithm like BendyRuler in Loiter since Loiter is a manually controlled mode and we don’t really have a set “destination” to plan a path for.
You can use “Simple Avoidance” via the AVOID_ parameters (not the OA_ parameters which is for BendyRuler).

I have performed a few test flights with this combination of sensors. PRX1_TYPE set to use Lightware SF45/B and PRX2_TYPE to use LightWare SF20. The obstacles in front of the unidirectional lidar are not avoided.
Also, the wiki of Simple Object Avoidance — Copter documentation (ardupilot.org) mentions that “Only one proximity sensor source can be enabled, using either a 360 degree lidar or up to 9 rangefinders.”

Please upload a log here so I can take a look. Should be able to use two different proximity sensors for avoidance.

Here are a couple of logs: Obstacle Avoidance
This folder contains logs from more than one flight. We have tried the following combinations:

  1. Only Unidirectional Lidar Enabled
  2. Only Scanning Lidar Enabled
  3. Both Lidar Enabled

@Shubham_Saboo had a look at the following logs:

  1. 20240420_360Lidar&UniLidar_Both Enabled.bin → there is unfortunately a problem in Copter 4.4 where we need the PRX1 sensor to be working and healthy for PRX2 to work. This has been fixed in 4.5 AP_Proximity: get_status() returns first good sensor status by rishabsingh3003 · Pull Request #25913 · ArduPilot/ardupilot · GitHub

  2. 20240420_BothLidarEnabled_AUTOFlight.bin → the rangefinder and 360 degree sensor both seem to be working, have a look at PRX[2].D90 and RFND[0].Dist log messages