1
1
services :
2
- picarx-gazebo :
3
- build :
4
- context : Dockerfile
5
- dockerfile : ./simulation
6
- target : tests
7
- args :
8
- - TAG=${TAG:-latest}
9
- image : abarbie/picarx-gazebo:${TAG}
10
- env_file :
11
- - ./core/dtp/env/simulation.env
2
+ picarx :
3
+ image : abarbie/picarx:${TAG:-latest}
12
4
environment :
13
- - DISPLAY=host.docker.internal:0.0
14
- - LIBGL_ALWAYS_INDIRECT=0
15
- - ROS_HOSTNAME=picarx-gazebo
5
+ - ROS_HOSTNAME=picarx
6
+ - ROS_MASTER_URI=http://picarx:11311
7
+ - ROS_HOST_PORT=11311
16
8
tty : true
17
9
ports :
18
- - 11312:11312
19
- volumes :
20
- - ./core:/root/catkin_ws/src/core
21
- - ./simulation:/root/catkin_ws/src/simulation
22
- command : /bin/bash -c "roslaunch picarx_gazebo picarx-world.launch & roslaunch picarx_control picarx_control.launch & source install/setup.bash ; sleep 30 ; python3 src/simulation/picarx_control/tests/steering_integration_test.py"
10
+ - 11311:11311
11
+ command : roscore
12
+ restart : on-failure
23
13
healthcheck :
24
14
test : [ "CMD-SHELL", "curl $${ROS_MASTER_URI} || exit 1" ]
25
15
interval : 5s
@@ -30,12 +20,13 @@ services:
30
20
shadow-dtp :
31
21
image : abarbie/picarx:${TAG:-latest}
32
22
env_file :
33
- - ./core/dtp/env/simulation .env
23
+ - ./core/dtp/env/picarx .env
34
24
tty : true
35
25
command : /bin/bash -c "roslaunch arches_core digitalshadow_pt.launch"
36
26
depends_on :
37
- picarx-dt :
27
+ picarx :
38
28
condition : service_healthy
29
+ restart : on-failure
39
30
40
31
mqtt-dtp :
41
32
image : abarbie/picarx-arches-mqtt-bridge:${TAG}
@@ -46,12 +37,13 @@ services:
46
37
- TAG=${TAG:-latest}
47
38
- ARCH=${ARCH:-}
48
39
env_file :
49
- - ./core/dtp/env/simulation .env
40
+ - ./core/dtp/env/picarx .env
50
41
tty : true
51
42
command : /bin/bash -c "roslaunch arches_mqtt_bridge pt_client.launch host:=mqtt-server"
52
43
depends_on :
53
- picarx-dt :
44
+ picarx :
54
45
condition : service_healthy
46
+ restart : on-failure
55
47
56
48
motor_left-dtp :
57
49
build :
@@ -62,56 +54,62 @@ services:
62
54
- ARCH=${ARCH:-}
63
55
image : abarbie/picarx-dcmotor-driver:${TAG}
64
56
env_file :
65
- - ./core/dtp/env/simulation .env
57
+ - ./core/dtp/env/picarx .env
66
58
tty : true
67
59
privileged : true
68
60
volumes :
69
61
- /sys/class/gpio:/sys/class/gpio
70
- - /dev/i2c-0:/dev/i2c-0
62
+ - /dev/gpiochip0:/dev/gpiochip0
63
+ - /dev/i2c-11:/dev/i2c-11
71
64
- ./core:/root/catkin_ws/src/core
72
65
- ./ros/drivers/dcmotor:/root/catkin_ws/src/drivers/dcmotor
73
- command : /bin/bash -c "roslaunch picarx_dcmotor_driver dcmotor_left.launch"
66
+ command : /bin/bash -c "roslaunch picarx_dcmotor_driver dcmotor_left.launch motor1_i2c_port:=/dev/i2c-11 "
74
67
depends_on :
75
- picarx-dt :
68
+ picarx :
76
69
condition : service_healthy
70
+ restart : on-failure
77
71
78
72
motor_right-dtp :
79
73
image : abarbie/picarx-dcmotor-driver:${TAG}
80
74
tty : true
81
75
env_file :
82
- - ./core/dtp/env/simulation .env
76
+ - ./core/dtp/env/picarx .env
83
77
privileged : true
84
78
volumes :
85
79
- /sys/class/gpio:/sys/class/gpio
86
- - /dev/i2c-0:/dev/i2c-0
80
+ - /dev/gpiochip0:/dev/gpiochip0
81
+ - /dev/i2c-11:/dev/i2c-11
87
82
- ./core:/root/catkin_ws/src/core
88
83
- ./ros/drivers/dcmotor:/root/catkin_ws/src/drivers/dcmotor
89
- command : /bin/bash -c "roslaunch picarx_dcmotor_driver dcmotor_right.launch"
84
+ command : /bin/bash -c "roslaunch picarx_dcmotor_driver dcmotor_right.launch motor2_i2c_port:=/dev/i2c-11 "
90
85
depends_on :
91
- picarx-dt :
86
+ picarx :
92
87
condition : service_healthy
88
+ restart : on-failure
93
89
94
90
steering-dtp :
95
- image : abarbie/picarx-clutchgear-emulator :${TAG}
91
+ image : abarbie/picarx-clutchgear-driver :${TAG}
96
92
build :
97
93
dockerfile : Dockerfile
98
94
context : ./ros/drivers/clutchgear
99
95
args :
100
96
- TAG=${TAG:-latest}
101
97
- ARCH=${ARCH:-}
102
98
env_file :
103
- - ./core/dtp/env/simulation .env
99
+ - ./core/dtp/env/picarx .env
104
100
tty : true
105
101
privileged : true
106
102
volumes :
107
103
- /sys/class/gpio:/sys/class/gpio
108
- - /dev/i2c-0:/dev/i2c-0
104
+ - /dev/gpiochip0:/dev/gpiochip0
105
+ - /dev/i2c-11:/dev/i2c-11
109
106
- ./core:/root/catkin_ws/src/core
110
107
- ./ros/drivers/clutchgear:/root/catkin_ws/src/drivers/clutchgear
111
- command : /bin/bash -c "roslaunch picarx_clutchgear_driver ackermann_clutchgear_driver.launch"
108
+ command : /bin/bash -c "roslaunch picarx_clutchgear_driver ackermann_clutchgear_driver.launch i2c_port:=/dev/i2c-11 "
112
109
depends_on :
113
- picarx-dt :
110
+ picarx :
114
111
condition : service_healthy
112
+ restart : on-failure
115
113
116
114
ackermann_skill-dtp :
117
115
image : abarbie/picarx-ackermann-skill:${TAG}
@@ -122,18 +120,20 @@ services:
122
120
- TAG=${TAG:-latest}
123
121
- ARCH=${ARCH:-}
124
122
env_file :
125
- - ./core/dtp/env/simulation .env
123
+ - ./core/dtp/env/picarx .env
126
124
tty : true
127
125
privileged : true
128
126
volumes :
129
127
- /sys/class/gpio:/sys/class/gpio
130
- - /dev/i2c-0:/dev/i2c-0
128
+ - /dev/gpiochip0:/dev/gpiochip0
129
+ - /dev/i2c-11:/dev/i2c-11
131
130
- ./core:/root/catkin_ws/src/core
132
131
- ./ros/skills/ackermann_drive:/root/catkin_ws/src/skills/ackermann_drive
133
132
command : /bin/bash -c "roslaunch picarx_ackermann_drive ackermann_skill.launch"
134
133
depends_on :
135
- picarx-dt :
134
+ picarx :
136
135
condition : service_healthy
136
+ restart : on-failure
137
137
138
138
motor_emulator_left-dtp :
139
139
image : abarbie/picarx-dcmotor-emulator:${TAG}
@@ -144,56 +144,53 @@ services:
144
144
- TAG=${TAG:-latest}
145
145
- ARCH=${ARCH:-}
146
146
env_file :
147
- - ./core/dtp/env/simulation.env
147
+ - ./core/dtp/env/simulation-external .env
148
148
tty : true
149
149
privileged : true
150
150
volumes :
151
151
- /sys/class/gpio:/sys/class/gpio
152
- - /dev/i2c-0:/dev/i2c-0
152
+ - /dev/gpiochip0:/dev/gpiochip0
153
+ - /dev/i2c-11:/dev/i2c-11
153
154
- ./core:/root/catkin_ws/src/core
154
155
- ./ros/emulators/dcmotor:/root/catkin_ws/src/emulators/dcmotor
155
- command : /bin/bash -c "roslaunch picarx_dcmotor_emulator dcmotor_emulator_left.launch"
156
- depends_on :
157
- picarx-dt :
158
- condition : service_healthy
156
+ command : /bin/bash -c "roslaunch picarx_dcmotor_emulator dcmotor_emulator_left.launch i2c_port:=/dev/i2c-11"
157
+ restart : on-failure
159
158
160
159
motor_emulator_right-dtp :
161
160
image : abarbie/picarx-dcmotor-emulator:${TAG}
162
161
env_file :
163
- - ./core/dtp/env/simulation.env
162
+ - ./core/dtp/env/simulation-external .env
164
163
tty : true
165
164
privileged : true
166
165
volumes :
167
166
- /sys/class/gpio:/sys/class/gpio
168
- - /dev/i2c-0:/dev/i2c-0
167
+ - /dev/gpiochip0:/dev/gpiochip0
168
+ - /dev/i2c-11:/dev/i2c-11
169
169
- ./core:/root/catkin_ws/src/core
170
170
- ./ros/emulators/dcmotor:/root/catkin_ws/src/emulators/dcmotor
171
- command : /bin/bash -c "roslaunch picarx_dcmotor_emulator dcmotor_emulator_right.launch"
172
- depends_on :
173
- picarx-dt :
174
- condition : service_healthy
171
+ command : /bin/bash -c "roslaunch picarx_dcmotor_emulator dcmotor_emulator_right.launch i2c_port:=/dev/i2c-11"
172
+ restart : on-failure
175
173
176
174
steering_emulator-dtp :
177
- image : abarbie/picarx/emulators/ clutchgear:${TAG}
175
+ image : abarbie/picarx- clutchgear-emulator :${TAG}
178
176
build :
179
177
dockerfile : Dockerfile
180
178
context : ./ros/emulators/clutchgear
181
179
args :
182
180
- TAG=${TAG:-latest}
183
181
- ARCH=${ARCH:-}
184
182
env_file :
185
- - ./core/dtp/env/simulation.env
183
+ - ./core/dtp/env/simulation-external .env
186
184
tty : true
187
185
privileged : true
188
186
volumes :
189
187
- /sys/class/gpio:/sys/class/gpio
190
- - /dev/i2c-0:/dev/i2c-0
188
+ - /dev/gpiochip0:/dev/gpiochip0
189
+ - /dev/i2c-11:/dev/i2c-11
191
190
- ./core:/root/catkin_ws/src/core
192
191
- ./ros/emulators/clutchgear:/root/catkin_ws/src/emulators/clutchgear
193
- command : /bin/bash -c "roslaunch picarx_clutchgear_emulator ackermann_clutchgear_emulator.launch"
194
- depends_on :
195
- picarx-dt :
196
- condition : service_healthy
192
+ command : /bin/bash -c "roslaunch picarx_clutchgear_emulator ackermann_clutchgear_emulator.launch i2c_port:=/dev/i2c-11"
193
+ restart : on-failure
197
194
198
195
networks :
199
196
picarx :
0 commit comments