Skip to content

Commit 66bb318

Browse files
author
abarbie
committed
fixes in build and compose files
1 parent a8cd4ad commit 66bb318

14 files changed

+70
-42
lines changed

PiCar-X/Dockerfile

+5-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ RUN wget -c https://git.geomar.de/open-source/arches/arches_msgs/-/archive/maste
1616
&& mv arches_msgs-master ./src/arches/arches_msgs \
1717
&& wget -c https://git.geomar.de/open-source/arches/arches_core/-/archive/main/arches_core-main.tar.gz -O - | tar -xz \
1818
&& mv arches_core-main ./src/arches/arches_core
19-
19+
COPY ./core ./src/core
20+
COPY ./ros/picarx_msgs ./src/picarx_msgs
2021
RUN /bin/bash -c "source /opt/ros/noetic/setup.bash && catkin config --isolate-devel --install && catkin build" \
2122
&& touch /root/.bashrc \
22-
&& echo "source /opt/ros/noetic/setup.bash" >> /root/.bashrc
23+
&& echo "source /opt/ros/noetic/setup.bash" >> /root/.bashrc \
24+
&& echo "source ./install/setup.bash" >> /root/.bashrc
25+
ENTRYPOINT [ "/root/catkin_ws/src/arches/arches_core/ENTRYPOINT.sh" ]

PiCar-X/docker-compose-core.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ services:
55
context: .
66
args:
77
- TAG=${TAG:-latest}
8-
- ARCH=${ARCH}
8+
- ARCH=${ARCH:-}
99
image: abarbie/picarx:${TAG:-latest}
1010

1111
networks:

PiCar-X/docker-compose-ds.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ services:
3434
context: Dockerfile
3535
dockerfile: ./simulation
3636
target: desktop
37+
args:
38+
- TAG=${TAG:-latest}
3739
image: abarbie/picarx/picarx-gazebo:${TAG}
3840
env_file:
3941
- ./core/dtp/env/simulation.env
@@ -67,7 +69,7 @@ services:
6769
context: ./ros
6870
args:
6971
- TAG=${TAG:-latest}
70-
- ARCH=${ARCH}
72+
- ARCH=${ARCH:-}
7173
env_file:
7274
- ./core/dtp/env/picarx-dt.env
7375
command: /bin/bash -c "roslaunch arches_mqtt_bridge pt_client.launch host:=mqtt-server"
@@ -82,7 +84,7 @@ services:
8284
context: ./ros/skills/ackermann_drive
8385
args:
8486
- TAG=${TAG:-latest}
85-
- ARCH=${ARCH}
87+
- ARCH=${ARCH:-}
8688
env_file:
8789
- ./core/dtp/env/picarx-dt.env
8890
tty: true

PiCar-X/docker-compose-dt.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ services:
4444
context: ./ros
4545
args:
4646
- TAG=${TAG:-latest}
47-
- ARCH=${ARCH}
47+
- ARCH=${ARCH:-}
4848
env_file:
4949
- ./core/dtp/env/picarx-dt.env
5050
tty: true
@@ -60,7 +60,7 @@ services:
6060
context: ./ros/skills/ackermann_drive
6161
args:
6262
- TAG=${TAG:-latest}
63-
- ARCH=${ARCH}
63+
- ARCH=${ARCH:-}
6464
env_file:
6565
- ./core/dtp/env/picarx-dt.env
6666
tty: true

PiCar-X/docker-compose-dtp-inttest.yml

