Skip to content

Commit

Permalink
add planning-control
Browse files Browse the repository at this point in the history
Signed-off-by: Oguz Ozturk <[email protected]>
  • Loading branch information
oguzkaganozt committed Sep 30, 2024
1 parent 3be879b commit b9b9da1
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 29 deletions.
37 changes: 25 additions & 12 deletions .github/actions/docker-build-and-push/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,27 +81,39 @@ runs:
run: echo "date=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT
shell: bash

- name: Docker meta for autoware:aws-reinvent-simulator-monolithic-devel
id: meta-aws-reinvent-simulator-monolithic-devel
- name: Docker meta for autoware:aws-reinvent-simulator-devel
id: meta-aws-reinvent-simulator-devel
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }}
tags: |
type=raw,value=aws-reinvent-simulator-monolithic-devel${{ inputs.tag-suffix }}-${{ inputs.platform }}
type=raw,value=aws-reinvent-simulator-monolithic-devel${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }}
bake-target: docker-metadata-action-aws-reinvent-simulator-monolithic-devel
type=raw,value=aws-reinvent-simulator-devel${{ inputs.tag-suffix }}-${{ inputs.platform }}
type=raw,value=aws-reinvent-simulator-devel${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }}
bake-target: docker-metadata-action-aws-reinvent-simulator-devel
flavor: |
latest=false
- name: Docker meta for autoware:aws-reinvent-simulator-monolithic
id: meta-aws-reinvent-simulator-monolithic
- name: Docker meta for autoware:aws-reinvent-simulator
id: meta-aws-reinvent-simulator
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }}
tags: |
type=raw,value=aws-reinvent-simulator-monolithic${{ inputs.tag-suffix }}-${{ inputs.platform }}
type=raw,value=aws-reinvent-simulator-monolithic${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }}
bake-target: docker-metadata-action-aws-reinvent-simulator-monolithic
type=raw,value=aws-reinvent-simulator${{ inputs.tag-suffix }}-${{ inputs.platform }}
type=raw,value=aws-reinvent-simulator${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }}
bake-target: docker-metadata-action-aws-reinvent-simulator
flavor: |
latest=false
- name: Docker meta for autoware:aws-reinvent-planning-control
id: meta-aws-reinvent-planning-control
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }}
tags: |
type=raw,value=aws-reinvent-planning-control${{ inputs.tag-suffix }}-${{ inputs.platform }}
type=raw,value=aws-reinvent-planning-control${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }}
bake-target: docker-metadata-action-aws-reinvent-planning-control
flavor: |
latest=false
Expand All @@ -118,8 +130,9 @@ runs:
push: true
files: |
docker/docker-bake.hcl
${{ steps.meta-aws-reinvent-simulator-monolithic.outputs.bake-file }}
${{ steps.meta-aws-reinvent-simulator-monolithic-devel.outputs.bake-file }}
${{ steps.meta-aws-reinvent-simulator.outputs.bake-file }}
${{ steps.meta-aws-reinvent-simulator-devel.outputs.bake-file }}
${{ steps.meta-aws-reinvent-planning-control.outputs.bake-file }}
provenance: false
set: |
${{ inputs.build-args }}
16 changes: 13 additions & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG PLATFORM
FROM ghcr.io/autowarefoundation/autoware:universe-devel-${PLATFORM} AS aws-reinvent-simulator-monolithic-devel
FROM ghcr.io/autowarefoundation/autoware:universe-devel-20240927 AS aws-reinvent-simulator-devel
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ARG ROS_DISTRO
ENV CCACHE_DIR="/root/.ccache"
Expand Down Expand Up @@ -28,7 +28,7 @@ RUN source /opt/ros/"$ROS_DISTRO"/setup.bash \
RUN find /opt/autoware/lib -type f -name "*.py" -exec chmod +x {} \;
RUN find /opt/autoware/share -type f -name "*.py" -exec chmod +x {} \;

FROM ghcr.io/autowarefoundation/autoware:universe-${PLATFORM} AS aws-reinvent-simulator-monolithic
FROM ghcr.io/autowarefoundation/autoware:universe-20240927 AS aws-reinvent-simulator

# Copy simulator from simulator-devel
COPY src /autoware/src
Expand All @@ -40,7 +40,7 @@ RUN --mount=type=ssh \
apt-get update \
&& rosdep update \
&& cd /autoware \
&& rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO \
&& rosdep install -y --from-paths src --ignore-src --dependency-types=exec --rosdistro $ROS_DISTRO \
&& apt-get autoremove -y && rm -rf "$HOME"/.cache

RUN echo "source /opt/autoware/setup.bash" > /etc/bash.bashrc
Expand All @@ -50,3 +50,13 @@ COPY docker/etc/ros_entrypoint.sh /ros_entrypoint.sh
RUN chmod +x /ros_entrypoint.sh
ENTRYPOINT ["/ros_entrypoint.sh"]
CMD ["/bin/bash"]

FROM ghcr.io/autowarefoundation/autoware:universe-20240927 AS aws-reinvent-planning-control

COPY --from=aws-reinvent-simulator /opt/autoware/share/kashiwanoha_map /opt/autoware/share/kashiwanoha_map

# Create entrypoint
COPY docker/etc/ros_entrypoint.sh /ros_entrypoint.sh
RUN chmod +x /ros_entrypoint.sh
ENTRYPOINT ["/ros_entrypoint.sh"]
CMD ["/bin/bash"]
28 changes: 18 additions & 10 deletions docker/docker-bake.hcl
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
group "default" {
targets = [
"aws-reinvent-simulator-monolithic-devel",
"aws-reinvent-simulator-monolithic"
"aws-reinvent-simulator-devel",
"aws-reinvent-simulator",
"aws-reinvent-planning-control"
]
}

target "docker-metadata-action-aws-reinvent-simulator-monolithic-devel" {}
target "docker-metadata-action-aws-reinvent-simulator-monolithic" {}
target "docker-metadata-action-aws-reinvent-simulator-devel" {}
target "docker-metadata-action-aws-reinvent-simulator" {}
target "docker-metadata-action-aws-reinvent-planning-control" {}

target "aws-reinvent-simulator-monolithic-devel" {
inherits = ["docker-metadata-action-aws-reinvent-simulator-monolithic-devel"]
target "aws-reinvent-simulator-devel" {
inherits = ["docker-metadata-action-aws-reinvent-simulator-devel"]
dockerfile = "docker/Dockerfile"
target = "aws-reinvent-simulator-monolithic-devel"
target = "aws-reinvent-simulator-devel"
}

target "aws-reinvent-simulator-monolithic" {
inherits = ["docker-metadata-action-aws-reinvent-simulator-monolithic"]
target "aws-reinvent-simulator" {
inherits = ["docker-metadata-action-aws-reinvent-simulator"]
dockerfile = "docker/Dockerfile"
target = "aws-reinvent-simulator-monolithic"
target = "aws-reinvent-simulator"
}

target "aws-reinvent-planning-control" {
inherits = ["docker-metadata-action-aws-reinvent-planning-control"]
dockerfile = "docker/Dockerfile"
target = "aws-reinvent-planning-control"
}
6 changes: 3 additions & 3 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '2.17'

services:
simulator:
image: ghcr.io/autowarefoundation/openadkit_demo.autoware:aws-reinvent-simulator-monolithic-amd64
image: ghcr.io/autowarefoundation/openadkit_demo.autoware:aws-reinvent-simulator-amd64
volumes:
- /dev/shm:/dev/shm
- /etc/localtime:/etc/localtime:ro
Expand All @@ -25,7 +25,7 @@ services:
launch_rviz:=true
planning-control:
image: ghcr.io/autowarefoundation/autoware:universe-amd64
image: ghcr.io/autowarefoundation/autoware:aws-reinvent-planning-control
volumes:
- /dev/shm:/dev/shm
- /etc/localtime:/etc/localtime:ro
Expand All @@ -35,7 +35,7 @@ services:
- RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
command: >
ros2 launch autoware_launch planning_simulator.launch.xml
map_path:=/opt/autoware/share/kashiwanoha_map
map_path:=/opt/autoware/share/kashiwanoha_map/map
vehicle_model:=sample_vehicle
sensor_model:=sample_sensor_kit
scenario_simulation:=true
Expand Down
6 changes: 5 additions & 1 deletion docker/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@

xhost +

docker compose -f docker-compose.yml up
# Get the directory of the current script
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

# Use the script directory to make the docker-compose.yml path relative
docker compose -f "$SCRIPT_DIR/docker-compose.yml" up

0 comments on commit b9b9da1

Please sign in to comment.