We’re working on a heavy payload multirotor with a custom design. We need a Obstacle avoidance system working parallel with our flight plan.
We have a VLP 16 Puck lite lidar model and PX4 Flight controller (cube).
We want to integrate it with PX4 with help of companion computer. I researched and found material about mavros and mavlink.
I still need a confirmation about my work flow. How do I actually proceed for the same.
I already interfaced the VLP 16 with ROS platform.
Can anyone please help with both hardware and software integration for the same.
Also, suggestions with work flow and process are invited.
so I worked with thsi setup a while back and hopefully I can provide you with some information. Have in mind I write about stuff I did back then with Ubunut 16.04 and ros kinetic (which is ros 1 based). Most of this should also work with newer ROS 1 application like noetic and ubuntu 20.04 But everything I can tell you is about ROS 1.
The PX4 flightstack can be applied to the pixhawk fcu (for example the black cube). As a note for everyone beginning with this -check you flight controller software, there might be ardupilot installed, then you might consider it replacing with PX4. PX4 is not automatically the pixhawk’s control software.
Back to the topic if you want to communicate with the flightcontroller and integrate the velodyne you can ‘easily’ do so by using an onboard computer, F.e. we used an Intel NUC and a serial converter to connect USB to the Telem port of the FCU. If I recall correctly you need an FTDI adapter for an USB to TTL converter or stuff like that. For more information I added some links to the docs where you should find that information. To enable the communication you need to enable the mavlink for the chosen port and define the companion mode - you can adjust those settings via QGC.
Mavlink itself is something like a protocol, which defines the communication which comes from the px4 system and mavros translates that into ros topics. As far as I know the support for ROS2 is not fully working currently so thats the ROS1 apporach.
What you can then achieve is to get the velodyne data to your onboard computer, calculate something like the obstacle avoidance and create offboard controls based on that and send those to control the multirotor. That works and is soemthing we also did. Look into octomap that helps quite a lot to process the VLP data as a simpel first approach.
Here is a link to an OLDER version of the px4 documentation
And here is more recent link
Hopefully this helps you out - so yeah you asked for confirmation. I can confirm that it works. But for hard- and software integration I can’t offer much help. It’s quite a while back that I worked with it.