+8-6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ services:
44
context: Dockerfile
55
dockerfile: ./simulation
66
target: tests
7+
args:
8+
- TAG=${TAG:-latest}
79
image: abarbie/picarx/picarx-gazebo:${TAG}
810
env_file:
911
- ./core/dtp/env/simulation.env
@@ -42,7 +44,7 @@ services:
4244
context: ./ros
4345
args:
4446
- TAG=${TAG:-latest}
45-
- ARCH=${ARCH}
47+
- ARCH=${ARCH:-}
4648
env_file:
4749
- ./core/dtp/env/simulation.env
4850
tty: true
@@ -57,7 +59,7 @@ services:
5759
context: ./ros/drivers/dcmotor/
5860
args:
5961
- TAG=${TAG:-latest}
60-
- ARCH=${ARCH}
62+
- ARCH=${ARCH:-}
6163
image: abarbie/picarx/drivers/dcmotor:${TAG}
6264
env_file:
6365
- ./core/dtp/env/simulation.env
@@ -96,7 +98,7 @@ services:
9698
context: ./ros/drivers/clutchgear
9799
args:
98100
- TAG=${TAG:-latest}
99-
- ARCH=${ARCH}
101+
- ARCH=${ARCH:-}
100102
env_file:
101103
- ./core/dtp/env/simulation.env
102104
tty: true
@@ -118,7 +120,7 @@ services:
118120
context: ./ros/skills/ackermann_drive
119121
args:
120122
- TAG=${TAG:-latest}
121-
- ARCH=${ARCH}
123+
- ARCH=${ARCH:-}
122124
env_file:
123125
- ./core/dtp/env/simulation.env
124126
tty: true
@@ -140,7 +142,7 @@ services:
140142
context: ./ros/emulators/dcmotor
141143
args:
142144
- TAG=${TAG:-latest}
143-
- ARCH=${ARCH}
145+
- ARCH=${ARCH:-}
144146
env_file:
145147
- ./core/dtp/env/simulation.env
146148
tty: true
@@ -178,7 +180,7 @@ services:
178180
context: ./ros/emulators/clutchgear
179181
args:
180182
- TAG=${TAG:-latest}
181-
- ARCH=${ARCH}
183+
- ARCH=${ARCH:-}
182184
env_file:
183185
- ./core/dtp/env/simulation.env
184186
tty: true

PiCar-X/docker-compose-dtp.yml

+22-8
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ services:
2222
dockerfile: Dockerfile
2323
args:
2424
- TAG=${TAG:-latest}
25-
- ARCH=${ARCH}
25+
- ARCH=${ARCH:-}
2626
target: desktop
2727
image: abarbie/picarx/picarx-gazebo:${TAG}
2828
env_file:
@@ -38,14 +38,28 @@ services:
3838
volumes:
3939
- ./core:/root/catkin_ws/src/core
4040
- ./simulation:/root/catkin_ws/src/simulation
41-
command: /bin/bash -c "roslaunch picarx_gazebo picarx-world.launch & roslaunch picarx_control picarx_control.launch"
41+
command: /bin/bash -c "roslaunch picarx_gazebo picarx-world.launch"
4242
healthcheck:
4343
test: [ "CMD-SHELL", "curl $${ROS_MASTER_URI} || exit 1" ]
4444
interval: 5s
4545
timeout: 1s
4646
retries: 5
4747
start_period: 1s
4848

49+
picarx-gazebo-control:
50+
image: abarbie/picarx/picarx-gazebo:${TAG}
51+
env_file:
52+
- ./core/dtp/env/simulation.env
53+
tty: true
54+
volumes:
55+
- ./core:/root/catkin_ws/src/core
56+
- ./simulation:/root/catkin_ws/src/simulation
57+
command: /bin/bash -c "roslaunch picarx_control picarx_control.launch"
58+
depends_on:
59+
picarx-gazebo:
60+
condition: service_healthy
61+
62+
4963
shadow-dtp:
5064
image: abarbie/picarx:${TAG:-latest}
5165
env_file:
@@ -63,7 +77,7 @@ services:
6377
context: ./ros
6478
args:
6579
- TAG=${TAG:-latest}
66-
- ARCH=${ARCH}
80+
- ARCH=${ARCH:-}
6781
env_file:
6882
- ./core/dtp/env/picarx.env
6983
tty: true
@@ -79,7 +93,7 @@ services:
7993
context: ./ros/drivers/dcmotor/
8094
args:
8195
- TAG=${TAG:-latest}
82-
- ARCH=${ARCH}
96+
- ARCH=${ARCH:-}
8397
env_file:
8498
- ./core/dtp/env/picarx.env
8599
tty: true
@@ -117,7 +131,7 @@ services:
117131
context: ./ros/drivers/clutchgear
118132
args:
119133
- TAG=${TAG:-latest}
120-
- ARCH=${ARCH}
134+
- ARCH=${ARCH:-}
121135
env_file:
122136
- ./core/dtp/env/picarx.env
123137
tty: true
@@ -139,7 +153,7 @@ services:
139153
context: ./ros/skills/ackermann_drive
140154
args:
141155
- TAG=${TAG:-latest}
142-
- ARCH=${ARCH}
156+
- ARCH=${ARCH:-}
143157
env_file:
144158
- ./core/dtp/env/picarx.env
145159
tty: true
@@ -162,7 +176,7 @@ services:
162176
context: ./ros/emulators/dcmotor
163177
args:
164178
- TAG=${TAG:-latest}
165-
- ARCH=${ARCH}
179+
- ARCH=${ARCH:-}
166180
env_file:
167181
- ./core/dtp/env/simulation.env
168182
tty: true
@@ -201,7 +215,7 @@ services:
201215
context: ./ros/emulators/clutchgear
202216
args:
203217
- TAG=${TAG:-latest}
204-
- ARCH=${ARCH}
218+
- ARCH=${ARCH:-}
205219
env_file:
206220
- ./core/dtp/env/simulation.env
207221
tty: true

