From 7576771f9949fb060072ed5184e943c482341827 Mon Sep 17 00:00:00 2001 From: stevedan Date: Sat, 7 Sep 2024 08:16:50 +0200 Subject: [PATCH] fix build (fixes issue #36) Signed-off-by: stevedan --- .../docker/Dockerfile | 22 +++++-------------- .../docker/demo-pkgs.txt | 5 ++++- .../docker/excluded-pkgs.txt | 1 - 3 files changed, 9 insertions(+), 19 deletions(-) diff --git a/lunar_pole_exploration_rover/docker/Dockerfile b/lunar_pole_exploration_rover/docker/Dockerfile index 6e0095bd..ce3b1ba7 100644 --- a/lunar_pole_exploration_rover/docker/Dockerfile +++ b/lunar_pole_exploration_rover/docker/Dockerfile @@ -101,26 +101,12 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ --mount=type=cache,target=/var/lib/apt,sharing=locked \ sudo apt-get update -y && sudo apt-get install -y python3-rosinstall-generator -# Install libmongoc for development -RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ - --mount=type=cache,target=/var/lib/apt,sharing=locked \ - sudo apt-get install libmongoc-dev -y - - -# Compile mongo cxx driver https://mongocxx.org/mongocxx-v3/installation/linux/ -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 - - # Generate repos file for dependencies, excluding packages from Space ROS core. COPY --chown=${USERNAME}:${USERNAME} demo-pkgs.txt /tmp/ COPY --chown=${USERNAME}:${USERNAME} excluded-pkgs.txt /tmp/ RUN rosinstall_generator \ + --upstream \ --rosdistro ${ROSDISTRO} \ --deps \ --exclude-path ${SPACEROS_DIR}/src \ @@ -140,9 +126,11 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ && /bin/bash -c 'source "${SPACEROS_DIR}/install/setup.bash"' \ && rosdep install --from-paths src --ignore-src -r -y --rosdistro ${ROSDISTRO} +ENV MAKEFLAGS="-j1" + # build demo RUN /bin/bash -c 'source ${SPACEROS_DIR}/install/setup.bash \ - && colcon build --executor sequential --cmake-args -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=ON --event-handlers desktop_notification- status-' + && colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=ON --event-handlers desktop_notification- status-' # Add the user to the render group so that the user can access /dev/dri/renderD128 @@ -162,4 +150,4 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ # Setup the entrypoint COPY ./entrypoint.sh / ENTRYPOINT ["/entrypoint.sh"] -CMD ["bash"] \ No newline at end of file +CMD ["bash"] diff --git a/lunar_pole_exploration_rover/docker/demo-pkgs.txt b/lunar_pole_exploration_rover/docker/demo-pkgs.txt index 5cc28748..f7a4c369 100644 --- a/lunar_pole_exploration_rover/docker/demo-pkgs.txt +++ b/lunar_pole_exploration_rover/docker/demo-pkgs.txt @@ -1,9 +1,12 @@ angles backward_ros control_msgs -rviz2 ros2_control warehouse_ros xacro yaml_cpp_vendor python_qt_binding +control_toolbox +ros_warehouse +mongo +ackermann_msgs diff --git a/lunar_pole_exploration_rover/docker/excluded-pkgs.txt b/lunar_pole_exploration_rover/docker/excluded-pkgs.txt index 7ad42a8a..c9d845c9 100644 --- a/lunar_pole_exploration_rover/docker/excluded-pkgs.txt +++ b/lunar_pole_exploration_rover/docker/excluded-pkgs.txt @@ -1,6 +1,5 @@ fastrtps fastcdr -generate_parameter_library rmw_fastrtps_cpp rmw_fastrtps_dynamic_cpp rmw_fastrtps_shared_cpp