Skip to content

Comments

Build Moveit without Jazzy Packages#233

Merged
ivanperez-keera merged 5 commits intomainfrom
dev-moveit-deps
Apr 25, 2025
Merged

Build Moveit without Jazzy Packages#233
ivanperez-keera merged 5 commits intomainfrom
dev-moveit-deps

Conversation

@Bckempa
Copy link
Contributor

@Bckempa Bckempa commented Apr 21, 2025

Fixes incorrect dependency resolution causing rosdep to install a second ROS distro on the system.

This is only a patch to make it easier to get #229 resolved and CI back to green. Longer term solutions to the underlying issues are tracked in #230, #231, and #232. Development notes posted to issue #228.

@Bckempa Bckempa added this to the jazzy-2025.04.0 milestone Apr 21, 2025
@Bckempa Bckempa self-assigned this Apr 21, 2025
@Bckempa Bckempa linked an issue Apr 21, 2025 that may be closed by this pull request
@Bckempa Bckempa changed the title Build Moveit without Jazzy Packages WIP: Build Moveit without Jazzy Packages Apr 21, 2025
@Bckempa Bckempa changed the title WIP: Build Moveit without Jazzy Packages Build Moveit without Jazzy Packages Apr 21, 2025
@Bckempa Bckempa marked this pull request as draft April 21, 2025 06:15
@Bckempa
Copy link
Contributor Author

Bckempa commented Apr 21, 2025

I'm getting an error in CI I don't get when running build.sh on my dev machine, and the results of that seem to be different than when I copy the commands into a container on my own anyway so I'm marking this as still needing work.

@EzraBrooks, is there an easy way to clear the cache and get a clean build?

@ivanperez-keera
Copy link
Contributor

@Bckempa here? https://github.com/space-ros/docker/actions/caches

@EzraBrooks
Copy link
Member

Yes, I believe the GHA cache type in Docker Buildx will create and restore cache for the current branch and also restore cache from the base branch, so you might need to delete both this branch's cache and main to get a clean build.

If you track down the thing that's being erroneously cached, definitely file a bug, because a correctly-implemented Dockerfile should be idempotent..

@ivanperez-keera
Copy link
Contributor

ivanperez-keera commented Apr 21, 2025

@Bckempa Clearing some of the cache and re-building got the moveit2 image to complete.

space_robots doesn't yet complete, right now due to an error in mongo-cxx that was fixed in a more modern version.

The following patch to space_robots/Dockerfile should let things continue:

 RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
   --mount=type=cache,target=/var/lib/apt,sharing=locked \
   sudo apt-get install libssl-dev build-essential devscripts debian-keyring fakeroot debhelper cmake libboost-dev libsasl2-dev libicu-dev libzstd-dev doxygen -y
-RUN wget https://github.com/mongodb/mongo-cxx-driver/releases/download/r3.6.7/mongo-cxx-driver-r3.6.7.tar.gz
-RUN tar -xzf mongo-cxx-driver-r3.6.7.tar.gz
-RUN cd mongo-cxx-driver-r3.6.7/build && cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local && sudo cmake --build . --target EP_mnmlstc_core && cmake --build . && sudo cmake --build . --target install
+RUN wget https://github.com/mongodb/mongo-cxx-driver/releases/download/r3.7.2/mongo-cxx-driver-r3.7.2.tar.gz
+RUN tar -xzf mongo-cxx-driver-r3.7.2.tar.gz
+RUN cd mongo-cxx-driver-r3.7.2/build && cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local && sudo cmake --build . --target EP_mnmlstc_core && cmake --build . && sudo cmake --build . --target install

@Bckempa
Copy link
Contributor Author

Bckempa commented Apr 21, 2025

@ivanperez-keera I'm only cleaning up the Moveit install in this PR, tracking space_robots build issues in #229

@Bckempa
Copy link
Contributor Author

Bckempa commented Apr 21, 2025

