Skip to content

Commit

Permalink
Merge branch 'main' into feat/pc-launch
Browse files Browse the repository at this point in the history
  • Loading branch information
youtalk authored Jan 21, 2025
2 parents 05433ce + 7e68dc8 commit eb9164a
Show file tree
Hide file tree
Showing 14 changed files with 214 additions and 41 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/create-prs-to-update-vcs-repositories.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.PRIVATE_KEY }}

- name: Create PRs to update VCS repositories
- name: Create PRs to update VCS repositories for autoware.repos
uses: autowarefoundation/autoware-github-actions/create-prs-to-update-vcs-repositories@v1
with:
token: ${{ steps.generate-token.outputs.token }}
Expand All @@ -29,3 +29,15 @@ jobs:
new_branch_prefix: feat/update-
autoware_repos_file_name: autoware.repos
verbosity: 0

- name: Create PRs to update VCS repositories for simulator.repos
uses: autowarefoundation/autoware-github-actions/create-prs-to-update-vcs-repositories@v1
with:
token: ${{ steps.generate-token.outputs.token }}
repo_name: autowarefoundation/autoware
parent_dir: .
targets: major minor patch
base_branch: main
new_branch_prefix: feat/update-
autoware_repos_file_name: simulator.repos
verbosity: 0
2 changes: 1 addition & 1 deletion .pre-commit-config-optional.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

repos:
- repo: https://github.com/tcort/markdown-link-check
rev: v3.13.6
rev: v3.12.2
hooks:
- id: markdown-link-check
args: [--quiet, --config=.markdown-link-check.json]
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ repos:
args: [--line-length=100]

- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v19.1.5
rev: v19.1.6
hooks:
- id: clang-format
types_or: [c++, c, cuda]
Expand Down
4 changes: 4 additions & 0 deletions autoware-nightly.repos
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ repositories:
type: git
url: https://github.com/autowarefoundation/autoware_adapi_msgs.git
version: main
core/autoware_internal_msgs:
type: git
url: https://github.com/autowarefoundation/autoware_internal_msgs.git
version: main
core/autoware.core:
type: git
url: https://github.com/autowarefoundation/autoware.core.git
Expand Down
14 changes: 7 additions & 7 deletions autoware.repos
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repositories:
core/autoware_internal_msgs:
type: git
url: https://github.com/autowarefoundation/autoware_internal_msgs.git
version: 1.1.0
version: 1.4.0
core/autoware_cmake:
type: git
url: https://github.com/autowarefoundation/autoware_cmake.git
Expand All @@ -28,12 +28,12 @@ repositories:
core/autoware.core:
type: git
url: https://github.com/autowarefoundation/autoware.core.git
version: 0.0.0
version: 0.1.0
# universe
universe/autoware.universe:
type: git
url: https://github.com/autowarefoundation/autoware.universe.git
version: 0.39.0
version: 0.40.0
universe/external/tier4_ad_api_adaptor: # TODO(TIER IV): Migrate to AD API and remove this repository entry.
type: git
url: https://github.com/tier4/tier4_ad_api_adaptor.git
Expand Down Expand Up @@ -75,7 +75,7 @@ repositories:
launcher/autoware_launch:
type: git
url: https://github.com/autowarefoundation/autoware_launch.git
version: 0.39.0
version: 0.40.0
# sensor_component
sensor_component/external/sensor_component_description:
type: git
Expand Down Expand Up @@ -107,15 +107,15 @@ repositories:
sensor_kit/external/awsim_sensor_kit_launch: # TODO: Integrate into sample_sensor_kit_launch
type: git
url: https://github.com/tier4/awsim_sensor_kit_launch.git
version: 0.39.0
version: 0.40.0
sensor_kit/awsim_labs_sensor_kit_launch:
type: git
url: https://github.com/autowarefoundation/awsim_labs_sensor_kit_launch.git
version: main
version: 0.39.0
sensor_kit/single_lidar_sensor_kit_launch:
type: git
url: https://github.com/autowarefoundation/single_lidar_sensor_kit_launch.git
version: main
version: 0.39.0
# vehicle
vehicle/sample_vehicle_launch:
type: git
Expand Down
73 changes: 68 additions & 5 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,18 @@ RUN /autoware/resolve_rosdep_keys.sh /autoware/src ${ROS_DISTRO} \
> /rosdep-universe-common-depend-packages.txt \
&& cat /rosdep-universe-common-depend-packages.txt

