-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
134 lines (127 loc) · 3.94 KB
/
docker-compose.yaml
File metadata and controls
134 lines (127 loc) · 3.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# This file is configured for a secure, isolated ROS network.
services:
roscore:
image: ghcr.io/comrob/slam-bench:latest
container_name: roscore
hostname: roscore
networks:
- ros-net
command: roscore
ports:
- "11311:11311" # Expose master port for host-based debugging tools
environment:
# The roscore advertises its own hostname.
ROS_HOSTNAME: roscore
healthcheck:
test: ["CMD", "bash", "-c", "source /app/entrypoints/ros_entrypoint.sh && rostopic list"]
interval: 1s
timeout: 3s
retries: 30
record_odometry:
image: ghcr.io/comrob/slam-bench:latest
init: true
container_name: record_odometry
hostname: record_odometry
networks:
- ros-net
user: "1000:1000"
depends_on:
roscore:
condition: service_healthy
environment:
# Explicit ROS network configuration
ROS_MASTER_URI: http://roscore:11311
ROS_HOSTNAME: record_odometry
# Service-specific variables
ROS_HOME: /tmp/.ros
OUTPUT_FILE_NAME: ${OUTPUT_FILE_NAME}
OUTPUT_PATH_HOST: ${OUTPUT_PATH_HOST}
volumes:
- ${OUTPUT_PATH_HOST}:/trajectory_files
entrypoint: ["/app/entrypoints/entrypoint_record_odometry.sh"]
play_bag:
image: ghcr.io/comrob/slam-bench:latest
init: true
container_name: play_bag
hostname: play_bag
networks:
- ros-net
user: "1000:1000"
depends_on:
roscore:
condition: service_healthy
environment:
# Explicit ROS network configuration
ROS_MASTER_URI: http://roscore:11311
ROS_HOSTNAME: play_bag
# Service-specific variables
BAGFILES_PATH_HOST: ${BAGFILES_PATH_HOST}
BAGFILE_NAME: ${BAGFILE_NAME:-sensors}
ROSBAG_PLAY_RATE: ${ROSBAG_PLAY_RATE}
TOPICS_FILE: ${TOPICS_FILE}
ROS_HOME: /tmp/.ros
volumes:
- ${BAGFILES_PATH_HOST}:/rosbag_files
entrypoint: ["/app/entrypoints/entrypoint_play_bag.sh"]
run_slam_nvidia:
image: ${SLAM_IMAGE:-$CRL_SLAM_IMAGE}
container_name: run_slam_nvidia
hostname: run_slam_nvidia
networks:
- ros-net
depends_on:
roscore:
condition: service_healthy
environment:
# Explicit ROS network configuration
ROS_MASTER_URI: http://roscore:11311
ROS_HOSTNAME: run_slam_nvidia
# Service-specific variables
DISPLAY: ${DISPLAY}
NVIDIA_VISIBLE_DEVICES: all
NVIDIA_DRIVER_CAPABILITIES: compute,utility
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix
- ${SLAM_CONFIG_OVERRIDE_FILE:-/dev/null}:/config/override.yaml
run_slam:
image: ${SLAM_IMAGE:-$CRL_SLAM_IMAGE}
container_name: run_slam
hostname: run_slam
networks:
- ros-net
depends_on:
roscore:
condition: service_healthy
environment:
# Explicit ROS network configuration
ROS_MASTER_URI: http://roscore:11311
ROS_HOSTNAME: run_slam
# Service-specific variables
DISPLAY: ${DISPLAY}
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix
- ${SLAM_CONFIG_OVERRIDE_FILE:-./config/slam/override_config.yaml.example}:/config/override.yaml
# This service does not perform ROS communication, so it doesn't need network config.
evaluate_trajectory:
init: true
image: ghcr.io/comrob/slam-bench:latest
container_name: evaluate_trajectory
user: "1000:1000"
environment:
TEST_MODE: ${TEST_MODE}
volumes:
- ${REFERENCE_TRAJECTORY_FILE_HOST:-/reference_trajectory.txt}:/reference_trajectory.txt
- ${ESTIMATED_TRAJECTORY_FILE_HOST:-/estimated_trajectory.txt}:/estimated_trajectory.txt
- ${OUTPUT_PATH_HOST:-/evaluation_output}:/evaluation_output
entrypoint: ["/app/entrypoints/entrypoint_evaluate.sh"]
# Define the custom bridge network for isolated ROS communication.
networks:
ros-net:
driver: bridge