Porting MAVROS for ROS2 (GSOC'21)

Ardupilot recently updated their GSOC idealist and I was interested in working on the project Mavros for ROS2. I have some queries related to the project and it would be great if some of the possible mentors could answer them :
1.) As of now I have a basic PixHawk kit ready and set up and do I need some additional hardware like Lidar Sensors as stated in ROS documentation. Would be great if I could know about this and this would help me manage the hardware requirements better (made worse by the corona lockdown in my city).
2.) The main goal of this project is to port the basic features of MAVROS for ROS2. Could this be elaborated a little more, as this would help me understand the project better and also help me work on a prototype project if possible.
Thanks in advance

1 Like

There’s already a ros1_bridge to convert between ros1 and ros2, but that’s not what we should be aiming for.
The fundamental shift with ros2 is rtps/dds, so whilst a connector (like the bridge) could be hacked onto mavros, doing so would be a very poor engineering decision.
Native support of ros2 should be the goal. An old pr started looking at rtps here: https://github.com/ArduPilot/ardupilot/pull/4700

There is almost ready port of mavros to ROS2 (https://github.com/uas-at-ucla-dependencies/mavros), it need some cleaning and testing. AFAIR I manage to run it.

Saying that, I think Ardupilot needs more low level integration. I would first check what PX4 already has (https://docs.px4.io/master/en/middleware/micrortps.html) and their plans (https://www.eprosima.com/index.php/company-all/news/152-bringing-micro-ros-to-px4-based-flying-systems-at-the-px4-developer-summit-2020)

BTW I haven’t run ROS1 for almost a year now, once in ROS2 you’ll stay there

Yep, I agree.

Supporting ROS2 directly even through a bridge would be a better move than hacking MAVROS.

Thank you @james_pattison,@soldierofhell and @khancyr for the suggestions.
I would definitely start looking into this