# Obtain distance from depth camera using collision avoidance

**URL:** <https://discuss.px4.io/t/obtain-distance-from-depth-camera-using-collision-avoidance/27969>\
**Category:** PX4 Autopilot\
**Created:** [June 20, 2022, 1:27am UTC](https://discuss.px4.io/t/obtain-distance-from-depth-camera-using-collision-avoidance/27969 "2022-06-20T01:27:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ru44Be4N7](https://discuss.px4.io/user_avatar/discuss.px4.io/ru44be4n7/32/10966_2.png) [@Ru44Be4N7](https://discuss.px4.io/u/Ru44Be4N7)\
**Post date:** [June 20, 2022, 1:27am UTC](https://discuss.px4.io/t/obtain-distance-from-depth-camera-using-collision-avoidance/27969/1 "2022-06-20T01:27:49Z")

</div>

Hello,  
I’m trying to use the PX4 collision avoidance module ([GitHub - PX4/PX4-Avoidance: PX4 avoidance ROS node for obstacle detection and avoidance.](https://github.com/PX4/PX4-Avoidance)) to get the distance to certain landmarks from the depth camera.  
However, after carefully following all the instructions on the github page, and running rostopic list, I can’t find a topic that gives me the distance to the obstacles.

Checking QGroundControl MAVLink inspector, I can’t find OBSTACLE\_DISTANCE message either. However, I can see the drone on RViz deviating from obstacles, so the collision avoidance module is theoretically working.

Can someone instruct me on how to get the distance from obstacles? Did I configured something wrongly?

Here is a flight log: [https://logs.px4.io/plot\_app?log=8bc51f55-3df1-44b7-bf71-32b4aa7fdea0](https://logs.px4.io/plot_app?log=8bc51f55-3df1-44b7-bf71-32b4aa7fdea0)
