From f35e1b69a7404bd47e47e6660f67e4aa89eb6ef6 Mon Sep 17 00:00:00 2001 From: dominikn Date: Tue, 2 Jan 2024 16:51:04 +0100 Subject: [PATCH] fix also gazebo dockerfile --- Dockerfile.gazebo | 8 +++----- demo/compose.gazebo.yaml | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Dockerfile.gazebo b/Dockerfile.gazebo index 0da3f75..ef3af09 100644 --- a/Dockerfile.gazebo +++ b/Dockerfile.gazebo @@ -105,12 +105,10 @@ RUN apt-get update && apt-get install -y \ rm -rf /var/lib/apt/lists/* COPY healthcheck.sh / +COPY run_healthcheck_node.sh / HEALTHCHECK --interval=5s --timeout=2s --start-period=5s --retries=4 \ CMD ["/healthcheck.sh"] -RUN new_content1='source "/ros2_ws_healthcheck/install/setup.bash"' && \ - new_content2='gosu $USER bash -c "ros2 run healthcheck_pkg healthcheck_node &"' && \ - file=$(ls /*_entrypoint.sh | head -n 1) && \ - sed -i "/exec/i $new_content1" $file && \ - sed -i "/exec/i $new_content2" $file +RUN sed -i "/# /r /run_healthcheck_node.sh" /ros_entrypoint.sh && \ + sed -i "/# /d" /ros_entrypoint.sh diff --git a/demo/compose.gazebo.yaml b/demo/compose.gazebo.yaml index 8e67483..aa903d4 100644 --- a/demo/compose.gazebo.yaml +++ b/demo/compose.gazebo.yaml @@ -24,7 +24,7 @@ services: build: context: ../ dockerfile: Dockerfile.gazebo - <<: [ *cpu-config] + <<: [ *gpu-config] volumes: - /tmp/.X11-unix:/tmp/.X11-unix:rw command: ros2 launch rosbot_gazebo simulation.launch.py mecanum:=${MECANUM:-False}