From aa27bb50b062203b9bacae18581052ba13409c9b Mon Sep 17 00:00:00 2001 From: franklinselva Date: Mon, 9 Sep 2024 11:57:28 +0200 Subject: [PATCH] Revert docker base image to osrf/space-ros:latest Related to space-ros/space-ros#178 --- canadarm2/Dockerfile | 7 +++++-- canadarm2/run.sh | 2 +- curiosity_rover/Dockerfile | 7 +++++-- curiosity_rover/run.sh | 2 +- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/canadarm2/Dockerfile b/canadarm2/Dockerfile index dbbfe05c..76d41efd 100644 --- a/canadarm2/Dockerfile +++ b/canadarm2/Dockerfile @@ -1,8 +1,11 @@ -FROM osrf/space-ros:core +FROM osrf/space-ros:latest ENV RMW_IMPLEMENTATION=rmw_cyclonedds_cpp +ENV ROS_DISTRO=humble +ENV HOME=/home/spaceros-user # Install dependencies +# Related to space-ros/space-ros#195 RUN sudo apt update && sudo apt install -y ros-${ROS_DISTRO}-control-msgs \ ros-${ROS_DISTRO}-rmw-cyclonedds-cpp @@ -16,7 +19,7 @@ COPY .defaults.yaml .defaults.yaml # Build the workspace RUN source /opt/ros/${ROS_DISTRO}/setup.bash \ - && source /opt/spaceros/setup.bash \ + && source $HOME/spaceros/install/setup.bash \ && colcon build # Source the workspace diff --git a/canadarm2/run.sh b/canadarm2/run.sh index 4e364ace..92d78e0a 100755 --- a/canadarm2/run.sh +++ b/canadarm2/run.sh @@ -20,7 +20,7 @@ run-control-demo() { xterm $XTERM_CONFIG -T 'CanadArm2 Demo' -e "docker run -it --rm \ -e RMW_IMPLEMENTATION=rmw_cyclonedds_cpp \ $DOCKER_IMAGE \ - bash -c 'source ~/.bashrc && ros2 launch canadarm_demo canadarm.launch.py'" & + bash -c 'source /home/spaceros-user/canadarm_ws/install/setup.bash && ros2 launch canadarm_demo canadarm.launch.py'" & } check_docker() { diff --git a/curiosity_rover/Dockerfile b/curiosity_rover/Dockerfile index 40eebd25..6d9baf18 100644 --- a/curiosity_rover/Dockerfile +++ b/curiosity_rover/Dockerfile @@ -1,8 +1,11 @@ -FROM osrf/space-ros:core +FROM osrf/space-ros:latest ENV RMW_IMPLEMENTATION=rmw_cyclonedds_cpp +ENV ROS_DISTRO=humble +ENV HOME=/home/spaceros-user # Install dependencies +# Related to space-ros/space-ros#195 RUN sudo apt update && sudo apt install -y ros-${ROS_DISTRO}-control-msgs \ ros-${ROS_DISTRO}-rmw-cyclonedds-cpp @@ -16,7 +19,7 @@ COPY .defaults.yaml .defaults.yaml # Build the workspace RUN source /opt/ros/${ROS_DISTRO}/setup.bash \ - && source /opt/spaceros/setup.bash \ + && source $HOME/spaceros/install/setup.bash \ && colcon build --symlink-install # Source the workspace diff --git a/curiosity_rover/run.sh b/curiosity_rover/run.sh index 4b77191e..6760015c 100755 --- a/curiosity_rover/run.sh +++ b/curiosity_rover/run.sh @@ -20,7 +20,7 @@ run-control-demo() { xterm $XTERM_CONFIG -T 'Curiosity Rover Demo' -e "docker run -it --rm \ -e RMW_IMPLEMENTATION=rmw_cyclonedds_cpp \ $DOCKER_IMAGE \ - bash -c 'source ~/.bashrc && ros2 launch curiosity_rover_demo mars_rover.launch.py'" & + bash -c 'source /home/spaceros-user/curiosity_ws/install/setup.bash && ros2 launch curiosity_rover_demo mars_rover.launch.py'" & } check_docker() {