Skip to content

Fix compilation issues in moveit2 (#224). #225

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 15, 2025
Merged

Fix compilation issues in moveit2 (#224). #225

merged 3 commits into from
Apr 15, 2025

Conversation

ivanperez-keera
Copy link
Contributor

@ivanperez-keera ivanperez-keera commented Apr 11, 2025

Add missing dependency to see if the moveit2 image compiles that way.

@ivanperez-keera
Copy link
Contributor Author

@Bckempa please don't put this in this sprint/release yet. Let's see if we can get it to minimally work and we can decide if this can be considered for this release.

@ivanperez-keera ivanperez-keera force-pushed the dev-moveit2-jazzy branch 9 times, most recently from 4933dc4 to 7d6b0e8 Compare April 12, 2025 00:49
@ivanperez-keera
Copy link
Contributor Author

ivanperez-keera commented Apr 12, 2025

Tagging @EzraBrooks @asimonov @eholum @Bckempa @mkhansenbot

There seems to be some issue with this image due to moveit_planners-related packages not finding files from stomp:

#26 2646.2 In file included from /home/spaceros-user/moveit2/src/moveit_planners/stomp/include/stomp_moveit/noise_generators.hpp:42,
#26 2646.2                  from /home/spaceros-user/moveit2/src/moveit_planners/stomp/test/test_noise_generator.cpp:40:
#26 2646.2 /home/spaceros-user/moveit2/src/moveit_planners/stomp/include/stomp_moveit/stomp_moveit_task.hpp:57:10: fatal error: stomp/task.h: No such file or directory
#26 2646.2    57 | #include <stomp/task.h>
#26 2646.2       |          ^~~~~~~~~~~~~~
#26 2646.2 compilation terminated.
#26 2646.2 gmake[2]: *** [test/CMakeFiles/test_noise_generator.dir/build.make:76: test/CMakeFiles/test_noise_generator.dir/test_noise_generator.cpp.o] Error 1
#26 2646.2 gmake[1]: *** [CMakeFiles/Makefile2:229: test/CMakeFiles/test_noise_generator.dir/all] Error 2
#26 2646.2 gmake: *** [Makefile:146: all] Error 2

The problem seems to be here:

https://github.com/moveit/moveit2/blob/0d84edb67c6f2bf78f84fae92d70b0e39cea6ebe/moveit_planners/stomp/include/stomp_moveit/stomp_moveit_task.hpp#L57

I tried bringing stomp 0.1.2 from ros_industrial, but then another dependency was needed (catkin), which has generally been dephased in favor of ament, colcon, etc. Neither stomp nor catkin are generally listed in the ros index for Jazzy (or any recent ROS distro), so I suspect I may be going down a slippery slope.

Any clues as to how to make this compile?

Could disabling the tests for moveit_planners/stomp make things compile?

@Bckempa Bckempa linked an issue Apr 12, 2025 that may be closed by this pull request
@Bckempa Bckempa moved this to In Progress in Space ROS Project Development Apr 12, 2025
@Bckempa Bckempa added this to the jazzy-2025.04.0 milestone Apr 12, 2025
@asimonov
Copy link
Collaborator

i have seen the same error and stopped.

is there not a jazzy version of moveit2 yet? there would be a dockerfile for it with relevant dependencies we can use as inspiration?

@Bckempa
Copy link
Contributor

Bckempa commented Apr 12, 2025

Sorry I was attempting to upgrade my FPGA toolchain at the same time and that never goes smoothly. Back on this now.

is there not a jazzy version of moveit2 yet?

Yep, for about 9 months.

there would be a dockerfile for it with relevant dependencies we can use as inspiration?

The one I found first just uses rolling as a base, but I'm digging deeper.

@Bckempa
Copy link
Contributor

Bckempa commented Apr 13, 2025

Good news is I got this working, the bad is it involves like 4 separate issues. I need some more time to make a coherent patch set from this, but it should also improve the build time and size of the moveit2 image in the process

@ivanperez-keera
Copy link
Contributor Author

ivanperez-keera commented Apr 13, 2025

@Bckempa excellent. Feel free to tag me to review any other PRs to close this quickly, and to push changes to this branch if anything in this partial solution still applies. We can rebase/squash/credit commits later as needed before this PR is approved.

@Bckempa
Copy link
Contributor

Bckempa commented Apr 14, 2025

Bug with the tests not correctly declaring their dependency on stomp opened upstream: moveit/moveit2#3436

@EzraBrooks can you triage that ASAP? If it's a same-day fix on the Picknik side (I'm happy to contribute a PR if that helps) that would be preferable, otherwise I can add a patch step to the Dockerfile the disable building those two tests.

I'm also woking on an issue with rosdep resolution that is causing it to install a whole jazzy distro. When I manually add the keys to the .repos file it works as-expected (no additional /opt/ros/jazzy directory and a significantly smaller apt install) but I can split that to a separate ticket since it technically "works" without that fix - just using a hybrid Space ROS / ROS 2 overlay.

@ivanperez-keera
Copy link
Contributor Author

ivanperez-keera commented Apr 14, 2025

I can add a patch step to the Dockerfile the disable building those two tests.

Would it make sense to temporarily make the Dockerfile just insert the necessary ament_target_dependencies line into moveit_planners/stomp/test/CMakeLists.txt?

Is it just adding these lines:

ament_target_dependencies(test_noise_generator stomp)
ament_target_dependencies(test_cost_functions stomp)

I'm also woking on an issue with rosdep resolution that is causing it to install a whole jazzy distro. [...] I can split that to a separate ticket since it technically "works" without that fix

I would separate it, yes. That optimization is not preventing installation. It'd be two different issues.

@Bckempa
Copy link
Contributor

Bckempa commented Apr 14, 2025

Fix for stomp merged to main upstream: moveit/moveit2#3437
Backport to Jazzy is in CI: moveit/moveit2#3438

After that we weed to add one more missing dep here to get to green, standby

@Bckempa Bckempa moved this from Done to In Progress in Space ROS Project Development Apr 14, 2025
The moveit2 image fails to build due to some dependencies not being found
during compilation.

This commit adds the missing dependencies to the list of packages needed by
moveit2.

Co-authored-by: Alexey Simonov <[email protected]>
Co-authored-by: Ivan Perez <[email protected]>
@Bckempa Bckempa force-pushed the dev-moveit2-jazzy branch from 7d6b0e8 to 64c42fe Compare April 14, 2025 19:53
@Bckempa
Copy link
Contributor

Bckempa commented Apr 14, 2025

Pushed the following fix-ups, should be good to go if build is green:

  1. Got test linkage fixed upstream
  2. Added one more missing dependent package, warehouse_ros_sqlite
  3. Set default build base to latest Jazzy release

@Bckempa Bckempa marked this pull request as ready for review April 14, 2025 20:06
@ivanperez-keera
Copy link
Contributor Author

@Bckempa No space left in Space ROS build.

mkdir /home/spaceros-user/moveit2/install/pilz_industrial_motion_planner/share/ament_index/resource_index/moveit_core__pluginlib__plugin: no space left on device

@Bckempa
Copy link
Contributor

Bckempa commented Apr 14, 2025

Ooft, that's an @EzraBrooks question. Good news is it fixed the moveit phase of the build, but we don't know if that broke Space Robots. I'll test this at home tonight (where if builds much faster) to at least give us a heads-up on if we can expect space robots to work as well.

@Bckempa
Copy link
Contributor

Bckempa commented Apr 14, 2025

It's extra annoying that we have to restart the whole job and do the 1.75 hour build that worked again. Will that cache be warm even if the job failed?

@ivanperez-keera
Copy link
Contributor Author

ivanperez-keera commented Apr 14, 2025

It should be (https://github.com/space-ros/docker/actions/runs/14454616962/job/40534921075#step:6:20571), but if you have to slim the moveit2 image (since this seems to be a space issue), then it won't matter as much.

@ivanperez-keera
Copy link
Contributor Author

I'm confused about why this line attempts to load an exported image that was created in the previous step.

https://github.com/space-ros/docker/actions/runs/14454616962/job/40534921075#step:6:20571

@ivanperez-keera
Copy link
Contributor Author

ivanperez-keera commented Apr 14, 2025

@Bckempa since the result of building moveit2 was cached, I tried hitting the re-build button and it went on.

This makes me suspect that running (some of) the space cleaning actions at the beginning of the CI job again after building and exporting the moveit2 image may help with the space issues.

The next error once the build continues is in the compilation of mongocxx:

https://github.com/space-ros/docker/actions/runs/14454616962/job/40544607040?pr=225#step:7:1655

possibly due to missing includes of <cstdint>.

@Bckempa
Copy link
Contributor

Bckempa commented Apr 15, 2025

We've gone beyond the scope of the issue and should either rename the issue and PR to reflect fixing the compilation issues for the whole space_robots workflow, or roll back to the point that moveit was fixed, merge, and open a separate issue to work on the space_robots demo container

@Bckempa
Copy link
Contributor

Bckempa commented Apr 15, 2025

Not quite there yet:

6.186 --- stderr: gz_transport_vendor
6.186 CMake Error at CMakeLists.txt:25 (find_package):
6.186   By not providing "Findgz_msgs_vendor.cmake" in CMAKE_MODULE_PATH this
6.186   project has asked CMake to find a package configuration file provided by
6.186   "gz_msgs_vendor", but CMake did not find one.
6.186
6.186   Could not find a package configuration file provided by "gz_msgs_vendor"
6.186   with any of the following names:
6.186
6.186     gz_msgs_vendorConfig.cmake
6.186     gz_msgs_vendor-config.cmake
6.186
6.186   Add the installation prefix of "gz_msgs_vendor" to CMAKE_PREFIX_PATH or set
6.186   "gz_msgs_vendor_DIR" to a directory containing one of the above files.  If
6.186   "gz_msgs_vendor" provides a separate development package or SDK, be sure it
6.186   has been installed.
6.186
6.186
6.186 ---
6.186 Failed   <<< gz_transport_vendor [4.73s, exited with code 1]

@Bckempa
Copy link
Contributor

Bckempa commented Apr 15, 2025

Why are we using a hand-coded .repos instead of the ros-install machinery?

@Bckempa
Copy link
Contributor

Bckempa commented Apr 15, 2025

Ok there is something really wrong here. I tired generating the repos and it is listing things that are clearly in the overlay and were picked up in the moveit layer.

I strongly recommend we close this with just the moveit changes and attack the jazzification of space_robots fresh, it's going to require more work.

@ivanperez-keera ivanperez-keera requested review from asimonov and Bckempa and removed request for asimonov April 15, 2025 15:40
@EzraBrooks
Copy link
Member

I tired generating the repos and it is listing things that are clearly in the overlay and were picked up in the moveit layer.

I think this was @dsobek's finding during the SBIR also

@EzraBrooks
Copy link
Member

No space left in Space ROS build.

I'm not sure how else we can free up space, the default runners are pretty wimpy and we don't have funding to supply larger runners.

Maybe we need to tweak the optimization level of these builds.

Copy link
Contributor

@Bckempa Bckempa left a comment

Choose a reason for hiding this comment

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

Too bad it doesn't fix the full build, but getting moveit2 up to jazzy is a good start

@Bckempa Bckempa merged commit 7029380 into main Apr 15, 2025
7 of 10 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Space ROS Project Development Apr 15, 2025
@Bckempa Bckempa deleted the dev-moveit2-jazzy branch April 15, 2025 16:57
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.

Moveit2 image fails to compile
4 participants