Issues Running ROS2-PX4 Bridge in Docker

Hello,

I’ve been attempting to get a minimal example of the ROS2-PX4 bridge running inside a docker container but I’m running into some issues during the source ~/px4_ros_com_ros2/install/setup.bash step of the guide: ROS2-PX4 Bridge Guide.

Attached is the minimal example that I have been playing with including a Dockerfile, compose file, entrypoint, and a log file of the output running the compose file: example.zip

I’ve attempted to solve some of the errors that pop up in the log such as ModuleNotFoundError: No module named 'distutils.errors', however, installing python3-distutils and python3-apt doesn’t seem to help. I’ve also tried fixing the No CMAKE_Fortran_COMPILER could be found. by installing gfortran to no avail.

Some details about my target environment:

  • px4io/px4-dev-ros2-eloquent image as a base.
  • amd64 and arm32v7 (Why I’m targeting eloquent: REP-2000)
  • FastDDS: v2.0.0
  • Fast-DDS-Gen: v1.0.4

I’d appreciate any help or direction as to where I am going wrong. My ultimate goal is to get the PX4 sim running with the make px4_sitl_rtps gazebo command. Thanks in advance!

Hi,
since you’re installing ROS2 as a whole, you don’t need to install FastDDS separately. Make sure you’ve got python 3.7 or later, and have Gradle 6.3 installed.

if you’re interested, here is a repo that uses docker to do his sim(headless) but uses ROS2 Dashing.
link: https://github.com/carlo98/precision_landing_shaping_RL