I can't see OBSTACLE_DISTANCE on QGC
-
I only connected UART and GND, and VOXL2 is only connected to the Cube Orange+, a WiFi dongle, and a stereo camera.
I can use the "listener obstacle_distance" command on QGC's MAVLink console to obtain depth information about obstacles, and I have successfully enabled collision prevention for the drone in position mode. However, I still cannot see "obstacle_distance" on the MAVLink inspector.

-
I only connected UART and GND, and VOXL2 is only connected to the Cube Orange+, a WiFi dongle, and a stereo camera.
I can use the "listener obstacle_distance" command on QGC's MAVLink console to obtain depth information about obstacles, and I have successfully enabled collision prevention for the drone in position mode. However, I still cannot see "obstacle_distance" on the MAVLink inspector.

@rogerli What messages do you see in mavlink inspector?
-
@rogerli What messages do you see in mavlink inspector?
@Eric-Katzfey said in I can't see OBSTACLE_DISTANCE on QGC:
mavlink inspector
This is the messages I see in the MAVLink inspector.


-
@Eric-Katzfey said in I can't see OBSTACLE_DISTANCE on QGC:
mavlink inspector
This is the messages I see in the MAVLink inspector.


@rogerli The OBSTACLE_DISTANCE Mavlink message is based on the
obstacle_distance_fusedtopic. Can you do listener on that topic to see if it is being published? -
@rogerli The OBSTACLE_DISTANCE Mavlink message is based on the
obstacle_distance_fusedtopic. Can you do listener on that topic to see if it is being published?@Eric-Katzfey said in I can't see OBSTACLE_DISTANCE on QGC:
No, I am unable to use the listener command to see the obstacle_distance_fused message. How can I enable this feature?
-
@Eric-Katzfey said in I can't see OBSTACLE_DISTANCE on QGC:
No, I am unable to use the listener command to see the obstacle_distance_fused message. How can I enable this feature?
@rogerli What is the parameter CP_DIST set to?
-
@rogerli What is the parameter CP_DIST set to?
@Eric-Katzfey I am having a similar problem, where I can see obstacle_distance, but not obstacle_distance_fused using the listener command. When I checked CP_DIST it was set to -1 so I set it to 1 and then I could briefly see both with the listener command, and was able to see obstacle_distance using the mavlink inspector. After unplugging then replugging in my pixhawk, this was gone and I was back to only being able to see obstacle_distance with the listener command. Was there something that could've changed during my restart? I checked CP_DIST and it was still set to 1 even afterwards.
The only notable differences between my system and the original users is that my connection is across ethernet.
-
@Eric-Katzfey I am having a similar problem, where I can see obstacle_distance, but not obstacle_distance_fused using the listener command. When I checked CP_DIST it was set to -1 so I set it to 1 and then I could briefly see both with the listener command, and was able to see obstacle_distance using the mavlink inspector. After unplugging then replugging in my pixhawk, this was gone and I was back to only being able to see obstacle_distance with the listener command. Was there something that could've changed during my restart? I checked CP_DIST and it was still set to 1 even afterwards.
The only notable differences between my system and the original users is that my connection is across ethernet.
@Inverse-AJ A quick look at the code shows that CP_DIST has to be greater than 0 and current flight mode has to be manual position mode. What flight mode are you in?
-
@Inverse-AJ A quick look at the code shows that CP_DIST has to be greater than 0 and current flight mode has to be manual position mode. What flight mode are you in?
@Eric-Katzfey I was previously in "Hold" mode, but I tried in "manual" and still am not seeing the obstacle_distance_fused message. I noticed one other difference in my parameters which is that COM_OBS_AVOID doesn't exist for me.
Another question, I had previously re-flashed the Pixhawk firmware after changing the file: "PX4Autopilot/src/modules/uxrce_dds_client/dds_topics.yaml". I had added the following to the publications section:
- topic: /fmu/out/obstacle_distance_fused
type: px4_msgs::msg::ObstacleDistance
However, it had no effect so I reverted back to the default px4 firmware shown on QGC. Is that change necessary to see the message or should I leave the default?
- topic: /fmu/out/obstacle_distance_fused
-
@Inverse-AJ A quick look at the code shows that CP_DIST has to be greater than 0 and current flight mode has to be manual position mode. What flight mode are you in?
@Eric-Katzfey Small update. I also tried it with the custom firmware with that additional publication added (from previous reply), and the result has not changed. obstacle_distance_fused still shows up as "never published" when using the listener. However, with the custom firmware I get warnings from QGC about missing parameters: BAT1_V_LOAD_DROP, BAT2_V_LOAD_DROP, and COM_OBS_AVOID. I pulled the most recent main branch for the PX4 Repository to build it, so maybe there's not support by QGC yet?
-
@Eric-Katzfey Small update. I also tried it with the custom firmware with that additional publication added (from previous reply), and the result has not changed. obstacle_distance_fused still shows up as "never published" when using the listener. However, with the custom firmware I get warnings from QGC about missing parameters: BAT1_V_LOAD_DROP, BAT2_V_LOAD_DROP, and COM_OBS_AVOID. I pulled the most recent main branch for the PX4 Repository to build it, so maybe there's not support by QGC yet?
@Inverse-AJ Have you asked this question on PX4 forum? https://discuss.px4.io/c/px4/25
-
@Inverse-AJ Have you asked this question on PX4 forum? https://discuss.px4.io/c/px4/25
@Eric-Katzfey I had not since this discussion was the closest I could find to my issue. But I have created one now: Cannot see obstacle_distance_fused on QGC
-
@Eric-Katzfey I had not since this discussion was the closest I could find to my issue. But I have created one now: Cannot see obstacle_distance_fused on QGC
@Inverse-AJ @rogerli
Hi, I also struggled with the OBSTACLE_DISTANCE MAVLink message not appearing in the MAVLink Inspector. Moreover, obstacle avoidance was not functioning after I upgraded v1.3.5 to ModalAI SDK v1.5.0. If you're experiencing this issue, ensure the following:Set MPC_POS_MODE to 0 (Simple Position Control) or 3 (Smooth Position Control). The default value (4, Acceleration-based Input) is incompatible with ModalAI’s VOXL platform.
Set COM_OBS_AVOID to 1. This enables obstacle avoidance in PX4.
Set CP_DIST to a value greater than 0. This specifies the critical distance for collision prevention.
Ensure your drone has a valid home position or local position from QVIO. This is required for proper navigation.
Ensure your drone is in Position Hold mode. Obstacle avoidance requires this flight mode.Although the OBSTACLE_DISTANCE message does not appear in the MAVLink Inspector, QGroundControl displays the obstacle distance overlay in its telemetry view, and the drone successfully performs obstacle avoidance. Note: This applies to ModalAI SDK v1.5.0; check for updates in newer versions.

Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login