Ugh, the logs don't show if it installed the ros-jazzy packages or not, it just says everything was cached

@Bckempa
Copy link
Contributor Author

Bckempa commented Apr 21, 2025

Ok, when I run the ./build.sh file, rosdep installs ros-jazzy packages, but when I paste in all the commands manually from the Dockerfile it doesn't (as is intended). Here's a log of a manual run for comparison, any Docker gurus know what is different in the build context?
dev-moveit-deps_manual_run.log

@ivanperez-keera
Copy link
Contributor

ivanperez-keera commented Apr 21, 2025

@Bckempa Is this log more informative or not quite? https://github.com/space-ros/docker/actions/runs/14567922377/attempts/3?pr=233

@Bckempa
Copy link
Contributor Author

Bckempa commented Apr 21, 2025

@Bckempa Is this log more informative or not quite? https://github.com/space-ros/docker/actions/runs/14567922377/attempts/3?pr=233

Still not quite - I was looking for the list of the packages apt install-ed by rosdep in the moveit build which is elided after the build is successful as far as I can tell.

Ok, when I run the ./build.sh file, rosdep installs ros-jazzy packages, but when I paste in all the commands manually from the Dockerfile it doesn't (as is intended). Here's a log of a manual run for comparison, any Docker gurus know what is different in the build context? dev-moveit-deps_manual_run.log

I had the idea that it might be a different between how bash (when I paste the commands in line-by-line) and sh (when run via the Dockerfile RUN directive) handle the arguments, but looking closer, that whole idiom might have been broken before I even modified the line.

@Bckempa
Copy link
Contributor Author

Bckempa commented Apr 21, 2025

Ok, spurious CI failure now (apt install not working) but it tries to install the correct package list this time.

@Bckempa
Copy link
Contributor Author

Bckempa commented Apr 22, 2025

Ok, it is finally working. Current build did not install any ros-jazzy packages during rosdep. Once this completes (CI will still be red due to space_robots, but moveit should build) we can merge.

@Bckempa Bckempa marked this pull request as ready for review April 22, 2025 15:53
Copy link
Contributor

@ivanperez-keera ivanperez-keera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Moveit2 image is not building at the moment due to a problem in the demos in ompl:

https://github.com/space-ros/docker/actions/runs/14583334310/job/40952108248?pr=233#step:6:14079

This commit 8d30817 works around that issue.

Bckempa and others added 4 commits April 24, 2025 16:05
These should be detected by `rosinstall_generator` but are not due to
the bug tracked by #230 and could be removed from the build scope by
issue #231 first. Therefore, this is a minimal change like #224 to fix
the current behavior while the correct solution is determined.
The `google_benchmark_vendor`, `urdfdom`, and `urdfdom_headers` packages
are built in the Space ROS base but not detected by `rosdep` which then
tries to apt install `ros-jazzy-google-benchmark-vendor`,
`ros-jazzy-urdfdom`, and `ros-jazzy-urdfdom-headers` which would pull in
many other `ros-jazzy` packages unnecessarily.
This commit moves the arguments to the skip-keys flag to rosdep, which
simplifies the dockerfile and makes it easier to maintain.
The `bash` shell was being discarded after sourcing the underlay leading
to unexpected behavior by `rosdep`
This commit disables OMPL's demos, due to a build error that results in a
header file not being found.

```
<PATH_TO_OMPL>/demos/DubinsAirplane.cpp:48:10: fatal error: ompl/tools/debug/Profiler.h: No such file or directory
   48 | #include <ompl/tools/debug/Profiler.h>
```
@ivanperez-keera ivanperez-keera merged commit 3dd5c68 into main Apr 25, 2025
3 of 4 checks passed
@github-project-automation github-project-automation bot moved this from In Review to Done in Space ROS Project Development Apr 25, 2025
@ivanperez-keera ivanperez-keera deleted the dev-moveit-deps branch April 25, 2025 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Moveit Docker Apt Installs Jazzy Packages

3 participants