PiCar-X/docker-compose-dtsim.yml

+8-6
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ services:
3131
context: Dockerfile
3232
dockerfile: ./simulation
3333
target: desktop
34+
args:
35+
- TAG=${TAG:-latest}
3436
env_file:
3537
- ./core/dtp/env/simulation.env
3638
environment:
@@ -65,7 +67,7 @@ services:
6567
context: ./ros
6668
args:
6769
- TAG=${TAG:-latest}
68-
- ARCH=${ARCH}
70+
- ARCH=${ARCH:-}
6971
env_file:
7072
- ./core/dtp/env/picarx.env
7173
tty: true
@@ -80,7 +82,7 @@ services:
8082
context: ./ros/drivers/dcmotor/
8183
args:
8284
- TAG=${TAG:-latest}
83-
- ARCH=${ARCH}
85+
- ARCH=${ARCH:-}
8486
image: abarbie/picarx/drivers/dcmotor:${TAG}
8587
env_file:
8688
- ./core/dtp/env/picarx.env
@@ -119,7 +121,7 @@ services:
119121
context: ./ros/drivers/clutchgear
120122
args:
121123
- TAG=${TAG:-latest}
122-
- ARCH=${ARCH}
124+
- ARCH=${ARCH:-}
123125
env_file:
124126
- ./core/dtp/env/picarx.env
125127
tty: true
@@ -141,7 +143,7 @@ services:
141143
context: ./ros/skills/ackermann_drive
142144
args:
143145
- TAG=${TAG:-latest}
144-
- ARCH=${ARCH}
146+
- ARCH=${ARCH:-}
145147
env_file:
146148
- ./core/dtp/env/picarx.env
147149
tty: true
@@ -163,7 +165,7 @@ services:
163165
context: ./ros/emulators/dcmotor
164166
args:
165167
- TAG=${TAG:-latest}
166-
- ARCH=${ARCH}
168+
- ARCH=${ARCH:-}
167169
env_file:
168170
- ./core/dtp/env/simulation.env
169171
tty: true
@@ -201,7 +203,7 @@ services:
201203
context: ./ros/emulators/clutchgear
202204
args:
203205
- TAG=${TAG:-latest}
204-
- ARCH=${ARCH}
206+
- ARCH=${ARCH:-}
205207
env_file:
206208
- ./core/dtp/env/simulation.env
207209
tty: true

PiCar-X/ros/Dockerfile-arches-mqtt-bridge

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ARG TAG=latest
22

3-
FROM abarbie/picarx:${TAG:-latest}
3+
FROM abarbie/picarx:${TAG}
44

55
RUN wget -c https://git.geomar.de/open-source/arches/arches_mqtt_bridge/-/archive/main/arches_mqtt_bridge-main.tar.gz -O - | tar -xz \
66
&& mv arches_mqtt_bridge-main ./src/arches/arches_mqtt_bridge \

PiCar-X/ros/drivers/clutchgear/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ARG TAG=latest
22

3-
FROM abarbie/picarx:${TAG:-latest}
3+
FROM abarbie/picarx:${TAG}
44

55
COPY . ./src/drivers/clutchgear
66

PiCar-X/ros/drivers/dcmotor/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ARG TAG=latest
22