FROM rosdep-depend AS rosdep-universe-visualization-depend
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ARG ROS_DISTRO

COPY src/universe/autoware.universe/visualization /autoware/src/universe/autoware.universe/visualization
RUN /autoware/resolve_rosdep_keys.sh /autoware/src ${ROS_DISTRO} \
> /rosdep-universe-visualization-depend-packages.txt \
&& cat /rosdep-universe-visualization-depend-packages.txt
RUN /autoware/resolve_rosdep_keys.sh /autoware/src ${ROS_DISTRO} \
> /rosdep-universe-visualization-exec-depend-packages.txt \
&& cat /rosdep-universe-visualization-exec-depend-packages.txt

FROM rosdep-depend AS rosdep-universe-sensing-perception-depend
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ARG ROS_DISTRO
Expand All @@ -44,7 +56,7 @@ COPY src/universe/autoware.universe/sensing /autoware/src/universe/autoware.univ
RUN /autoware/resolve_rosdep_keys.sh /autoware/src ${ROS_DISTRO} \
> /rosdep-universe-sensing-perception-depend-packages.txt \
&& cat /rosdep-universe-sensing-perception-depend-packages.txt
RUN /autoware/resolve_rosdep_keys.sh /autoware/src ${ROS_DISTRO} \
RUN /autoware/resolve_rosdep_keys.sh /autoware/src ${ROS_DISTRO} --dependency-types=exec \
> /rosdep-universe-sensing-perception-exec-depend-packages.txt \
&& cat /rosdep-universe-sensing-perception-exec-depend-packages.txt

Expand All @@ -57,7 +69,7 @@ COPY src/universe/autoware.universe/map /autoware/src/universe/autoware.universe
RUN /autoware/resolve_rosdep_keys.sh /autoware/src ${ROS_DISTRO} \
> /rosdep-universe-localization-mapping-depend-packages.txt \
&& cat /rosdep-universe-localization-mapping-depend-packages.txt
RUN /autoware/resolve_rosdep_keys.sh /autoware/src ${ROS_DISTRO} \
RUN /autoware/resolve_rosdep_keys.sh /autoware/src ${ROS_DISTRO} --dependency-types=exec \
> /rosdep-universe-localization-mapping-exec-depend-packages.txt \
&& cat /rosdep-universe-localization-mapping-exec-depend-packages.txt

Expand All @@ -77,7 +89,7 @@ COPY src/universe/autoware.universe/sensing/autoware_pointcloud_preprocessor /au
RUN /autoware/resolve_rosdep_keys.sh /autoware/src ${ROS_DISTRO} \
> /rosdep-universe-planning-control-depend-packages.txt \
&& cat /rosdep-universe-planning-control-depend-packages.txt
RUN /autoware/resolve_rosdep_keys.sh /autoware/src ${ROS_DISTRO} \
RUN /autoware/resolve_rosdep_keys.sh /autoware/src ${ROS_DISTRO} --dependency-types=exec \
> /rosdep-universe-planning-control-exec-depend-packages.txt \
&& cat /rosdep-universe-planning-control-exec-depend-packages.txt

Expand All @@ -92,7 +104,7 @@ COPY src/universe/autoware.universe/localization/autoware_pose2twist /autoware/s
RUN /autoware/resolve_rosdep_keys.sh /autoware/src ${ROS_DISTRO} \
> /rosdep-universe-vehicle-system-depend-packages.txt \
&& cat /rosdep-universe-vehicle-system-depend-packages.txt
RUN /autoware/resolve_rosdep_keys.sh /autoware/src ${ROS_DISTRO} \
RUN /autoware/resolve_rosdep_keys.sh /autoware/src ${ROS_DISTRO} --dependency-types=exec \
> /rosdep-universe-vehicle-system-exec-depend-packages.txt \
&& cat /rosdep-universe-vehicle-system-exec-depend-packages.txt

