Skip to content

Commit

Permalink
fix: Stop the container via SIGINT
Browse files Browse the repository at this point in the history
This is a workaround for the `special` signal handling of ros2 launch.
To stop a process docker sends a SIGTERM on default.
The ros2 launch wrapper however ignores SIGTERM (only SIGINT is
considered).
Docker then sends a SIGKILL after a timeout.
As a result, the shutdown times of the container are at least as long as the
timeout.
This change makes docker send SIGINT instead of SIGTERM, resulting in
proper fast shutdown.
See ros2/launch#666 for details.
  • Loading branch information
philipp-caspers committed Oct 18, 2024
1 parent 803fbf9 commit 040ecff
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ services:
image: ghcr.io/vorausrobotik/voraus-ros-bridge:main
command: ros2 launch voraus-ros-bridge voraus-ros-bridge.launch.py
network_mode: host
stop_signal: SIGINT
environment:
- AMENT_PREFIX_PATH=/root/voraus-ros-bridge/install/voraus-ros-bridge:/opt/ros/humble
- ROS_NAMESPACE=robot1
Expand Down

0 comments on commit 040ecff

Please sign in to comment.