Simple obstacle avoidance in auto mode

Hello @Mihir_Salot , @rmackay9

I need your help in obstacle avoidance.

i have tried by made changes shared by mihir and also cloned rmackay repo [Copter: simple avoidance in Auto, RTL, Guided using proximity sensors by rmackay9 · Pull Request #26483 · ArduPilot/ardupilot · GitHub]
but still my copter not stopping after detecting obstacle.
i am using gazebo simulator.
can you help me with this.

Are you getting obstacle data from gazebo to the drone?

yes, i have gazebo gardon.

Can you share me the changes you have done in firmware for obstacle avoidance?