This repository has been archived by the owner on Jun 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
92 lines (85 loc) · 1.93 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
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
version: '3'
services:
roscore:
tty: true
hostname: roscore
image: "ros:${ROS_DISTRO}"
command: ["roscore", "-p", "11311"]
environment:
ROS_MASTER_URI: "${ROS_MASTER_URI}"
ROS_HOSTNAME: "${ROS_HOSTNAME}"
ports:
- "11311:11311"
networks:
- ros
# simple example rosnode to connect to roscore
# implements talker and listener
listener:
image: ros-catkin-self
tty: true
depends_on:
- roscore
environment:
ROS_MASTER_URI: "${ROS_MASTER_URI}"
ROS_HOSTNAME: "listener"
command: ["/opt/catkin_ws/src/listen/run.sh"]
# command: ["ping", "roscore"]
volumes:
- ./volumes/listen:/opt/catkin_ws/src/listen
networks:
- ros
talker:
build:
context: ./ros/docker
dockerfile: Dockerfile
args:
ROS_DISTRO: "${ROS_DISTRO}"
image: ros-catkin-self
tty: true
depends_on:
- roscore
environment:
ROS_MASTER_URI: "${ROS_MASTER_URI}"
ROS_HOSTNAME: "talker"
command: ["/opt/catkin_ws/src/talk/run.sh"]
volumes:
- ./volumes/talk:/opt/catkin_ws/src/talk
networks:
- ros
# ROSnode running the webbridge
rosbridge:
image: ros-catkin-self
tty: true
depends_on:
- roscore
environment:
ROS_MASTER_URI: "${ROS_MASTER_URI}"
ROS_HOSTNAME: "rosbridge"
networks:
- ros
command: ["/opt/catkin_ws/src/rosbridge/run.sh"]
volumes:
- ./volumes/rosbridge:/opt/catkin_ws/src/rosbridge
ports:
- 8080:8080
# core web bridge
roslib:
build:
context: ./python/docker
dockerfile: Dockerfile
args:
ROS_DISTRO: "${ROS_DISTRO}"
image: python-roslibpy
depends_on:
- roscore
- talker
- rosbridge
volumes:
- ./volumes/roslibpy:/roslibpy
working_dir: "/roslibpy"
command: ["python3", "-m", "pytest"]
networks:
- ros
networks:
ros:
driver: bridge