forked from ika-rwth-aachen/carlos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
48 lines (42 loc) · 1.65 KB
/
docker-compose.yml
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
# you can utilize yaml features to avoid repeating yourself and centralizing configurations
x-rviz-config-mount: &rviz-config-mount ./config.rviz:/config.rviz
# ==============================================================================
services:
# starts a CARLA simulator instance named 'carla-simulator' with a GUI window
carla-simulator:
extends:
file: ../components.yml
service: carla-simulator
carla-client:
extends:
file: ../components.yml
service: carla-client
depends_on:
carla-simulator:
condition: service_healthy
command: sleep infinity
# starts the carla-ros-bridge
carla-ros-bridge:
extends:
file: ../components.yml
service: carla-ros-bridge
depends_on:
carla-simulator:
condition: service_healthy
# ...and then execute them. Note the -ic flag for an interactive bash!
# Without an interactive bash, many important env vars wouldn't be working or even set
command: bash -ic 'ros2 launch carla_ros_bridge carla_ros_bridge_with_example_ego_vehicle.launch.py host:=carla-simulator'
# .. note that the host name is explictly set to the name of the carla-simulator Docker service!
# starts rviz with a GUI window named 'ros-monitoring'
ros-monitoring:
extends:
file: ../components.yml
service: ros-monitoring
depends_on:
carla-simulator:
condition: service_healthy
volumes:
# you can mount custom rviz configs...
- *rviz-config-mount
# ...and then use them when starting up rviz with the -d flag
command: bash -ic 'rviz2 -d /config.rviz --ros-args -p use_sim_time:=true &> /dev/null'