Skip to content

Commit

Permalink
fix build (fixes issue space-ros#36)
Browse files Browse the repository at this point in the history
Signed-off-by: stevedan <stevedan.o.omodolor@gmail.com>
  • Loading branch information
stevedanomodolor authored and mkhansenbot committed Sep 9, 2024
1 parent 2bee392 commit 7576771
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 19 deletions.
22 changes: 5 additions & 17 deletions lunar_pole_exploration_rover/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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
Expand All @@ -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"]
CMD ["bash"]
5 changes: 4 additions & 1 deletion lunar_pole_exploration_rover/docker/demo-pkgs.txt
Original file line number Diff line number Diff line change
@@ -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
1 change: 0 additions & 1 deletion lunar_pole_exploration_rover/docker/excluded-pkgs.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
fastrtps
fastcdr
generate_parameter_library
rmw_fastrtps_cpp
rmw_fastrtps_dynamic_cpp
rmw_fastrtps_shared_cpp
Expand Down

0 comments on commit 7576771

Please sign in to comment.