Avoidance local planner


I am solving problem with autonomous system for PX4.

The goal is:

If drone is reporting an obstacle before him, drone is not avoiding obstacles but only switch current goal and land it.

The original goal was that drone will fly from point A to point B and somewhere is obstacle.

I am newbie with programming in python in Mavros. So what do you think about that topic?

How could it works?

Thx for response