Docker
Docker Troubleshooting#
Drivers containers exits/restarts immediately#
Cause: The launch command failed, most commonly a missing or mismatched device path, or a misconfigured launch argument.
or
Check that the device paths exist on the host:
If devices are missing, make sure udev rules are installed and reload them:
Camera container starts but no image topics appears#
Cause: Device nodes exist but the RealSense SDK cannot open the camera, often a permissions issue or a wrong video device mapping.
docker exec -it front_camera_driver bash
source /ros2_ws/install/setup.bash
ros2 node list # Is realsense2_camera present?
ros2 topic list # Are /color/image_raw etc. published?
v4l2-ctl --list-devices # Check which /dev/videoN devices are visible inside the container
Verify that the devices: mapping in the Compose file matches the actual host device assignments for the RealSense streams.
No ROS 2 nodes visible from the host#
Cause: DDS discovery is failing, typically a network interface mismatch or missing network_mode: host.
- Confirm
network_mode: hostis set for all containers - Confirm
cyclonedds.xmlis binding to the correct network interface - Confirm
ROS_DOMAIN_IDmatches on both the host and inside containers
colcon build fails during image build#
Cause: Usually a missing dependency or wrong build context.
- Ensure you are building from the repository root (see Build Image)
- Check
rosdepoutput in the build log for unresolved packages - Try
--no-cacheto rule out stale layers:
docker build --no-cache \
-f infra/docker/actuation/Dockerfile \
-t micipsa/actuation:jazzy-v1.0.0 \
.
Nodes run but container unhealthy#
Cause: Usually system is under heavy load
A common mistake is using DDS-based commands in healthchecks:
# ❌ Fragile ddepends on DDS discovery succeeding under load
test: ["CMD", "bash", "-c", "ros2 topic info /tf_static --no-daemon"]
ros2 topic info performs DDS peer discovery every time it runs. When the system is under heavy load (SLAM + Navigation publishing simultaneously), discovery can time out, causing healthy containers to be marked unhealthy.
Prefer process-level checks for stateless publishers:
# ✅ Fast, local, unaffected by DDS load
test: ["CMD", "bash", "-c", "pgrep -f robot_state_publisher > /dev/null"]
Note
Healthchecks run continuously for the entire container lifetime, not just at startup. depends_on: condition: service_healthy only gates the startup chain, it does not restart dependents if a container later becomes unhealthy.