3-
FROM abarbie/picarx:${TAG:-latest}
3+
FROM abarbie/picarx:${TAG}
44

55
COPY . ./src/drivers/dcmotor
66

PiCar-X/ros/emulators/clutchgear/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ARG TAG=latest
22

3-
FROM abarbie/picarx:${TAG:-latest}
3+
FROM abarbie/picarx:${TAG}
44

55
COPY . ./src/emulators/clutchgear
66

PiCar-X/ros/emulators/dcmotor/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ARG TAG=latest
22

3-
FROM abarbie/picarx:${TAG:-latest}
3+
FROM abarbie/picarx:${TAG}
44

55
COPY . ./src/emulators/dcmotor
66

PiCar-X/ros/skills/ackermann_drive/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ARG TAG=latest
22

3-
FROM abarbie/picarx:${TAG:-latest}
3+
FROM abarbie/picarx:${TAG}
44

55
COPY . ./src/skills/ackermann_drive
66

PiCar-X/simulation/Dockerfile

+14-9
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,37 @@
11
ARG TAG=latest
22
FROM osrf/ros:noetic-desktop-full as gazebo-full
3+
ARG TAG
34
WORKDIR /root/catkin_ws
45
RUN apt-get update \
5-
&& apt-get install -y python3-pip python3-setuptools python3-yaml ros-noetic-ros-control ros-noetic-ros-controllers python3-catkin-tools \
6+
&& apt-get install -y python3-pip python3-setuptools python3-yaml ros-noetic-ros-control ros-noetic-ros-controllers python3-catkin-tools curl \
67
&& apt-get clean \
78
&& update-ca-certificates -f
89

910
FROM gazebo:libgazebo11 as gazebo-only
11+
ARG TAG
1012
WORKDIR /root/catkin_ws
1113
RUN apt-get update \
12-
&& apt-get install -y python3-pip python3-setuptools python3-yaml ros-noetic-ros-control ros-noetic-ros-controllers python3-catkin-tools \
14+
&& apt-get install -y python3-pip python3-setuptools python3-yaml ros-noetic-ros-control ros-noetic-ros-controllers python3-catkin-tools curl \
1315
&& apt-get clean \
1416
&& update-ca-certificates -f
1517

16-
FROM abarbie/picarx:${TAG:-latest} as picarx-core
18+
ARG TAG
19+
FROM abarbie/picarx:${TAG} as picarx-core
1720

1821
FROM gazebo-full as desktop
19-
COPY --from=picarx-core /root/catkin_ws/ .
22+
COPY --from=picarx-core /root/catkin_ws .
2023
COPY . ./src/simulation
21-
RUN /bin/bash -c "source /opt/ros/noetic/setup.bash && catkin config --isolate-devel --install && catkin build" \
24+
RUN /bin/bash -c "source /opt/ros/noetic/setup.bash && catkin build" \
2225
&& touch /root/.bashrc \
23-
&& echo "source /opt/ros/noetic/setup.bash" >> /root/.bashrc
26+
&& echo "source /opt/ros/noetic/setup.bash" >> /root/.bashrc \
27+
&& echo "source ./install/setup.bash" >> /root/.bashrc
2428
ENTRYPOINT [ "/root/catkin_ws/src/arches/arches_core/ENTRYPOINT.sh" ]
2529

2630
FROM gazebo-only as tests
27-
COPY --from=picarx-core /root/catkin_ws/ .
31+
COPY --from=picarx-core /root/catkin_ws .
2832
COPY . ./src/simulation
29-
RUN /bin/bash -c "source /opt/ros/noetic/setup.bash && catkin config --isolate-devel --install && catkin build" \
33+
RUN /bin/bash -c "source /opt/ros/noetic/setup.bash && catkin build" \
3034
&& touch /root/.bashrc \
31-
&& echo "source /opt/ros/noetic/setup.bash" >> /root/.bashrc
35+
&& echo "source /opt/ros/noetic/setup.bash" >> /root/.bashrc \
36+
&& echo "source ./install/setup.bash" >> /root/.bashrc
3237
ENTRYPOINT [ "/root/catkin_ws/src/arches/arches_core/ENTRYPOINT.sh" ]

0 commit comments

Comments
 (0)