navigationrosdrone.ioros2px4

How to build a drone with ROS2 and (indoor) navigation function


my name is chaos and I am learning how to control a drone with ROS2.

My current goal is to master indoor drone navigation. I don't have any experience with this, so I found and tried The Construct's ROS Q&A series「2D Drone Navigation」. It's very helpful and I learned how to build a drone with ROS 1.
2D Drone Navigation:https://www.youtube.com/watch?v=dND4oCMqmRs&t=71s

But I am a ROS beginner and many people, including the official ROS2 Tutorials, recommend starting with ROS2.

So here are my questions:

1. How can I reproduce the functions which are introduced in 「2D Drone Navigation」with ROS2? Are there any backwards compatible ROS packages that will work in ROS2 ? For example, I couldn't find 「gmapping, amcl and move_base」packages or scripts in turtlebot3_navigation2 ROS2 branch. If there are best practices for this, please tell me.
ROS1 turtlebot_navigation
ROS2 turtlebot3_navigation2

2. I am going to try 「[ROS Projects] - Performing LSD-SLAM with a ROS based Parrot AR.Drones」next. Like question 1, I would like to know whether there is a ROS2 version of these instructions.
Performing LSD-SLAM with a ROS based Parrot AR.Drones

3. My final goal is to realize something like the video below. Are there any ROS2 packages that could help make indoor navigation with a drone easier?
drone indoor navigation with ROS

Lastly, I have a question about choosing my drone's core.

I am learning how to build my drone with ROS2 by watching micro-ros tutorials and using the macro MAV「Crazyflie」used in micro-ros's demo.
demo link

I plan to switch to PX4 in the future because PX4 supports ROS2 and communicates with ROS2 like 「Crazyflie」. (overview)

It seems Ardupilot will support ROS2 in the future but still use MAVROS, which is called 「Not future proof」in the video below (DDS/ROS2 bridge vs MAVROS). Therefore, I think PX4 is the best choice for now. Please let me know if my conclusion is wrong.

DDS/ROS2 bridge vs MAVROS 3:01 ~

ROS2 MAVROS support for Ardupilot

Thank you so much for all your help. I hope I haven't asked too many questions.


Solution

  • Since your question is kind of broad, I'll just go down the list and answer each part.

    1. What you mean here are actually forwards compatible ROS nodes(ROS1 nodes that work with ROS2). While on the surface ROS1 and ROS2 are similar there are very distinct syntax differences; there's also substantial differences on the backend. ROS2 doesn't yet have the fully fleshed out community support that you've noticed with ROS1. However, there are still some similar packages such as the Nav2 package.
    2. Like my last answer you are going to find less in terms of "off the shelf" solutions for ROS2. That being said, the Nav2 package does do some SLAM. There is also the robot_devkit.
    3. One of the better local planners for ROS1 was teb. While they've said there are plans to port it to ROS2 they are waiting for Nav2 builds to be a little more stable. I know of the nav2_planner, however, I've never used it and cannot speak to how well it will work(if at all).

    I unfortunately cannot answer your last question since my ROS experience is strictly with autonomous vehciles that stay on the ground.