Skip to content

Commit

Permalink
Resolves #67 moves colcon build to dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
BarisYazici committed Sep 13, 2024
1 parent 8aa0a59 commit 444a1d1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
11 changes: 11 additions & 0 deletions ingenuity_mars_helicopter/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@

FROM osrf/space-ros:latest

# Set Bash as the default shell
SHELL ["/bin/bash", "-c"]

# Disable prompting during package installation
ARG DEBIAN_FRONTEND=noninteractive

ENV INGENUITY_DIR=${HOME_DIR}/ingenuity_helicopter
WORKDIR ${INGENUITY_DIR}

RUN sudo apt-get update && \
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y --no-install-recommends \
Expand Down Expand Up @@ -83,6 +87,13 @@ COPY ./entrypoint.sh ${INGENUITY_DIR}/entrypoint.sh

RUN sudo chown -R ${USERNAME}:${USERNAME} ${INGENUITY_DIR}

RUN export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp && \
source /home/spaceros-user/spaceros/install/setup.bash && \
source /opt/ros/humble/setup.bash && \
cd /home/spaceros-user/ingenuity_helicopter && \
colcon build --packages-select helicopter_flight_control helicopter_flight_simulation ingenuity_description ingenuity_bringup


RUN sudo chmod +x ${INGENUITY_DIR}/entrypoint.sh

ENTRYPOINT ["/home/spaceros-user/ingenuity_helicopter/entrypoint.sh"]
5 changes: 0 additions & 5 deletions ingenuity_mars_helicopter/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
#!/bin/bash
sudo chown -R ${USERNAME}:${USERNAME} /home/spaceros-user/ingenuity_helicopter
source /home/spaceros-user/spaceros/install/setup.sh
source /opt/ros/humble/setup.sh
cd /home/spaceros-user/ingenuity_helicopter
colcon build --packages-select helicopter_flight_control helicopter_flight_simulation ingenuity_description ingenuity_bringup
source /home/spaceros-user/ingenuity_helicopter/install/setup.sh
ros2 launch ingenuity_bringup ingenuity_demo.launch.py

0 comments on commit 444a1d1

Please sign in to comment.