Skip to content

Docker#3

Merged
joseburgosguntin merged 12 commits into
mainfrom
docker
Jan 19, 2026
Merged

Docker#3
joseburgosguntin merged 12 commits into
mainfrom
docker

Conversation

@Cruiz102

Copy link
Copy Markdown
Collaborator

In this PR, I added Docker support for GitHub Actions.

The Docker image builds the project with all its dependencies and runs colcon build for the mission executor.

In GitHub Actions, I’m doing two things:

  1. Building the Docker image

  2. Running a bash script that runs the headless version of Stonefish (the one that runs in the console)

I had to add two more XML .scn files because, in console mode, cameras are not supported. This makes sense since the camera implementation in Stonefish relies on OpenGL.

I also updated the README a bit to show how to use the Docker setup.

As a sidenote, in order to make this work I needed to add a line in Cargo.toml which, honestly, I don’t fully understand why it’s needed. Copilot suggested adding it, and after that the compilation started working.

The error that this line fixes is the following:

 > [17/17] RUN ln -sf /ros2_ws/src/mission_executor/target /ros2_ws/target &&     bash -c "source /opt/ros/jazzy/setup.bash &&     source install/setup.bash &&     colcon build     --packages-select mission_executor     --cmake-args -DCMAKE_BUILD_TYPE=Release":
5.499 error: profile `colcon` is not defined
5.499 gmake[2]: *** [CMakeFiles/cargo_target.dir/build.make:70: CMakeFiles/cargo_target] Error 101
5.499 gmake[1]: *** [CMakeFiles/Makefile2:164: CMakeFiles/cargo_target.dir/all] Error 2
5.499 gmake: *** [Makefile:146: all] Error 2
5.499 ---
5.499 Failed   <<< mission_executor [4.67s, exited with code 2]
5.526 
5.526 Summary: 0 packages finished [4.85s]
5.526   1 package failed: mission_executor
5.526   1 package had stderr output: mission_executor
------
Dockerfile.headless:71
--------------------
  70 |     # Build mission_executor separately (needs symlink for Cargo target directory)
  71 | >>> RUN ln -sf /ros2_ws/src/mission_executor/target /ros2_ws/target && \
  72 | >>>     bash -c "source /opt/ros/jazzy/setup.bash && \
  73 | >>>     source install/setup.bash && \
  74 | >>>     colcon build \
  75 | >>>     --packages-select mission_executor \
  76 | >>>     --cmake-args -DCMAKE_BUILD_TYPE=Release"
  77 |     
--------------------
ERROR: failed to build: failed to solve: process "/bin/sh -c ln -sf /ros2_ws/src/mission_executor/target /ros2_ws/target &&     bash -c \"source /opt/ros/jazzy/setup.bash &&     source install/setup.bash &&     colcon build     --packages-select mission_executor     --cmake-args -DCMAKE_BUILD_TYPE=Release\"" did not complete successfully: exit code: 2

@joseburgosguntin
joseburgosguntin merged commit 21afc11 into main Jan 19, 2026
2 checks passed
@Cruiz102
Cruiz102 deleted the docker branch February 18, 2026 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants