-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added compose file to enable the start of dtp and dt on same machine #8
- Loading branch information
1 parent
f56dd61
commit 02f41f0
Showing
1 changed file
with
246 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,246 @@ | ||
services: | ||
|
||
mosquitto: | ||
container_name: mqtt-server | ||
image: eclipse-mosquitto | ||
ports: | ||
- 1883:1883 | ||
volumes: | ||
- ./config/mqtt:/root/catkin_ws/mosquitto | ||
command: mosquitto -c /root/catkin_ws/mosquitto/mosquitto.conf -p 1883 | ||
|
||
picarx-dt: | ||
build: . | ||
image: ghcr.io/cau-se/arches-picar-x/picarx:${TAG:-latest} | ||
environment: | ||
- ROS_HOSTNAME=picarx-dt | ||
- ROS_MASTER_URI=http://picarx-dt:11313 | ||
- ROS_HOST_PORT=11313 | ||
tty: true | ||
ports: | ||
- 11313:11313 | ||
command: roscore -p 11313 | ||
healthcheck: | ||
test: [ "CMD-SHELL", "curl $${ROS_MASTER_URI} || exit 1" ] | ||
interval: 5s | ||
timeout: 1s | ||
retries: 5 | ||
start_period: 1s | ||
|
||
shadow-dt: | ||
image: ghcr.io/cau-se/arches-picar-x/picarx:${TAG:-latest} | ||
env_file: | ||
- ./env/picarx-dt.env | ||
tty: true | ||
command: /bin/bash -c "roslaunch arches_core digitalshadow_dt.launch" | ||
depends_on: | ||
picarx-dt: | ||
condition: service_healthy | ||
|
||
mqtt-dt: | ||
image: ghcr.io/cau-se/arches-picar-x/arches-mqtt-bridge:${TAG:-latest} | ||
build: | ||
dockerfile: Dockerfile-arches-mqtt-bridge | ||
context: ./ros | ||
args: | ||
- TAG=${TAG:-latest} | ||
- ARCH=${ARCH:-} | ||
env_file: | ||
- ./env/picarx-dt.env | ||
tty: true | ||
command: /bin/bash -c "roslaunch arches_mqtt_bridge dt_client.launch host:=$${MQTT_HOST:-192.168.1.2}" | ||
depends_on: | ||
picarx-dt: | ||
condition: service_healthy | ||
|
||
motor_left-dt: | ||
build: | ||
dockerfile: Dockerfile | ||
context: ./ros/drivers/dcmotor/ | ||
args: | ||
- TAG=${TAG:-latest} | ||
- ARCH=${ARCH:-} | ||
image: ghcr.io/cau-se/arches-picar-x/drivers/dcmotor:${TAG:-latest} | ||
env_file: | ||
- ./env/picarx-dt.env | ||
tty: true | ||
privileged: true | ||
volumes: | ||
- /sys/class/gpio:/sys/class/gpio | ||
- ${I2C:-/dev/i2c-0}:${I2C:-/dev/i2c-0} | ||
- ./core:/root/catkin_ws/src/core | ||
- ./ros/drivers/dcmotor:/root/catkin_ws/src/drivers/dcmotor | ||
command: /bin/bash -c "roslaunch picarx_dcmotor_driver dcmotor_left.launch motor1_i2c_port:=$${I2C:-/dev/i2c-0} i2c_address:=21 motor1_direction_pin:=13" | ||
depends_on: | ||
picarx-dt: | ||
condition: service_healthy | ||
|
||
motor_right-dt: | ||
image: ghcr.io/cau-se/arches-picar-x/drivers/dcmotor:${TAG:-latest} | ||
tty: true | ||
env_file: | ||
- ./env/picarx-dt.env | ||
privileged: true | ||
volumes: | ||
- /sys/class/gpio:/sys/class/gpio | ||
- ${I2C:-/dev/i2c-0}:${I2C:-/dev/i2c-0} | ||
- ./core:/root/catkin_ws/src/core | ||
- ./ros/drivers/dcmotor:/root/catkin_ws/src/drivers/dcmotor | ||
command: /bin/bash -c "roslaunch picarx_dcmotor_driver dcmotor_right.launch motor2_i2c_port:=$${I2C:-/dev/i2c-0} i2c_address:=21 motor2_direction_pin:=12" | ||
depends_on: | ||
picarx-dt: | ||
condition: service_healthy | ||
|
||
steering-dt: | ||
image: ghcr.io/cau-se/arches-picar-x/drivers/clutchgear:${TAG:-latest} | ||
build: | ||
dockerfile: Dockerfile | ||
context: ./ros/drivers/clutchgear | ||
args: | ||
- TAG=${TAG:-latest} | ||
- ARCH=${ARCH:-} | ||
env_file: | ||
- ./env/picarx-dt.env | ||
tty: true | ||
privileged: true | ||
volumes: | ||
- /sys/class/gpio:/sys/class/gpio | ||
- ${I2C:-/dev/i2c-0}:${I2C:-/dev/i2c-0} | ||
- ./core:/root/catkin_ws/src/core | ||
- ./ros/drivers/clutchgear:/root/catkin_ws/src/drivers/clutchgear | ||
command: /bin/bash -c "roslaunch picarx_clutchgear_driver ackermann_clutchgear_driver.launch i2c_port:=$${I2C:-/dev/i2c-0} i2c_address:=21" | ||
depends_on: | ||
picarx-dt: | ||
condition: service_healthy | ||
|
||
ackermann_skill-dt: | ||
image: ghcr.io/cau-se/arches-picar-x/skills/ackermann:${TAG:-latest} | ||
build: | ||
dockerfile: Dockerfile | ||
context: ./ros/skills/ackermann_drive | ||
args: | ||
- TAG=${TAG:-latest} | ||
- ARCH=${ARCH:-} | ||
env_file: | ||
- ./env/picarx-dt.env | ||
tty: true | ||
privileged: true | ||
volumes: | ||
- /sys/class/gpio:/sys/class/gpio | ||
- ${I2C:-/dev/i2c-0}:${I2C:-/dev/i2c-0} | ||
- ./core:/root/catkin_ws/src/core | ||
- ./ros/skills/ackermann_drive:/root/catkin_ws/src/skills/ackermann_drive | ||
command: /bin/bash -c "roslaunch picarx_ackermann_drive ackermann_skill.launch" | ||
depends_on: | ||
picarx-dt: | ||
condition: service_healthy | ||
|
||
picarx-dt-gazebo: | ||
build: | ||
context: ./simulation | ||
dockerfile: Dockerfile | ||
args: | ||
- TAG=${TAG:-latest} | ||
- ARCH=${ARCH:-} | ||
target: desktop | ||
image: ghcr.io/cau-se/arches-picar-x/picarx-gazebo:${TAG:-latest} | ||
env_file: | ||
- ./env/simulation-dt.env | ||
environment: | ||
- DISPLAY=$DISPLAY | ||
- LIBGL_ALWAYS_INDIRECT=0 | ||
- ROS_HOSTNAME=picarx-dt-gazebo | ||
- ROS_MASTER_URI=http://picarx-dt-gazebo:11314 | ||
stdin_open: true | ||
tty: true | ||
ports: | ||
- 11314:11314 | ||
volumes: | ||
- ${X11PATH:-/tmp/.X11-unix}:/tmp/.X11-unix | ||
- ./core:/root/catkin_ws/src/core | ||
- ./simulation:/root/catkin_ws/src/simulation | ||
command: /bin/bash -c "roslaunch picarx_gazebo picarx-world.launch" | ||
healthcheck: | ||
test: [ "CMD-SHELL", "curl $${ROS_MASTER_URI} || exit 1" ] | ||
interval: 5s | ||
timeout: 1s | ||
retries: 5 | ||
start_period: 1s | ||
|
||
picarx-dt-gazebo-control: | ||
image: ghcr.io/cau-se/arches-picar-x/picarx-gazebo:${TAG:-latest} | ||
env_file: | ||
- ./env/simulation-dt.env | ||
tty: true | ||
volumes: | ||
- ./core:/root/catkin_ws/src/core | ||
- ./simulation:/root/catkin_ws/src/simulation | ||
command: /bin/bash -c "roslaunch picarx_control picarx_control.launch" | ||
restart: on-failure | ||
depends_on: | ||
picarx-dt-gazebo: | ||
condition: service_healthy | ||
|
||
motor_emulator_left-dt: | ||
image: ghcr.io/cau-se/arches-picar-x/emulators/dcmotor:${TAG:-latest} | ||
build: | ||
dockerfile: Dockerfile | ||
context: ./ros/emulators/dcmotor | ||
args: | ||
- TAG=${TAG:-latest} | ||
- ARCH=${ARCH:-} | ||
env_file: | ||
- ./env/simulation-dt.env | ||
tty: true | ||
privileged: true | ||
volumes: | ||
- /sys/class/gpio:/sys/class/gpio | ||
- ${I2C:-/dev/i2c-0}:${I2C:-/dev/i2c-0} | ||
- ./core:/root/catkin_ws/src/core | ||
- ./ros/emulators/dcmotor:/root/catkin_ws/src/emulators/dcmotor | ||
command: /bin/bash -c "roslaunch picarx_dcmotor_emulator dcmotor_emulator_left.launch i2c_port:=$${I2C:-/dev/i2c-0} i2c_address:=21 direction_pin:=13" | ||
depends_on: | ||
picarx-dt-gazebo: | ||
condition: service_healthy | ||
|
||
motor_emulator_right-dt: | ||
image: ghcr.io/cau-se/arches-picar-x/emulators/dcmotor:${TAG:-latest} | ||
env_file: | ||
- ./env/simulation-dt.env | ||
tty: true | ||
privileged: true | ||
volumes: | ||
- /sys/class/gpio:/sys/class/gpio | ||
- ${I2C:-/dev/i2c-0}:${I2C:-/dev/i2c-0} | ||
- ./core:/root/catkin_ws/src/core | ||
- ./ros/emulators/dcmotor:/root/catkin_ws/src/emulators/dcmotor | ||
command: /bin/bash -c "roslaunch picarx_dcmotor_emulator dcmotor_emulator_right.launch i2c_port:=$${I2C:-/dev/i2c-0} i2c_address:=21 direction_pin:=12" | ||
depends_on: | ||
picarx-dt-gazebo: | ||
condition: service_healthy | ||
|
||
steering_emulator-dt: | ||
image: ghcr.io/cau-se/arches-picar-x/emulators/clutchgear:${TAG:-latest} | ||
build: | ||
dockerfile: Dockerfile | ||
context: ./ros/emulators/clutchgear | ||
args: | ||
- TAG=${TAG:-latest} | ||
- ARCH=${ARCH:-} | ||
env_file: | ||
- ./env/simulation-dt.env | ||
tty: true | ||
privileged: true | ||
volumes: | ||
- /sys/class/gpio:/sys/class/gpio | ||
- ${I2C:-/dev/i2c-0}:${I2C:-/dev/i2c-0} | ||
- ./core:/root/catkin_ws/src/core | ||
- ./ros/emulators/clutchgear:/root/catkin_ws/src/emulators/clutchgear | ||
command: /bin/bash -c "roslaunch picarx_clutchgear_emulator ackermann_clutchgear_emulator.launch i2c_port:=$${I2C:-/dev/i2c-0} i2c_address:=21" | ||
depends_on: | ||
picarx-dt-gazebo: | ||
condition: service_healthy | ||
|
||
networks: | ||
picarx: | ||
external: true |