Repository navigation
Expand file tree
/
Copy pathcompose.yaml
More file actions
100 lines (90 loc) · 3.81 KB
/
Copy pathcompose.yaml
File metadata and controls
100 lines (90 loc) · 3.81 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
# Runtime stack of one robot. The same file is used on every robot and by the
# local "sim" robot; what runs is selected by COMPOSE_PROFILES in the robot's
# .env (written by `ditx deploy`), e.g. COMPOSE_PROFILES=main,localization,monitoring
#
# Domains never get their own compose file: adding a domain = one service here,
# reviewed in the shell repo. Each service runs the stable image of its domain
# plus, optionally, an overlay pushed with `ditx deploy` (see docker/entrypoint.sh).
name: eurobot
x-ros: &ros
network_mode: host # DDS discovery across machines
ipc: host # shared memory between containers on the same machine
restart: unless-stopped
stop_grace_period: 3s
init: true
user: "${EUROBOT_UID:-1000}:${EUROBOT_GID:-1000}"
group_add: [dialout] # serial devices (/dev/dit-*, udev GROUP=dialout)
volumes:
# host side: /home/share/eurobot/{run,.,logs} on a robot, .sim-robot/ for the sim
- ${EUROBOT_RUN_DIR:-/home/share/eurobot/run}:/run/eurobot:ro
- ${EUROBOT_LIB_DIR:-/home/share/eurobot}:/var/lib/eurobot:ro
- ${EUROBOT_LOG_DIR:-/home/share/eurobot/logs}:/var/log/eurobot
- /etc/localtime:/etc/localtime:ro
x-env: &env
ROS_DOMAIN_ID: ${ROS_DOMAIN_ID:-0}
ROS_AUTOMATIC_DISCOVERY_RANGE: ${ROS_AUTOMATIC_DISCOVERY_RANGE:-SUBNET}
CYCLONEDDS_URI: ${CYCLONEDDS_URI:-file:///opt/eurobot/cyclonedds.xml}
RCUTILS_COLORIZED_OUTPUT: "0" # log files stay plain text (grep, AI summaries)
ROBOT: ${ROBOT:-sim}
EUROBOT_LOG_DIR: /var/log/eurobot
EUROBOT_ALLOW_SKEW: ${EUROBOT_ALLOW_SKEW:-0}
# robot accounts have no passwd entry in the image (HOME=/): keep ~/.ros writable for exec'd tools
ROS_HOME: /tmp/ros
services:
main:
<<: *ros
profiles: [main]
image: ${REGISTRY:-ghcr.io/dit-robotics}/eurobot-main:${TAG:-stable}
environment: {<<: *env, EUROBOT_CONTAINER: main}
navigation:
<<: *ros
profiles: [navigation]
image: ${REGISTRY:-ghcr.io/dit-robotics}/eurobot-navigation:${TAG:-stable}
environment: {<<: *env, EUROBOT_CONTAINER: navigation}
localization:
<<: *ros
profiles: [localization]
image: ${REGISTRY:-ghcr.io/dit-robotics}/eurobot-localization:${TAG:-stable}
environment: {<<: *env, EUROBOT_CONTAINER: localization}
# real sensors: uncomment and use the udev symlinks from infra/robot/udev
# devices: ["/dev/dit-lidar:/dev/dit-lidar", "/dev/dit-imu:/dev/dit-imu"]
vision:
<<: *ros
profiles: [vision]
image: ${REGISTRY:-ghcr.io/dit-robotics}/eurobot-vision:${TAG:-stable}
environment: {<<: *env, EUROBOT_CONTAINER: vision}
# cameras: device_cgroup_rules: ["c 81:* rmw", "c 189:* rmw"] + /dev:/dev
# micro-ROS agent for the STM32 boards; serial device from infra/robot/udev
uros-agent:
profiles: [firmware]
image: microros/micro-ros-agent:${ROS_DISTRO:-humble}
network_mode: host
restart: unless-stopped
command: serial --dev ${UROS_DEVICE:-/dev/dit-stm32} -b ${UROS_BAUD:-1000000}
devices: ["${UROS_DEVICE:-/dev/dit-stm32}:${UROS_DEVICE:-/dev/dit-stm32}"]
environment: {ROS_DOMAIN_ID: "${ROS_DOMAIN_ID:-0}"}
# Live CPU / RAM / disk / network / per-container metrics at http://<robot>:19999
netdata:
profiles: [monitoring]
image: netdata/netdata:stable
network_mode: host
pid: host
restart: unless-stopped
cap_add: [SYS_PTRACE, SYS_ADMIN]
security_opt: [apparmor:unconfined]
volumes:
- netdata-config:/etc/netdata
- netdata-lib:/var/lib/netdata
- netdata-cache:/var/cache/netdata
- /:/host/root:ro,rslave
- /etc/passwd:/host/etc/passwd:ro
- /etc/group:/host/etc/group:ro
- /etc/os-release:/host/etc/os-release:ro
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /var/log:/host/var/log:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
volumes:
netdata-config:
netdata-lib:
netdata-cache: