ros-navigation / navigation2

ROS 2 Navigation Framework and System
https://nav2.org/
Other
2.59k stars 1.3k forks source link

Integrating Nav2 with Ardupilot #3773

Closed pedro-fuoco closed 1 year ago

pedro-fuoco commented 1 year ago

Hi! I'm a GSoC student for Ardupilot. My project involves using Cartographer and Nav2 to control a copter in Gazebo Garden. So far the Gazebo and Cartographer bits have been solved and integrated into Ardupilot's native port for ROS 2, AP_DDS, with the help of @Ryanf55.

I've remmaped /cmd_vel to /ap/cmd_vel, which made it possible to control the copter through the /goal_pose topic (which I tested with rviz). But the costmaps are not being published correctly and, because of that, the copter isn't avoiding obstacles, as you can see in the video below:

nav2

This was done launching ros2 launch nav2_bringup navigation_launch.py use_sim_time:=true after launching the Copter simulation in Gazebo Garden and Cartographer.

Additional information:



Please feel free to ask for any additional information.
Thanks in advance!
mamariomiamo commented 1 year ago

Just wondering if UAV would require a 3D costmap?

Ryanf55 commented 1 year ago

Yea we will need full 3D support eventually, but the scope right now is using NAV2 on a copter but only moving in 2D.

SteveMacenski commented 1 year ago

Please ask for configuration help on Robotics Stack Exchange.

But generally speaking, I don't see a costmap in your video, so you may want to look into that + configuring it for your application.

Karthik03B commented 4 weeks ago

It will help alot if you can push this project to your GitHub repositories. Thank you

Ryanf55 commented 4 weeks ago

It will help alot if you can push this project to your GitHub repositories. Thank you

Everything is pushed. https://discuss.ardupilot.org/t/gsoc-2023-gps-denied-autonomous-exploration-with-ros-2/101121/20?u=rfriedman