Expand All @@ -110,7 +122,7 @@ RUN /autoware/resolve_rosdep_keys.sh /autoware/src ${ROS_DISTRO} \
> /rosdep-universe-depend-packages.txt \
&& cat /rosdep-universe-depend-packages.txt

RUN /autoware/resolve_rosdep_keys.sh /autoware/src ${ROS_DISTRO} \
RUN /autoware/resolve_rosdep_keys.sh /autoware/src ${ROS_DISTRO} --dependency-types=exec \
> /rosdep-exec-depend-packages.txt \
&& cat /rosdep-exec-depend-packages.txt

Expand Down Expand Up @@ -318,6 +330,30 @@ RUN --mount=type=cache,target=${CCACHE_DIR} \
ENTRYPOINT ["/ros_entrypoint.sh"]
CMD ["/bin/bash"]

FROM universe-common-devel AS universe-visualization-devel
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ARG ROS_DISTRO
ENV CCACHE_DIR="/root/.ccache"

# Install rosdep dependencies
COPY --from=rosdep-universe-visualization-depend /rosdep-universe-visualization-depend-packages.txt /tmp/rosdep-universe-visualization-depend-packages.txt
# hadolint ignore=SC2002
RUN --mount=type=ssh \
--mount=type=cache,target=/var/cache/apt,sharing=locked \
apt-get update \
&& cat /tmp/rosdep-universe-visualization-depend-packages.txt | xargs apt-get install -y --no-install-recommends \
&& /autoware/cleanup_apt.sh

# hadolint ignore=SC1091
RUN --mount=type=cache,target=${CCACHE_DIR} \
--mount=type=bind,from=rosdep-universe-visualization-depend,source=/autoware/src/universe/autoware.universe/visualization,target=/autoware/src/universe/autoware.universe/visualization \
source /opt/ros/"$ROS_DISTRO"/setup.bash \
&& source /opt/autoware/setup.bash \
&& /autoware/build_and_clean.sh ${CCACHE_DIR} /opt/autoware

ENTRYPOINT ["/ros_entrypoint.sh"]
CMD ["/bin/bash"]

FROM universe-common-devel AS universe-devel
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ARG ROS_DISTRO
Expand All @@ -336,6 +372,7 @@ COPY --from=universe-sensing-perception-devel /opt/autoware /opt/autoware
COPY --from=universe-localization-mapping-devel /opt/autoware /opt/autoware
COPY --from=universe-planning-control-devel /opt/autoware /opt/autoware
COPY --from=universe-vehicle-system-devel /opt/autoware /opt/autoware
COPY --from=universe-visualization-devel /opt/autoware /opt/autoware
# hadolint ignore=SC1091
RUN --mount=type=cache,target=${CCACHE_DIR} \
--mount=type=bind,from=rosdep-universe-depend,source=/autoware/src/launcher,target=/autoware/src/launcher \
Expand Down Expand Up @@ -498,6 +535,32 @@ RUN echo "source /opt/autoware/setup.bash" > /etc/bash.bashrc
ENTRYPOINT ["/ros_entrypoint.sh"]
CMD ["/bin/bash"]

# hadolint ignore=DL3006
FROM $AUTOWARE_BASE_IMAGE AS universe-visualization
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ARG ROS_DISTRO
ARG LIB_DIR

# Set up runtime environment
COPY --from=rosdep-universe-visualization-depend /rosdep-universe-visualization-exec-depend-packages.txt /tmp/rosdep-universe-visualization-exec-depend-packages.txt
# hadolint ignore=SC2002
RUN --mount=type=ssh \
--mount=type=cache,target=/var/cache/apt,sharing=locked \
./setup-dev-env.sh -y --module all --no-nvidia --no-cuda-drivers --runtime openadkit \
&& pip uninstall -y ansible ansible-core \
&& apt-get update \
&& cat /tmp/rosdep-universe-visualization-exec-depend-packages.txt | xargs apt-get install -y --no-install-recommends \
&& /autoware/cleanup_system.sh $LIB_DIR $ROS_DISTRO

