X500_lidar no data at ros topic

Hello,
I am using main release on Ubuntu 22.04 with ROS2 Humble plus MicroXRCEAgent

I am trying to get data from Lidar sensor at gazebo through ROS topics,
I have enabled Collision Prevention in QGC and tried to read data from /fmu/in/obstacle_distance , got nothing
image

but when i try to listen with listener obstacle_distance everything seems to be working fine.

What can i do about it?
Thanks in advance.

For Collision Prevention, are you in position mode?

Which version of PX4 are you running?

I am using Main Release of PX4 (alpha version)

No , I am in mission mode,
Is this the cause of my problem ?

The docs say “position mode.” Have you tried this yet? It might not be enabled in mission mode

Are you using the px4_msgs repo? The fmu topics would not be discernible by ROS without the px4_msgs

No, i haven’t tried position mode yet however position mode is not what i need.
I should be able to collision prevent in the mission mode for safety of our drones.
Can i do that ?

Yes, i am using the repo, all the other /fmu topics works fine

Are you trying to read distance data coming from PX4 in ROS 2? If so I think you are wanting to echo /fmu/out/obstacle_distance which is currently not in the dds topics yaml file: PX4-Autopilot/src/modules/uxrce_dds_client/dds_topics.yaml at 8a9391321dc79f4eea9f3fd97f5ebb172fdb0fdf · PX4/PX4-Autopilot · GitHub

Since /fmu/out/obstacle_distance is not in yaml file
i am trying to echo /fmu/in/obstacle_distance

I believe you will need to add /fmu/out/obstacle distance to the yaml file and compile from source.

Tried it but still no response in the topic :confused: