Skip to content

Commit

Permalink
Update docker
Browse files Browse the repository at this point in the history
Signed-off-by: Alberto Tudela <[email protected]>
  • Loading branch information
ajtudela committed Oct 15, 2024
1 parent 20c1d10 commit 8365f0a
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
with:
images: grupoavispa/scitos2
tags: |
type=ref, suffix=latest, event=branch
type=ref, event=branch
type=sha
- name: Docker Setup Buildx
Expand Down
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,3 @@ COPY ./docker/ros_entrypoint.sh /
RUN chmod +x /ros_entrypoint.sh
COPY ./docker/cyclonedds.xml /
ENTRYPOINT ["/ros_entrypoint.sh"]
CMD ["ros2", "launch", "scitos2_mira", "mira.launch.py"]
24 changes: 19 additions & 5 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
services:
scitos:
container_name: scitos2
image: grupoavispa/scitos2:latest
# Main container
base:
image: grupoavispa/scitos2:main
build: .
tty: true
network_mode: host
ipc: host
pid: host
Expand All @@ -13,7 +14,20 @@ services:
devices:
- /dev/ttyUSB2:/dev/USB_MLCAN
privileged: true
restart: unless-stopped
volumes:
- /opt/MIRA-licenses:/opt/MIRA-licenses
- /opt/SCITOS:/opt/SCITOS
- /opt/SCITOS:/opt/SCITOS

# Mira framework + drive & charger modules container
mira:
extends:
service: base
command: ros2 launch scitos2_mira mira.launch.py
restart: unless-stopped

# Docking server container
docking:
extends:
service: base
command: ros2 launch scitos2_charging_dock docking_server.launch.py
restart: unless-stopped
20 changes: 12 additions & 8 deletions docker/ros_entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@
set -e

######### ROS #########
source /opt/ros/${ROS_DISTRO}/setup.bash
source ${OVERLAY_WS}/install/local_setup.bash
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
export CYCLONEDDS_URI=/cyclonedds.xml
if [ -d /opt/ros/$ROS_DISTRO ]; then
source /opt/ros/${ROS_DISTRO}/setup.bash
source ${OVERLAY_WS}/install/local_setup.bash
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
export CYCLONEDDS_URI=/cyclonedds.xml
fi

######### MIRA #########
export MIRA_PATH=${MIRA_WS}
export PATH=$PATH:${MIRA_WS}/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${MIRA_WS}/lib
source ${MIRA_WS}/scripts/mirabash
if [ -d $MIRA_WS/mira ]; then
export MIRA_PATH=${MIRA_WS}
export PATH=$PATH:${MIRA_WS}/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${MIRA_WS}/lib
source ${MIRA_WS}/scripts/mirabash
fi

exec "$@"

0 comments on commit 8365f0a

Please sign in to comment.