Ask Your Question

docker source-build - colcon build is not processing packages

asked 2021-07-30 08:03:04 -0500

B00M3R gravatar image

updated 2021-07-30 08:03:55 -0500

Hi everybody,

I'm trying to install ROS2 Galactic in an existing docker image with a dockerfile. As it should run on a Nvidia Jetson Xavier NX I used a nvidia:l4t-base image. Therefore i need to do a source build of Galactic. I followed the offical instructions and now im struggling with the colcon build (Build the code in the workspace).

I always get "Summary: 0 packages finished [0.52s]"

The failing part of the docker file:

# ROS Build the code in the workspace
RUN sudo mkdir /opt/ros
RUN /bin/bash -c "cd ~/ros2_galactic/ && colcon build --merge-install --install-base /opt/ros/galactic"

Other tryouts:

# 1 (like official guide)
RUN cd ~/ros2_galactic/
RUN colcon build --symlink-install
# 2
RUN sudo mkdir /opt/ros
RUN cd ~/ros2_galactic/
RUN colcon build --merge-install --install-base /opt/ros/galactic

As you can see in the commented part I tried some stuff ;-)

But the output is always:

#All required rosdeps installed successfully
Removing intermediate container 5c2fe36c7090
 ---> 506a73730818
Step 31/33 : RUN sudo mkdir /opt/ros
 ---> Running in 5cf09e067579
Removing intermediate container 5cf09e067579
 ---> 86454cf5bc62
Step 32/33 : RUN cd ~/ros2_galactic/
 ---> Running in 1a5a151b3be1
Removing intermediate container 1a5a151b3be1
 ---> 44615039d2bc
Step 33/33 : RUN /bin/bash -c "colcon build --merge-install --install-base /opt/ros/galactic"
 ---> Running in 53facd0527ea

Summary: 0 packages finished [0.52s]
Removing intermediate container 53facd0527ea
 ---> 61af90dd1740
Successfully built 61af90dd1740
Successfully tagged ros2/galactic:sourcebuild

However - If I run a container from that created image and do it manually it works and colcon starts compiling.

botdev@xaviernx:~/docker-galactic$ docker run -it --rm ros2/galactic:sourcebuild
root@418f2f9f675a:/usr/local# cd ~/ros2_galactic/
root@418f2f9f675a:~/ros2_galactic# colcon build --merge-install --install-base /opt/ros/galactic
Starting >>> ament_package
Starting >>> ament_lint
Starting >>> gtest_vendor
Starting >>> fastcdr
Starting >>> ament_cppcheck
Starting >>> iceoryx_utils
Aborted  <<< fastcdr [3.44s]
Aborted  <<< iceoryx_utils [3.43s]
Aborted  <<< ament_cppcheck [3.48s]

Any help is appreciated - thanks in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2021-07-30 13:33:27 -0500

B00M3R gravatar image

I figured it out... Not sure why thoug... I installed some software before ROS which seems to mess up the colcon build. After swapping the parts in the dockerfile it worked.

edit flag offensive delete link more


As a side note, I'd use official nvidia package for that instead of building from scratch

Serafadam gravatar image Serafadam  ( 2021-08-05 06:16:28 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2021-07-30 08:03:04 -0500

Seen: 53 times

Last updated: Jul 30 '21