COPY --from=universe-visualization-devel /opt/autoware /opt/autoware

# Copy bash aliases
COPY docker/etc/.bash_aliases /root/.bash_aliases
RUN echo "source /opt/autoware/setup.bash" > /etc/bash.bashrc

ENTRYPOINT ["/ros_entrypoint.sh"]
CMD ["/bin/bash"]

# hadolint ignore=DL3006
FROM $AUTOWARE_BASE_IMAGE AS universe
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
Expand Down
67 changes: 52 additions & 15 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,14 @@ The suffix `-devel` (e.g. `universe-devel`) is intended for use as a [developmen

This is a base image of this Dockerfile. [`ros:humble-ros-base-jammy`](https://hub.docker.com/_/ros/tags?page=&page_size=&ordering=&name=humble-ros-base-jammy) will be given.

### `base`
### `base` (from Dockerfile.base)

This stage performs only the basic setup required for all Autoware images.

### `base-cuda` (from Dockerfile.base)

This stage is built on top of `base` and adds the CUDA runtime environment and artifacts.

### `rosdep-depend`

The ROS dependency package list files will be generated.
Expand All @@ -96,62 +100,88 @@ By generating only the package list files and copying them to the subsequent sta

### `core-devel`

This stage installs the dependency packages based on `/rosdep-core-depend-packages.txt` and build the packages under the `core` directory of `autoware.repos`.
This stage installs the dependency packages based on `/rosdep-core-depend-packages.txt` and builds the packages under the `core` directory of `autoware.repos`.

### `universe-common-devel`

This stage installs the dependency packages based on `/rosdep-universe-common-depend-packages.txt` and build the packages under the following directories of `autoware.repos`.
This stage installs the dependency packages based on `/rosdep-universe-common-depend-packages.txt` and builds the packages under the following directories of `autoware.repos`:

- `universe/external`
- `universe/autoware.universe/common`

### `universe-common-devel-cuda`

This stage is build on top of `universe-common-devel` and installs the CUDA development environment.

### `universe-sensing-perception-devel`

This stage installs the dependency packages based on `/rosdep-universe-sensing-perception-depend-packages.txt` and build the packages under the following directories of `autoware.repos`.
This stage installs the dependency packages based on `/rosdep-universe-sensing-perception-depend-packages.txt` and builds the non-CUDA related packages under the following directories of `autoware.repos`:

- `universe/autoware.universe/perception`
- `universe/autoware.universe/sensing`

### `universe-sensing-perception-devel-cuda`

This stage copies the non-CUDA related binaries built in the `universe-sensing-perception-devel` stage and builds the CUDA related packages under the following directories of `autoware.repos`:

- `universe/autoware.universe/perception`
- `universe/autoware.universe/sensing`

### `universe-sensing-perception`

This stage is a Autoware Universe Sensing/Perception runtime container. It only includes the dependencies given by `/rosdep-universe-sensing-perception-exec-depend-packages.txt` and the binaries built in the `universe-sensing-perception-devel` stage.
This stage is an Autoware Universe Sensing/Perception runtime container. It only includes the dependencies given by `/rosdep-universe-sensing-perception-exec-depend-packages.txt` and the binaries built in the `universe-sensing-perception-devel` stage.

### `universe-sensing-perception-cuda`

This stage installs the CUDA runtime environment and copies the binaries built in the `universe-sensing-perception-devel-cuda` stage.

### `universe-visualization`

This stage is a Autoware Universe Visualization runtime container. It only includes the dependencies given by `/rosdep-universe-visualization-exec-depend-packages.txt` and the binaries built in the `universe-visualization-devel` stage.

### `universe-localization-mapping-devel`

This stage installs the dependency packages based on `/rosdep-universe-localization-mapping-depend-packages.txt` and build the packages under the following directories of `autoware.repos`.
This stage installs the dependency packages based on `/rosdep-universe-localization-mapping-depend-packages.txt` and builds the packages under the following directories of `autoware.repos`:

- `universe/autoware.universe/localization`
- `universe/autoware.universe/map`

### `universe-localization-mapping`

This stage is a Autoware Universe Localization/Mapping runtime container. It only includes the dependencies given by `/rosdep-universe-localization-mapping-exec-depend-packages.txt` and the binaries built in the `universe-localization-mapping-devel` stage.
This stage is an Autoware Universe Localization/Mapping runtime container. It only includes the dependencies given by `/rosdep-universe-localization-mapping-exec-depend-packages.txt` and the binaries built in the `universe-localization-mapping-devel` stage.

### `universe-planning-control-devel`

This stage installs the dependency packages based on `/rosdep-universe-planning-control-depend-packages.txt` and build the packages under the following directories of `autoware.repos`.
This stage installs the dependency packages based on `/rosdep-universe-planning-control-depend-packages.txt` and builds the packages under the following directories of `autoware.repos`:

- `universe/autoware.universe/control`
- `universe/autoware.universe/planning`

### `universe-planning-control`

This stage is a Autoware Universe Planning/Control runtime container. It only includes the dependencies given by `/rosdep-universe-planning-control-exec-depend-packages.txt` and the binaries built in the `universe-planning-control-devel` stage.
This stage is an Autoware Universe Planning/Control runtime container. It only includes the dependencies given by `/rosdep-universe-planning-control-exec-depend-packages.txt` and the binaries built in the `universe-planning-control-devel` stage.

### `universe-vehicle-system-devel`

This stage installs the dependency packages based on `/rosdep-universe-vehicle-system-depend-packages.txt` and build the packages under the following directories of `autoware.repos`.
This stage installs the dependency packages based on `/rosdep-universe-vehicle-system-depend-packages.txt` and builds the packages under the following directories of `autoware.repos`:

- `universe/autoware.universe/vehicle`
- `universe/autoware.universe/system`

### `universe-vehicle-system`

This stage is a Autoware Universe Vehicle/System runtime container. It only includes the dependencies given by `/rosdep-universe-vehicle-system-exec-depend-packages.txt` and the binaries built in the `universe-vehicle-system-devel` stage.
This stage is an Autoware Universe Vehicle/System runtime container. It only includes the dependencies given by `/rosdep-universe-vehicle-system-exec-depend-packages.txt` and the binaries built in the `universe-vehicle-system-devel` stage.

### `universe-devel`

This stage installs the dependency packages based on `/rosdep-universe-depend-packages.txt` and build the remaining packages of `autoware.repos`:
This stage installs the dependency packages based on `/rosdep-universe-depend-packages.txt` and copies the binaries built in the following stages:

- `universe-sensing-perception-devel`
- `universe-localization-mapping-devel`
- `universe-planning-control-devel`
- `universe-vehicle-system-devel`

Then it builds the remaining packages of `autoware.repos`:

- `launcher`
- `param`
Expand All @@ -160,13 +190,20 @@ This stage installs the dependency packages based on `/rosdep-universe-depend-pa
- `universe/autoware.universe/evaluator`
- `universe/autoware.universe/launch`
- `universe/autoware.universe/simulator`
- `universe/autoware.universe/system`
- `universe/autoware.universe/tools`
- `universe/autoware.universe/vehicle`
- `universe/autoware.universe/visualization`
- `vehicle`

This stage provides an all-in-one development container to Autoware developers. By running the host's source code with volume mounting, it allows for easy building and debugging of Autoware.

### `universe-devel-cuda`

This stage installs the CUDA development environment and copies the binaries built in the `universe-sensing-perception-devel-cuda` stage to the `universe-devel` stage.

### `universe`

This stage is an Autoware Universe runtime container. It only includes the dependencies given by `/rosdep-exec-depend-packages.txt`, the binaries built in the `universe-devel` stage, and artifacts.
This stage is an Autoware Universe runtime container. It only includes the dependencies given by `/rosdep-exec-depend-packages.txt` and the binaries built in the `universe-devel` stage.

### `universe-cuda`

This stage installs the CUDA runtime environment and copies the binaries built in the `universe-devel-cuda` stage.
Loading

0 comments on commit eb9164a

Please sign in to comment.