Request to improve ros2 and gazebo documentation

The ROS2 and gazebo part in the website is very poorly documented. In several parts the instructions is not clear. Moreover, it was assumed that we have all the dependencies already, but it wasn’t mentioned in the prerequisites. It refers to multiple pages which is confusing. I have tried more than 10 times but everytime I have ended with some errors.

I think the documentation should be written such a way that we can follow it in a completely new system.

It should be written in a single page, in proper order.

I’ll mention the order I followed:

  1. install the required packages using vcs and a ros2.repos files and update all dependencies.
    ROS 2 — Dev documentation

(After that the build fails obviously because microxrceddsgen is not built and ardupilot dependencies aren’t installed. But those aren’t mentioned anywhere in the page.)

  1. Next I run ./ardupilot/Tools/environment_install/install-prereqs-ubuntu.sh to get the prerequisites. I select yes for the tool chain and paths

  2. I went to installing build libraries page (https://github.com/ArduPilot/ardupilot/tree/master/libraries/AP_DDS#installing-build-dependencies) and try to follow the steps :

Set up Micro XRCE DDS Gen.

Set up serial for SITL with DDS

Setup ardupilot for SITL with DDS(this part specifically is very unclear because I don’t know what to expect after running the sitl. What I see is something APDDS is initialising…

Install geographic_msgs

Install and run the microROS agent

Run sitl with UDP (DDS successfully initialise)

Run with serial (DDS fails to initialise)

DDS messages to Ardupilot

  1. Run ./waf configure --board sitl --enable-dds and ./waf copter

  2. Go back to the ROS 2 — Dev documentation page and build the ws. It succeed with 1 srderr

  3. But when I try to test the build. It gives errors.

  1. I follow this page for gazebo
    ROS 2 with Gazebo — Dev documentation

Again build is successful with 4 stderr but several tests fails

Hello @S_B1, sorry to read you’ve found the guides to set up ROS 2 with ArduPilot hard to follow. Some of the documentation is still directed more towards developers than users and resides in the code READMEs. Our GSoC student @pedro-fuoco has done a great job and much improved the documentation but we may have still missed some steps. We welcome contributions and PRs to help us improve the wiki. The guide for contributing is here: Wiki Editing Guide — Dev documentation.

I think we’ve discussed getting your environment working in the ros Discord thread. The issue with tests is most likely the missing dependency mentioned here: Discord

sudo apt install ros-humble-launch-pytest

Over the past few months, in prep for the 4.5 release, I’ve put a lot of effort into improving the wiki. I believe all concerns in this thread have been addressed.

If not, please file a ticket or pull request and tag me for review.