ROS 2 SITL Installation problems

I’m using the Ardupilot ROS 2 Gazebo SITL for a project and I set it up succesfully on multiple Ubuntu 22.04 machines and through Docker and now I wanted to install it on a high compute PC/server also running Ubuntu 22.04 but when following the ROS 2 Ardupilot documentation and running colcon build --packages-up-to ardupilot_dds_tests I get the following errors:

stderr: micro_ros_agent
CMake Error at /opt/ros/humble/share/fastrtps/cmake/fastrtps-dynamic-targets.cmake:37 (message):
Some (but not all) targets in this export set were already defined.

Targets Defined: eProsima_atomic

Targets not yet defined: fastrtps

Call Stack (most recent call first):
/opt/ros/humble/share/fastrtps/cmake/fastrtps-config.cmake:60 (include)
CMakeLists.txt:37 (find_package)

Even when installing Fast-DDS from source it didn’t work. Does anyone have a idea what could resolve this problem?

Any help is greatly appreciated. Thanks in advance.

Hey Gilbert,
It is probably due to on of the following reasons:

  1. duplicate installation in your env
  2. colcon is not clean so please try and run
    colcon clean → rebuild
  3. cmake version might be the problem
  4. Ensure that all required ROS 2 dependencies are installed

GoodLUCK !

I have never seen that. Because it is an error with the micro_ros_agent, which ArduPilot does not maintain, I recommend filing a github issue if you can’t trace this down on their github.

I also recommend using binary installs for everything if you aren’t already. If you are still using Docker, please share your dockerfile so I can reproduce this.

1 Like

Hey @rfriedman sorry for the late reply. To clarify the Ardupilot SITL installation does work for me with a Docker container (just following the installation steps) and also works for me on another device.

As I was still not able to reproduce this in any other setup I also had quite some problems finding possible solutions.

Related:

I created an issue on the micro_ros_setup github but haven’t gotten a reply yet: micro_ros_agent installation issue on ROS 2 Humble Ubuntu 22.04 · Issue #764 · micro-ROS/micro_ros_setup · GitHub

Thanks for filing the upstream issue. I subscribed but have no further suggestions at this time.

1 Like