Autonomous Quadcopter with ROS/MAVROS

I am new to ROS and Drone development in general. Currently, I am developing an autonomous indoor drone, for now I have configured my Pixhawk 6C, and I can control my drone in MissionPlaner with no issues. For now I am using raspi 4 as companion computer which is equipped with ros noetic and MAVROS as well as the host computer and the communication is through direct telemetry.

Now I have my rplidar A1 that is connected directly to my companion computer in order to map the environment, I will start with fix altitude for the first trials. Now, I am wondering what type of controller should I use to make my drone navigate? in an wheeled robot we can use dwa_local_planner and etc.

what type of message will be sent to my MAVROS can any one give an insight or a good reference to rely on?

Which of these should be more suitable to my application px4 or arducopter?

Hi @Ibrones,

Re px4 vs ArduPilot, I’ll leave you to investigate that yourself and decide but if you do choose AP here’s some advice.

Our ROS/ROS2 wiki docs are here.

You can use either ROS or ROS2 but personally I would use ROS2 but that requires using ArduPilot 4.5.0 which is currently in beta. You can install it though using MP’s beta firmwares link on the Firmware Install screen and it will likely be the stable version by next week.

@rhys and RyanF (who I cannot find in Discord immediately) are the experts on ROS2 and may help you with the setup. Reading the wiki is the best way to get started of course.

Hope that helps.

Hi @Ibrones, you may find @pedro-fuoco’s GSoC blog from last year useful as well: GSoC 2023: GPS-Denied Autonomous Exploration with ROS 2.

The project uses ROS 2 and the DDS library to manage external control, but does require you to migrate to ROS 2 and setup your companion computer to run ROS 2 Humble instead of ROS Noetic. If you have Gazebo installed you can run a simulation to test your set up as well.

Happy to help with any questions.

1 Like