Obstacle avoidance using micrortps bridge

I am very new to all this, so please bear with me.

I am trying to implement a very basic obstacle avoidance using micrortps environment. this is to demonstrate the capabilities of a ros 2 environment for a hardware accelerator.

Existing implementation of avoidance module can not be used because of dependencies issues. (mavros, pcl_ros etc).

it says here to work with micrortps bridge, you need to know about the internals of px4. Where do i find them?
I am looking at the px4_msgs, but there is no documentation for it. What do the fields in the messages mean? for example, suppose in simulation there is a laser sensor connected to px4. What is the associated message?

Well, that mainly refers to understanding how uORB works. In order to better understand PX4 internals, I would recommend you to read everything in the development guide and especially everything in the subcategory “concepts”. Another thing that helped me to understand a lot of concepts are the talks from the PX Dev Summit 2019 and 2020.

Those messages are ROS2 definitions for the uORB messages. A lot of those messages are documented in the corresponding uORB definitions. You can find them in the px4 autopilot folder in the “msg” subfolder.

That depends on what kind of a laser sensor we are talking about. If the laser sensor is a 1d range finder, the msg definition would be distance_sensor.msg. There is also the obstacle_distance.msg definiton. However, if your drone has LiDAR sensor in order to run obstacle avoidance, you don’t really need to communicate the sensor data to PX4. The flight controller doesn’t have the computational capacity to run obstacle avoidance algorithms anyway, so you need to use a companion computer to run that kind of stuff.

Thanks for replying, i will get on to reading
From your reply, I am assuming that you have also worked with micrortps bridge. If you have any examples that you can share, that would be really helpful.