OAK-D depth CAM vs Lidar

I am planning to make an autonomous fixed-wing UAV that will have the ability to avoid obstacles… Upon searching on the web I found two techniques…the first one is using a lidar sensor and the second one is using an OAK-D camera that can find the distance quickly and whose data could be sent to the pixhawk through mavlink. I am confused as to which method will be a better approach for the task…

It will all come down to what FC, companion computer and algorithm you are going to use.

As Fixed wing aircrafts operate at high speeds there has been a lot of new research work going in this space by several universities

Have you check this Object Avoidance — Plane documentation

I am using the Rasberry pi 4B as the companion computer.

This documentation gives an overview for avoiding the external planes…but my task is to avoid poles etc.

I personally do not have any knowledge when it comes to fixed wing planes but for copters it has been done before.

https://ardupilot.org/copter/docs/common-simple-object-avoidance.html