Object avoidance algorithm not working properly in non-gps mode on SITL with Gazebo/ROS or Airsim

Hi,
I have build simulation environment as described in GitHub - khancyr/ardupilot_gazebo. I run ardupilot SITL without any problem but object avoidance algorithm not working properly in non-gps mode of copter for example position hold mode. I am using mavros object_avoidance and distance_sensor plugins for sending sensor data to FCU. And I see sensor data on GCS(QGC). But object avoidance algorithm works when i try it in an executable mode with gps.How to solve this problem? Please can you help me?

Not: I have tested on Airsim without ros but result same.