diff --git a/.devcontainer/base/devcontainer.json b/.devcontainer/base/devcontainer.json index f3b5ffe9984..fdef3562af1 100644 --- a/.devcontainer/base/devcontainer.json +++ b/.devcontainer/base/devcontainer.json @@ -1,8 +1,8 @@ { - "name": "Autoware", + "name": "autoware:universe-devel", "build": { "dockerfile": "../Dockerfile", - "args": { "BASE_IMAGE": "ghcr.io/autowarefoundation/autoware:latest-devel" } + "args": { "BASE_IMAGE": "ghcr.io/autowarefoundation/autoware:universe-devel" } }, "remoteUser": "autoware", "runArgs": [ diff --git a/.devcontainer/cuda/devcontainer.json b/.devcontainer/cuda/devcontainer.json index bb0b6ad849e..3a6a1c247a1 100644 --- a/.devcontainer/cuda/devcontainer.json +++ b/.devcontainer/cuda/devcontainer.json @@ -1,8 +1,8 @@ { - "name": "Autoware-cuda", + "name": "autoware:universe-devel-cuda", "build": { "dockerfile": "../Dockerfile", - "args": { "BASE_IMAGE": "ghcr.io/autowarefoundation/autoware:latest-devel-cuda" } + "args": { "BASE_IMAGE": "ghcr.io/autowarefoundation/autoware:universe-devel-cuda" } }, "remoteUser": "autoware", "hostRequirements": { diff --git a/.dockerignore b/.dockerignore index 3a5004f8199..ac26bde50a1 100644 --- a/.dockerignore +++ b/.dockerignore @@ -13,11 +13,9 @@ docker # Ignore a part of files under src src/**/.* src/**/*.asc -src/**/*.csv src/**/*.gif src/**/*.md src/**/*.pcd -src/**/*.png src/**/*.svg # Ignore generated files by colcon diff --git a/.github/actions/docker-build-and-push/action.yaml b/.github/actions/docker-build-and-push/action.yaml index 63b53f7b17f..b7e6b393b1e 100644 --- a/.github/actions/docker-build-and-push/action.yaml +++ b/.github/actions/docker-build-and-push/action.yaml @@ -14,9 +14,6 @@ inputs: build-args: description: "" required: false - tag-prefix: - description: "" - required: false tag-suffix: description: "" required: false @@ -70,79 +67,154 @@ runs: } skip-extraction: true - - name: Set Docker tags - id: set-docker-tags - run: | - tags=() - if [ "${{ github.event_name }}" == "push" ] && [ "${{ github.ref_type }}" == "tag" ]; then - tags+=("$(echo "${{ github.ref }}" | sed -E 's/.*([vV][0-9]+\.[0-9]+\.[0-9]+).*/\1/')") - fi - - tags+=("{{date 'YYYYMMDD'}}") - tags+=("latest") - tags+=("latest-${{ inputs.tag-prefix }}") - - # Output multiline strings: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings - EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) - echo "tags<<$EOF" >> $GITHUB_OUTPUT - echo "$(printf "%s\n" "${tags[@]}")" >> $GITHUB_OUTPUT - echo "$EOF" >> $GITHUB_OUTPUT + - name: Get current date + id: date + run: echo "date=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT shell: bash - - name: Docker meta for base + - name: Docker meta for autoware:base id: meta-base uses: docker/metadata-action@v5 with: images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }} - tags: ${{ steps.set-docker-tags.outputs.tags }} + tags: | + type=raw,value=base${{ inputs.tag-suffix }}-${{ inputs.platform }} + type=raw,value=base${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }} bake-target: docker-metadata-action-base flavor: | latest=false - suffix=-base - - name: Docker meta for autoware-core - id: meta-autoware-core + - name: Docker meta for autoware:core-devel + id: meta-core-devel + uses: docker/metadata-action@v5 + with: + images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }} + tags: | + type=raw,value=core-devel${{ inputs.tag-suffix }}-${{ inputs.platform }} + type=raw,value=core-devel${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }} + bake-target: docker-metadata-action-core-devel + flavor: | + latest=false + + - name: Docker meta for autoware:universe-sensing-perception-devel + id: meta-universe-sensing-perception-devel + uses: docker/metadata-action@v5 + with: + images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }} + tags: | + type=raw,value=universe-sensing-perception-devel${{ inputs.tag-suffix }}-${{ inputs.platform }} + type=raw,value=universe-sensing-perception-devel${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }} + bake-target: docker-metadata-action-universe-sensing-perception-devel + flavor: | + latest=false + + - name: Docker meta for autoware:universe-sensing-perception + id: meta-universe-sensing-perception + uses: docker/metadata-action@v5 + with: + images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }} + tags: | + type=raw,value=universe-sensing-perception${{ inputs.tag-suffix }}-${{ inputs.platform }} + type=raw,value=universe-sensing-perception${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }} + bake-target: docker-metadata-action-universe-sensing-perception + flavor: | + latest=false + + - name: Docker meta for autoware:universe-localization-mapping-devel + id: meta-universe-localization-mapping-devel + uses: docker/metadata-action@v5 + with: + images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }} + tags: | + type=raw,value=universe-localization-mapping-devel${{ inputs.tag-suffix }}-${{ inputs.platform }} + type=raw,value=universe-localization-mapping-devel${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }} + bake-target: docker-metadata-action-universe-localization-mapping-devel + flavor: | + latest=false + + - name: Docker meta for autoware:universe-localization-mapping + id: meta-universe-localization-mapping + uses: docker/metadata-action@v5 + with: + images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }} + tags: | + type=raw,value=universe-localization-mapping${{ inputs.tag-suffix }}-${{ inputs.platform }} + type=raw,value=universe-localization-mapping${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }} + bake-target: docker-metadata-action-universe-localization-mapping + flavor: | + latest=false + + - name: Docker meta for autoware:universe-planning-control-devel + id: meta-universe-planning-control-devel + uses: docker/metadata-action@v5 + with: + images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }} + tags: | + type=raw,value=universe-planning-control-devel${{ inputs.tag-suffix }}-${{ inputs.platform }} + type=raw,value=universe-planning-control-devel${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }} + bake-target: docker-metadata-action-universe-planning-control-devel + flavor: | + latest=false + + - name: Docker meta for autoware:universe-planning-control + id: meta-universe-planning-control + uses: docker/metadata-action@v5 + with: + images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }} + tags: | + type=raw,value=universe-planning-control${{ inputs.tag-suffix }}-${{ inputs.platform }} + type=raw,value=universe-planning-control${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }} + bake-target: docker-metadata-action-universe-planning-control + flavor: | + latest=false + + - name: Docker meta for autoware:universe-vehicle-system-devel + id: meta-universe-vehicle-system-devel uses: docker/metadata-action@v5 with: images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }} - tags: ${{ steps.set-docker-tags.outputs.tags }} - bake-target: docker-metadata-action-autoware-core + tags: | + type=raw,value=universe-vehicle-system-devel${{ inputs.tag-suffix && '-' }}${{ inputs.tag-suffix }} + type=raw,value=universe-vehicle-system-devel${{ inputs.tag-suffix && '-' }}${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }} + bake-target: docker-metadata-action-universe-vehicle-system-devel flavor: | latest=false - suffix=-autoware-core${{ inputs.tag-suffix }} - - name: Docker meta for autoware-universe - id: meta-autoware-universe + - name: Docker meta for autoware:universe-vehicle-system + id: meta-universe-vehicle-system uses: docker/metadata-action@v5 with: images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }} - tags: ${{ steps.set-docker-tags.outputs.tags }} - bake-target: docker-metadata-action-autoware-universe + tags: | + type=raw,value=universe-vehicle-system${{ inputs.tag-suffix && '-' }}${{ inputs.tag-suffix }} + type=raw,value=universe-vehicle-system${{ inputs.tag-suffix && '-' }}${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }} + bake-target: docker-metadata-action-universe-vehicle-system flavor: | latest=false - suffix=-autoware-universe${{ inputs.tag-suffix }} - - name: Docker meta for devel - id: meta-devel + - name: Docker meta for autoware:universe-devel + id: meta-universe-devel uses: docker/metadata-action@v5 with: images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }} - tags: ${{ steps.set-docker-tags.outputs.tags }} - bake-target: docker-metadata-action-devel + tags: | + type=raw,value=universe-devel${{ inputs.tag-suffix }}-${{ inputs.platform }} + type=raw,value=universe-devel${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }} + bake-target: docker-metadata-action-universe-devel flavor: | latest=false - suffix=-devel${{ inputs.tag-suffix }} - - name: Docker meta for runtime - id: meta-runtime + - name: Docker meta for autoware:universe + id: meta-universe uses: docker/metadata-action@v5 with: images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }} - tags: ${{ steps.set-docker-tags.outputs.tags }} - bake-target: docker-metadata-action-runtime + tags: | + type=raw,value=universe${{ inputs.tag-suffix }}-${{ inputs.platform }} + type=raw,value=universe${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }} + bake-target: docker-metadata-action-universe flavor: | latest=auto - suffix=-runtime${{ inputs.tag-suffix }} - name: Login to GitHub Container Registry uses: docker/login-action@v3 @@ -158,10 +230,17 @@ runs: files: | docker/docker-bake.hcl ${{ steps.meta-base.outputs.bake-file }} - ${{ steps.meta-autoware-core.outputs.bake-file }} - ${{ steps.meta-autoware-universe.outputs.bake-file }} - ${{ steps.meta-devel.outputs.bake-file }} - ${{ steps.meta-runtime.outputs.bake-file }} + ${{ steps.meta-core-devel.outputs.bake-file }} + ${{ steps.meta-universe-sensing-perception-devel.outputs.bake-file }} + ${{ steps.meta-universe-sensing-perception.outputs.bake-file }} + ${{ steps.meta-universe-localization-mapping-devel.outputs.bake-file }} + ${{ steps.meta-universe-localization-mapping.outputs.bake-file }} + ${{ steps.meta-universe-planning-control-devel.outputs.bake-file }} + ${{ steps.meta-universe-planning-control.outputs.bake-file }} + ${{ steps.meta-universe-vehicle-system-devel.outputs.bake-file }} + ${{ steps.meta-universe-vehicle-system.outputs.bake-file }} + ${{ steps.meta-universe-devel.outputs.bake-file }} + ${{ steps.meta-universe.outputs.bake-file }} provenance: false set: | ${{ inputs.build-args }} diff --git a/.github/workflows/create-prs-to-update-vcs-repositories.yaml b/.github/workflows/create-prs-to-update-vcs-repositories.yaml new file mode 100644 index 00000000000..8eca0a8fb9b --- /dev/null +++ b/.github/workflows/create-prs-to-update-vcs-repositories.yaml @@ -0,0 +1,31 @@ +name: create-prs-to-update-vcs-repositories + +on: + schedule: + - cron: 0 0,6,12,18 * * * + workflow_dispatch: + +jobs: + create-version-update-pr: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Generate GitHub App token + id: generate-token + uses: tibdex/github-app-token@v2 + with: + app_id: ${{ secrets.APP_ID }} + private_key: ${{ secrets.PRIVATE_KEY }} + + - name: Create PRs to update VCS repositories + 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: autoware.repos + verbosity: 0 diff --git a/.github/workflows/docker-build-and-push-self-hosted.yaml b/.github/workflows/docker-build-and-push-arm64.yaml similarity index 89% rename from .github/workflows/docker-build-and-push-self-hosted.yaml rename to .github/workflows/docker-build-and-push-arm64.yaml index 36ced590d21..c262f0944a1 100644 --- a/.github/workflows/docker-build-and-push-self-hosted.yaml +++ b/.github/workflows/docker-build-and-push-arm64.yaml @@ -1,4 +1,4 @@ -name: docker-build-and-push-self-hosted +name: docker-build-and-push-arm64 on: push: @@ -26,12 +26,12 @@ jobs: base_image_env: base_image lib_dir: aarch64 setup-args: --no-nvidia - additional-tag-suffix: "" + tag-suffix: "" - name: cuda platform: arm64 base_image_env: base_image lib_dir: aarch64 - additional-tag-suffix: -cuda + tag-suffix: -cuda steps: # https://github.com/actions/checkout/issues/211 - name: Change permission of workspace @@ -51,7 +51,7 @@ jobs: - name: Get changed files id: changed-files - uses: tj-actions/changed-files@v44 + uses: tj-actions/changed-files@v45 with: files: | *.env @@ -80,8 +80,7 @@ jobs: *.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:${{ matrix.name }}-${{ matrix.platform }}-${{ github.ref_name }} *.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:${{ matrix.name }}-${{ matrix.platform }}-main *.cache-to=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:${{ matrix.name }}-${{ matrix.platform }}-${{ github.ref_name }},mode=max - tag-suffix: ${{ matrix.additional-tag-suffix }}-${{ matrix.platform }} - tag-prefix: ${{ needs.load-env.outputs.rosdistro }} + tag-suffix: ${{ matrix.tag-suffix }} - name: Show disk space run: | diff --git a/.github/workflows/docker-build-and-push.yaml b/.github/workflows/docker-build-and-push.yaml index 4fe8759ba1a..025d6e7485c 100644 --- a/.github/workflows/docker-build-and-push.yaml +++ b/.github/workflows/docker-build-and-push.yaml @@ -26,12 +26,12 @@ jobs: base_image_env: base_image lib_dir: x86_64 setup-args: --no-nvidia - additional-tag-suffix: "" + tag-suffix: "" - name: cuda platform: amd64 base_image_env: base_image lib_dir: x86_64 - additional-tag-suffix: -cuda + tag-suffix: -cuda steps: - name: Check out repository uses: actions/checkout@v4 @@ -46,7 +46,7 @@ jobs: - name: Get changed files id: changed-files - uses: tj-actions/changed-files@v44 + uses: tj-actions/changed-files@v45 with: files: | *.env @@ -75,8 +75,7 @@ jobs: *.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:${{ matrix.name }}-${{ matrix.platform }}-${{ github.ref_name }} *.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:${{ matrix.name }}-${{ matrix.platform }}-main *.cache-to=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:${{ matrix.name }}-${{ matrix.platform }}-${{ github.ref_name }},mode=max - tag-suffix: ${{ matrix.additional-tag-suffix }}-${{ matrix.platform }} - tag-prefix: ${{ needs.load-env.outputs.rosdistro }} + tag-suffix: ${{ matrix.tag-suffix }} - name: Show disk space run: | diff --git a/.github/workflows/health-check-self-hosted.yaml b/.github/workflows/health-check-arm64.yaml similarity index 93% rename from .github/workflows/health-check-self-hosted.yaml rename to .github/workflows/health-check-arm64.yaml index d42be5c5f51..baf58b00d3b 100644 --- a/.github/workflows/health-check-self-hosted.yaml +++ b/.github/workflows/health-check-arm64.yaml @@ -1,4 +1,4 @@ -name: health-check-self-hosted +name: health-check-arm64 on: schedule: @@ -24,12 +24,10 @@ jobs: base_image_env: base_image lib_dir: aarch64 setup-args: --no-nvidia - additional-tag-suffix: "" - name: cuda platform: arm64 base_image_env: base_image lib_dir: aarch64 - additional-tag-suffix: -cuda steps: # https://github.com/actions/checkout/issues/211 - name: Change permission of workspace diff --git a/.github/workflows/health-check.yaml b/.github/workflows/health-check.yaml index bed2d8f51a6..a312cb970ec 100644 --- a/.github/workflows/health-check.yaml +++ b/.github/workflows/health-check.yaml @@ -39,12 +39,10 @@ jobs: base_image_env: base_image lib_dir: x86_64 setup-args: --no-nvidia - additional-tag-suffix: "" - name: cuda platform: amd64 base_image_env: base_image lib_dir: x86_64 - additional-tag-suffix: -cuda steps: - name: Check out repository uses: actions/checkout@v4 diff --git a/.github/workflows/update-docker-manifest.yaml b/.github/workflows/update-docker-manifest.yaml index a0539b037ed..af9324fb162 100644 --- a/.github/workflows/update-docker-manifest.yaml +++ b/.github/workflows/update-docker-manifest.yaml @@ -2,7 +2,7 @@ name: update-docker-manifest on: schedule: - - cron: 0 0 * * * + - cron: 0 */2 * * * workflow_dispatch: jobs: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 26c5585f4fc..e6c3aba177d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -38,7 +38,7 @@ repos: - id: shellcheck - repo: https://github.com/scop/pre-commit-shfmt - rev: v3.8.0-1 + rev: v3.9.0-1 hooks: - id: shfmt args: [-w, -s, -i=4] diff --git a/.webauto-ci.yaml b/.webauto-ci.yaml index 74a23b71d4e..2d6771107f5 100644 --- a/.webauto-ci.yaml +++ b/.webauto-ci.yaml @@ -1,9 +1,77 @@ +# The configuration file for Web.Auto CI/CD tool. +# https://docs.web.auto/user-manuals/evaluator/configuration/reference/introduction + version: 2 artifacts: - name: main + metadata: + play-ondemand.ci.web.auto/buildspec: Autoware-Humble_v0.29.0 build: - type: tier4/universe/main/amd64/v1 + type: custom + runtime: + type: standard1/amd64/large + source: + vcstool: + repositories_files: + - autoware.repos + - simulator.repos + import_path: src + environment_variables: + AUTOWARE_PATH: /opt/autoware + DEBIAN_FRONTEND: noninteractive + LANG: C.UTF-8 + phases: + - name: environment-setup + user: root + exec: ./.webauto-ci/main/environment-setup/run.sh + caches: + - name: apt-lists + mountpoint: /var/lib/apt/lists + - name: apt-archives + mountpoint: /var/cache/apt/archives + build_result_reuse: + key_files: + - .webauto-ci/main/environment-setup/**/* + - name: autoware-setup + user: autoware + exec: ./.webauto-ci/main/autoware-setup/run.sh + caches: + - name: apt-lists + mountpoint: /var/lib/apt/lists + - name: apt-archives + mountpoint: /var/cache/apt/archives + build_result_reuse: + key_files: + - .webauto-ci/main/autoware-setup/**/* + - ansible/**/* + - ansible-galaxy-requirements.yaml + - amd64.env + incremental_build: + enabled: true + - name: autoware-build + user: autoware + exec: ./.webauto-ci/main/autoware-build/run.sh + environment_variables: + PARALLEL_WORKERS: "32" + CCACHE_DIR: /tmp/build/cache/ccache + caches: + - name: apt-lists + mountpoint: /var/lib/apt/lists + - name: apt-archives + mountpoint: /var/cache/apt/archives + - name: ccache + mountpoint: /tmp/build/cache/ccache + build_result_reuse: + key_files: + - .webauto-ci/main/autoware-build/**/* + - src/**/* + base_container_image: + from: ubuntu:22.04 + output_container_image: + from: autoware-build + workdir: /opt/autoware + user: autoware simulations: - name: lexus_planning_sim @@ -13,9 +81,7 @@ simulations: type: container artifact: main runtime: - type: simulator/standard1/amd64/medium - cpu: 8 - memory: 16384 + type: standard1/amd64/medium parameters: launch_autoware: "true" autoware_launch_package: autoware_launch diff --git a/.webauto-ci/main/autoware-build/run.sh b/.webauto-ci/main/autoware-build/run.sh new file mode 100755 index 00000000000..f6d3751afad --- /dev/null +++ b/.webauto-ci/main/autoware-build/run.sh @@ -0,0 +1,44 @@ +#!/bin/bash -e + +: "${WEBAUTO_CI_SOURCE_PATH:?is not set}" +: "${WEBAUTO_CI_DEBUG_BUILD:?is not set}" + +: "${AUTOWARE_PATH:?is not set}" +: "${CCACHE_DIR:=}" +: "${CCACHE_SIZE:=1G}" +: "${PARALLEL_WORKERS:=4}" + +sudo mkdir "$AUTOWARE_PATH" +sudo chown "$(whoami)": "$AUTOWARE_PATH" +cd "$WEBAUTO_CI_SOURCE_PATH" +cp -r src .webauto-ci.* "$AUTOWARE_PATH" +cd "$AUTOWARE_PATH" + +if [ -n "$CCACHE_DIR" ]; then + mkdir -p "$CCACHE_DIR" + export USE_CCACHE=1 + export CCACHE_DIR="$CCACHE_DIR" + export CC="/usr/lib/ccache/gcc" + export CXX="/usr/lib/ccache/g++" + ccache -M "$CCACHE_SIZE" +fi + +sudo -E apt-get -y update + +# shellcheck disable=SC2012 +ROS_DISTRO=$(ls -1 /opt/ros | head -1) +# shellcheck disable=SC1090 +source "/opt/ros/$ROS_DISTRO/setup.bash" +rosdep update +rosdep install -y --from-paths src --ignore-src --rosdistro "$ROS_DISTRO" + +[[ $WEBAUTO_CI_DEBUG_BUILD == "true" ]] && build_type="RelWithDebInfo" || build_type="Release" + +colcon build \ + --cmake-args -DCMAKE_BUILD_TYPE="$build_type" -DBUILD_TESTING=off -Wno-dev --no-warn-unused-cli \ + --symlink-install \ + --catkin-skip-building-tests \ + --executor parallel \ + --parallel-workers "$PARALLEL_WORKERS" + +sudo -E apt-get -y autoremove diff --git a/.webauto-ci/main/autoware-setup/run.sh b/.webauto-ci/main/autoware-setup/run.sh new file mode 100755 index 00000000000..a4f840c9398 --- /dev/null +++ b/.webauto-ci/main/autoware-setup/run.sh @@ -0,0 +1,20 @@ +#!/bin/bash -e + +ansible_args=() +ansible_args+=("--extra-vars" "prompt_install_nvidia=y") +ansible_args+=("--extra-vars" "prompt_download_artifacts=y") +ansible_args+=("--extra-vars" "data_dir=$HOME/autoware_data") +ansible_args+=("--extra-vars" "ros2_installation_type=ros-base") +ansible_args+=("--extra-vars" "install_devel=false") + +# read amd64 env file and expand ansible arguments +source 'amd64.env' +while read -r env_name; do + ansible_args+=("--extra-vars" "${env_name}=${!env_name}") +done < <(sed "s/=.*//" >/etc/sudoers +gpasswd -a "$user" sudo diff --git a/ansible/playbooks/install_rviz_theme.yaml b/ansible/playbooks/install_rviz_theme.yaml new file mode 100644 index 00000000000..a30b0900ddf --- /dev/null +++ b/ansible/playbooks/install_rviz_theme.yaml @@ -0,0 +1,4 @@ +- name: Install RViz theme + hosts: localhost + roles: + - autoware.dev_env.qt5ct_setup diff --git a/ansible/playbooks/openadkit.yaml b/ansible/playbooks/openadkit.yaml index 46a8757229f..5cfa0408d58 100644 --- a/ansible/playbooks/openadkit.yaml +++ b/ansible/playbooks/openadkit.yaml @@ -26,16 +26,16 @@ when: module == 'base' - role: autoware.dev_env.pacmod when: module == 'base' + - role: autoware.dev_env.cuda + when: module == 'base' and prompt_install_nvidia=='y' + - role: autoware.dev_env.tensorrt + when: module == 'base' and prompt_install_nvidia=='y' - role: autoware.dev_env.build_tools when: module == 'all' and install_devel=='y' # Module specific dependencies - role: autoware.dev_env.geographiclib when: module == 'perception-localization' or module == 'all' - - role: autoware.dev_env.cuda - when: (module == 'perception-localization' or module == 'all') and prompt_install_nvidia=='y' - - role: autoware.dev_env.tensorrt - when: (module == 'perception-localization' or module == 'all') and prompt_install_nvidia=='y' # Development environment - role: autoware.dev_env.dev_tools diff --git a/ansible/playbooks/telegraf.yaml b/ansible/playbooks/telegraf.yaml new file mode 100644 index 00000000000..a490821a23f --- /dev/null +++ b/ansible/playbooks/telegraf.yaml @@ -0,0 +1,4 @@ +- name: Set up Telegraf and InfluxDB v2 + hosts: localhost + roles: + - autoware.dev_env.telegraf diff --git a/ansible/playbooks/universe.yaml b/ansible/playbooks/universe.yaml index e443c041bc5..ce32248d98b 100644 --- a/ansible/playbooks/universe.yaml +++ b/ansible/playbooks/universe.yaml @@ -62,3 +62,6 @@ # ONNX files and other artifacts - role: autoware.dev_env.artifacts when: prompt_download_artifacts == 'y' + + # Qt5ct setup (RViz theme) + - role: autoware.dev_env.qt5ct_setup diff --git a/ansible/roles/artifacts/tasks/main.yaml b/ansible/roles/artifacts/tasks/main.yaml index 3356431e370..c46bf3aed2f 100644 --- a/ansible/roles/artifacts/tasks/main.yaml +++ b/ansible/roles/artifacts/tasks/main.yaml @@ -174,13 +174,13 @@ mode: "644" checksum: sha256:ad66a061d61449af671bd0d14c2c407f0d749753f17f3165287857f686c4fd1a -- name: Download lidar_transfusion/transfusion.param.yaml +- name: Download lidar_transfusion/transfusion_ml_package.param.yaml become: true ansible.builtin.get_url: - url: https://awf.ml.dev.web.auto/perception/models/transfusion/t4xx1_90m/v2/transfusion.param.yaml - dest: "{{ data_dir }}/lidar_transfusion/transfusion.param.yaml" + url: https://awf.ml.dev.web.auto/perception/models/transfusion/t4xx1_90m/v2/transfusion_ml_package.param.yaml + dest: "{{ data_dir }}/lidar_transfusion/transfusion_ml_package.param.yaml" mode: "644" - checksum: sha256:fdd8dd21b7c1c0f9a15119fa6a79565f927ce8f6bac4ddf095cb7e27672cb3d8 + checksum: sha256:476f7727adc17a823962f2e09ba23d40f3116c50be48361d98179d054cd131b6 - name: Download lidar_transfusion/detection_class_remapper.param.yaml become: true diff --git a/ansible/roles/qt5ct_setup/README.md b/ansible/roles/qt5ct_setup/README.md new file mode 100644 index 00000000000..41fc944eb4e --- /dev/null +++ b/ansible/roles/qt5ct_setup/README.md @@ -0,0 +1,60 @@ +# qt5ct_setup Ansible role + +## Overview + +The `qt5ct_setup` Ansible role automates the configuration of the `qt5ct` environment for Autoware. +It won't affect the system-wide configuration. + +## Installation + +Follow the instructions below to **install** or **update** the custom theme for `RViz2` in Autoware. + +> **Important:** Both commands must be run when you want to update the theme. + +```bash +cd ~/autoware # The root directory of the cloned repository +ansible-galaxy collection install -f -r "ansible-galaxy-requirements.yaml" +ansible-playbook autoware.dev_env.install_rviz_theme --ask-become-pass +``` + +## How to use the custom theme in RViz2 + +To apply a custom theme to RViz2, you can use the `qt5ct` platform theme. Follow these steps to ensure that the `QT_QPA_PLATFORMTHEME` environment variable is set correctly for your RViz2 instance when used with Autoware. + +### Manual setup for running RViz2 + +Before running RViz2 manually, set the `QT_QPA_PLATFORMTHEME` environment variable to `qt5ct`. +This ensures that the custom theme settings are applied. + +```bash +export QT_QPA_PLATFORMTHEME=qt5ct +``` + +Then, start RViz2 as usual. + +```bash +rviz2 +``` + +### Automatic setup in Autoware + +In Autoware, the `QT_QPA_PLATFORMTHEME` environment variable is automatically set within the main [autoware.launch.xml](https://github.com/autowarefoundation/autoware_launch/blob/main/autoware_launch/launch/autoware.launch.xml) file. +Therefore, you do not need to manually set this environment variable when launching Autoware. + +In the `autoware.launch.xml` file, RViz2 is configured with the following `` element: + +```xml + + + +``` + +This configuration automatically sets the `QT_QPA_PLATFORMTHEME` to `qt5ct` when RViz2 is launched as part of Autoware. +It also includes additional options such as respawn behavior and custom RViz2 configurations. diff --git a/ansible/roles/qt5ct_setup/defaults/main.yml b/ansible/roles/qt5ct_setup/defaults/main.yml new file mode 100644 index 00000000000..bdaab0e3e6d --- /dev/null +++ b/ansible/roles/qt5ct_setup/defaults/main.yml @@ -0,0 +1 @@ +# defaults file for qt5ct_setup diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/active/downarrow.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/active/downarrow.svg new file mode 100644 index 00000000000..22a70a5fbc9 --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/active/downarrow.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/active/uparrow.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/active/uparrow.svg new file mode 100644 index 00000000000..b283329b32b --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/active/uparrow.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/disabled/branch-end.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/disabled/branch-end.svg new file mode 100755 index 00000000000..decd600a806 --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/disabled/branch-end.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/disabled/branch-more.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/disabled/branch-more.svg new file mode 100755 index 00000000000..669c8ee6b77 --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/disabled/branch-more.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/disabled/downarrow.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/disabled/downarrow.svg new file mode 100755 index 00000000000..22a70a5fbc9 --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/disabled/downarrow.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/disabled/leftarrow.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/disabled/leftarrow.svg new file mode 100755 index 00000000000..a1b5eb770c3 --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/disabled/leftarrow.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/disabled/radiobutton_checked.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/disabled/radiobutton_checked.svg new file mode 100755 index 00000000000..462030e6b75 --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/disabled/radiobutton_checked.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/disabled/radiobutton_unchecked.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/disabled/radiobutton_unchecked.svg new file mode 100755 index 00000000000..73e58ac050b --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/disabled/radiobutton_unchecked.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/disabled/rightarrow.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/disabled/rightarrow.svg new file mode 100755 index 00000000000..31224808311 --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/disabled/rightarrow.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/disabled/uparrow.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/disabled/uparrow.svg new file mode 100755 index 00000000000..b283329b32b --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/disabled/uparrow.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/disabled/vline.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/disabled/vline.svg new file mode 100755 index 00000000000..67f84120ce2 --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/disabled/vline.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/add.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/add.svg new file mode 100644 index 00000000000..c747fc89c49 --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/add.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/branch-closed.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/branch-closed.svg new file mode 100755 index 00000000000..43acdf27491 --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/branch-closed.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/branch-end.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/branch-end.svg new file mode 100755 index 00000000000..87f7840f363 --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/branch-end.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/branch-more.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/branch-more.svg new file mode 100755 index 00000000000..9f8af0ba8c3 --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/branch-more.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/branch-open.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/branch-open.svg new file mode 100755 index 00000000000..d22353f4e9e --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/branch-open.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/checkbox_checked_disabled.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/checkbox_checked_disabled.svg new file mode 100644 index 00000000000..f737c436438 --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/checkbox_checked_disabled.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/checkbox_checked_enabled.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/checkbox_checked_enabled.svg new file mode 100644 index 00000000000..d9eee3a1e08 --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/checkbox_checked_enabled.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/checkbox_checked_hovered.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/checkbox_checked_hovered.svg new file mode 100644 index 00000000000..b49a8cf315b --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/checkbox_checked_hovered.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/checkbox_checked_pressed.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/checkbox_checked_pressed.svg new file mode 100644 index 00000000000..5d3bccb1941 --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/checkbox_checked_pressed.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/checkbox_indeterminate_disabled.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/checkbox_indeterminate_disabled.svg new file mode 100644 index 00000000000..8f9b9ae512c --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/checkbox_indeterminate_disabled.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/checkbox_indeterminate_enabled.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/checkbox_indeterminate_enabled.svg new file mode 100644 index 00000000000..797fb421df9 --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/checkbox_indeterminate_enabled.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/checkbox_indeterminate_hovered.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/checkbox_indeterminate_hovered.svg new file mode 100644 index 00000000000..43b20a76820 --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/checkbox_indeterminate_hovered.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/checkbox_indeterminate_pressed.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/checkbox_indeterminate_pressed.svg new file mode 100644 index 00000000000..a39172c056a --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/checkbox_indeterminate_pressed.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/checkbox_unchecked_disabled.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/checkbox_unchecked_disabled.svg new file mode 100644 index 00000000000..873587b1985 --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/checkbox_unchecked_disabled.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/checkbox_unchecked_enabled.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/checkbox_unchecked_enabled.svg new file mode 100644 index 00000000000..265a55067f5 --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/checkbox_unchecked_enabled.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/checkbox_unchecked_hovered.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/checkbox_unchecked_hovered.svg new file mode 100644 index 00000000000..27990330dc2 --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/checkbox_unchecked_hovered.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/checkbox_unchecked_pressed.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/checkbox_unchecked_pressed.svg new file mode 100644 index 00000000000..e9c0436eb7e --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/checkbox_unchecked_pressed.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/close.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/close.svg new file mode 100755 index 00000000000..fed396b0d88 --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/close.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/downarrow.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/downarrow.svg new file mode 100755 index 00000000000..8176e8f50b0 --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/downarrow.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/float.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/float.svg new file mode 100755 index 00000000000..bb2383e4ec7 --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/float.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/leftarrow.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/leftarrow.svg new file mode 100755 index 00000000000..e595c0d652d --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/leftarrow.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/minus.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/minus.svg new file mode 100644 index 00000000000..7be3c893e40 --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/minus.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/more.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/more.svg new file mode 100644 index 00000000000..c11e849e587 --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/more.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/radiobutton_checked.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/radiobutton_checked.svg new file mode 100755 index 00000000000..ea2d8183e3d --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/radiobutton_checked.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/radiobutton_checked_invert.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/radiobutton_checked_invert.svg new file mode 100755 index 00000000000..92003b1b80c --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/radiobutton_checked_invert.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/radiobutton_unchecked.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/radiobutton_unchecked.svg new file mode 100755 index 00000000000..ec6ee7a3213 --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/radiobutton_unchecked.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/radiobutton_unchecked_invert.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/radiobutton_unchecked_invert.svg new file mode 100755 index 00000000000..5defd965a50 --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/radiobutton_unchecked_invert.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/rightarrow.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/rightarrow.svg new file mode 100755 index 00000000000..4845aa5975c --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/rightarrow.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/sizegrip.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/sizegrip.svg new file mode 100755 index 00000000000..6a3d5ec4839 --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/sizegrip.svg @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/slider.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/slider.svg new file mode 100755 index 00000000000..ecd7581285f --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/slider.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/splitter-horizontal.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/splitter-horizontal.svg new file mode 100644 index 00000000000..6be8cb04a16 --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/splitter-horizontal.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/splitter-vertical.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/splitter-vertical.svg new file mode 100644 index 00000000000..d4819f465e5 --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/splitter-vertical.svg @@ -0,0 +1,3 @@ + + + diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/tab_close.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/tab_close.svg new file mode 100755 index 00000000000..3c758445d0a --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/tab_close.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/toolbar-handle-horizontal.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/toolbar-handle-horizontal.svg new file mode 100755 index 00000000000..0d639307250 --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/toolbar-handle-horizontal.svg @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/toolbar-handle-vertical.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/toolbar-handle-vertical.svg new file mode 100755 index 00000000000..b6b267ead6f --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/toolbar-handle-vertical.svg @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/uparrow.svg b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/uparrow.svg new file mode 100755 index 00000000000..cab8eba2ab5 --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware-rviz-icons/primary/uparrow.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ansible/roles/qt5ct_setup/files/autoware.qss b/ansible/roles/qt5ct_setup/files/autoware.qss new file mode 100644 index 00000000000..3bd40b42527 --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/autoware.qss @@ -0,0 +1,1392 @@ +/* ------------------------------------------------------------------------ */ +/* QtMaterial - https://github.com/UN-GCPDS/qt-material +/* By Yeison Cardona - GCPDS +/* ------------------------------------------------------------------------ */ + +* { + color: #ffffff; + font-family: Roboto, sans-serif; + font-size: 13px; + line-height: 13px; + selection-color: #0f1417; +} + +*:focus { + outline: none; +} + +/* Basic widgets */ + +QWidget { + background-color: #0f1417; +} + +QGroupBox, +QFrame { + background-color: #0f1417; +} + +QGroupBox.fill_background, +QFrame.fill_background { + background-color: #0f1417; +} + +QSplitter { + background-color: transparent; + border: none; +} + +QStatusBar { + color: #ffffff; + background-color: #0f1417; + border-radius: 0px; +} + +QScrollArea, +QStackedWidget, +QWidget > QToolBox, +QToolBox > QWidget, +QTabWidget > QWidget { + border: none; +} + +QTabWidget::pane { + border: none; +} + +/* ------------------------------------------------------------------------ */ +/* Inputs */ + +QDateEdit, +QDateTimeEdit, +QSpinBox, +QDoubleSpinBox, +QComboBox, +QLineEdit { + color: #ffffff; + padding-left: 16px; + border-radius: 0px; + height: 24px; + background-color: #0f1417; +} + +QListView { + color: #ffffff; + height: 24px; + background-color: #1b2023; + selection-background-color: #303538; + selection-color: #ffffff; +} + +QPlainTextEdit { + padding: 8px 0px; + background-color: #0f1417; + border: 2px solid #0f1417; +} + +QTextEdit { + padding: 8px 0px; + background-color: #0f1417; +} + +QSpinBox, +QDoubleSpinBox { + color: #ffffff; + background-color: #292d30; + height: 24px; + border-bottom: 1px solid #DFE3E7; + selection-background-color: #84c2e6; +} + +QAbstractSpinBox { + padding: 2px; +} + +QDateEdit:disabled, +QDateTimeEdit:disabled, +QSpinBox:disabled, +QDoubleSpinBox:disabled, +QTextEdit:disabled, +QLineEdit:disabled { + color: rgba(255, 255, 255, 0.2); + background-color: rgba(35, 38, 41, 0.3); + border: 2px solid #232629; + border-width: 0 0 2px 0; + padding: 0px 16px; + border-radius: 0px; + height: 24px; +} + +/* ------------------------------------------------------------------------ */ +/* QComboBox */ + +QDateEdit, +QComboBox { + color: #ffffff; + height: 24px; + background-color: #292d30; + border-bottom: 1px solid #DFE3E7; +} + +QDateEdit:disabled, +QComboBox:disabled { + color: rgba(255, 255, 255, 0.2); + background-color: rgba(35, 38, 41, 0.3); + border-bottom: 2px solid #232629; +} + +QDateEdit::drop-down, +QComboBox::drop-down { + border: none; +} + +QDateEdit::down-arrow, +QComboBox::down-arrow { + image: url("/icons_path/active/downarrow.svg"); +} + +QDateEdit::down-arrow:focus, +QComboBox::down-arrow:focus { + image: url("/icons_path/primary/downarrow.svg"); +} + +QDateEdit::down-arrow:disabled, +QComboBox::down-arrow:disabled { + image: url("/icons_path/disabled/downarrow.svg"); +} + +QDateEdit QAbstractItemView, +QComboBox QAbstractItemView { + background-color: #0f1417; + padding: 4px; +} + +QDateEdit[frame="false"], +QComboBox[frame="false"] { + color: #ffffff; + background-color: transparent; + border: 1px solid transparent; +} + +QDateEdit[frame="false"]:disabled, +QComboBox[frame="false"]:disabled { + color: rgba(255, 255, 255, 0.2); +} + +/* ------------------------------------------------------------------------ */ +/* Spin buttons */ + +QDateTimeEdit::up-button, +QDoubleSpinBox::up-button, +QSpinBox::up-button { + subcontrol-origin: border; + subcontrol-position: top right; + width: 20px; + image: url("/icons_path/active/uparrow.svg"); + border-width: 0px; + margin-top: 5px; +} + +QTreeView QDateTimeEdit::up-button, +QTreeView QDoubleSpinBox::up-button, +QTreeView QSpinBox::up-button { + margin-top: 0px; +} + +QDateTimeEdit::up-button:disabled, +QDoubleSpinBox::up-button:disabled, +QSpinBox::up-button:disabled { + image: url("/icons_path/disabled/uparrow.svg"); +} + +QDateTimeEdit::down-button, +QDoubleSpinBox::down-button, +QSpinBox::down-button { + subcontrol-origin: border; + subcontrol-position: bottom right; + width: 20px; + image: url("/icons_path/active/downarrow.svg"); + border-width: 0px; + border-top-width: 0; + margin-bottom: 5px; +} + +QTreeView QDateTimeEdit::down-button, +QTreeView QDoubleSpinBox::down-button, +QTreeView QSpinBox::down-button { + margin-bottom: 0px; +} + +QDateTimeEdit::down-button:disabled, +QDoubleSpinBox::down-button:disabled, +QSpinBox::down-button:disabled { + image: url("/icons_path/disabled/downarrow.svg"); +} + +/* ------------------------------------------------------------------------ */ +/* QPushButton */ + +QPushButton { + text-transform: capitalize; + margin: 0px; + padding: 0px 16px; + height: 24px; + font-weight: bold; + color: #003546; + border: 2px solid rgba(255, 255, 255, 0); + border-radius: 14px; + background-color: #8bd0f0; +} + +QPushButton:checked, +QPushButton:pressed { + color: #003546; + background-color: #84c2e6; +} + +QPushButton:hover { + background-color: #84c2e6; + color: #003546; + border: 2px solid rgba(255, 255, 255, 0); +} + +QPushButton:flat { + margin: 0px; + color: #84c2e6; + border: none; + background-color: transparent; +} + +QPushButton:flat:hover { + background-color: #84c2e6; +} + +QPushButton:flat:pressed, +QPushButton:flat:checked { + background-color: #699bb8; +} + +QPushButton:disabled { + color: #6e7276; + background-color: #292d30; + border: 2px solid rgba(255, 255, 255, 0); +} + +QPushButton:flat:disabled { + color: #6e7276; + background-color: #292d30; + border: none; +} + +QPushButton:checked:disabled { + color: #6e7276; + background-color: #0f1417; + border: 2px solid rgba(255, 255, 255, 0); +} + +QToolButton:focus, +QPushButton:focus { + background-color: #84c2e6; +} + +QPushButton:checked:focus, +QPushButton:pressed:focus { + background-color: #699bb8; +} + +QPushButton:flat:focus { + border: none; + background-color: #84c2e6; +} + +/* ------------------------------------------------------------------------ */ +/* QTabBar */ + +QTabBar { + text-transform: capitalize; + font-weight: bold; +} + +QTabBar::tab { + color: #ffffff; + border-top: 2px solid rgba(255, 255, 255, 0); +} + +QTabBar::tab:bottom, +QTabBar::tab:top { + padding: 0 16px; + height: 28px; +} + +QTabBar::tab:left, +QTabBar::tab:right { + padding: 16px 0; + width: 28px; +} + +QTabBar::tab:top:selected, +QTabBar::tab:top:hover { + border-bottom: 2px solid #8bd0f0; +} + +QTabBar::tab:bottom:selected, +QTabBar::tab:bottom:hover { + border-top: 2px solid #8bd0f0; +} + +QTabBar::tab:right:selected, +QTabBar::tab:right:hover { + border-left: 2px solid #8bd0f0; +} + +QTabBar::tab:left:selected, +QTabBar::tab:left:hover { + border-right: 2px solid #8bd0f0; +} + +QTabBar::tab:hover { + color: #fff; + background-color: #303538; +} + +QTabBar::tab:selected { + color: #fff; + background-color: #292d30; +} + +/* pressed state */ +QTabBar::tab:pressed { + color: #fff; + background-color: #383b3f; +} + +QTabBar QToolButton:hover, +QTabBar QToolButton { + border: 0px; + background-color: #232629; +} + +QTabBar QToolButton::up-arrow { + image: url("/icons_path/primary/uparrow.svg"); + width: 28px; +} + +QTabBar QToolButton::down-arrow { + image: url("/icons_path/primary/downarrow.svg"); + width: 28px; +} + +QTabBar QToolButton::right-arrow { + image: url("/icons_path/disabled/rightarrow.svg"); + height: 28px; +} + +QTabBar QToolButton::left-arrow { + image: url("/icons_path/disabled/leftarrow.svg"); + height: 28px; +} + +QTabBar::close-button { + image: url("/icons_path/primary/tab_close.svg"); +} + +QTabBar::close-button:hover { + image: url("/icons_path/primary/tab_close.svg"); +} + +/* ------------------------------------------------------------------------ */ +/* QGroupBox */ + +QGroupBox { + padding: 16px; + padding-top: 36px; + text-transform: capitalize; +} + +QGroupBox::title { + color: #dfe3e7; + subcontrol-origin: margin; + subcontrol-position: top left; + padding: 16px; + background-color: transparent; + height: 36px; +} + +/* ------------------------------------------------------------------------ */ +/* QRadioButton and QCheckBox labels */ + +QRadioButton, +QCheckBox { + color: #84c2e6; + line-height: 12px; + height: 24px; + background-color: transparent; + spacing: 5px; +} + +QRadioButton:disabled, +QCheckBox:disabled { + color: #8bd0f0; +} + +/* ------------------------------------------------------------------------ */ +/* QRadioButton Indicator */ + +QRadioButton::indicator:checked { + image: url("/icons_path/primary/radiobutton_checked.svg"); +} + +QRadioButton::indicator:unchecked { + image: url("/icons_path/primary/radiobutton_unchecked.svg"); +} + +QRadioButton::indicator:checked:disabled { + image: url("/icons_path/disabled/radiobutton_checked.svg"); +} + +QRadioButton::indicator:unchecked:disabled { + image: url("/icons_path/disabled/radiobutton_unchecked.svg"); +} + +/* ------------------------------------------------------------------------ */ +/* QDockWidget */ + +QDockWidget { + color: #ffffff; + text-transform: capitalize; + border: 2px solid #232629; + titlebar-close-icon: url("/icons_path/primary/close.svg"); + titlebar-normal-icon: url("/icons_path/primary/float.svg"); + border-radius: 4px; +} + +QDockWidget::title { + text-align: left; + padding-left: 36px; + padding: 3px; + margin-top: 4px; +} + +/* ------------------------------------------------------------------------ */ +/* QMenu */ + +QMenu { + background-color: #1b2023; + margin: 10px; +} + +QMenu::item { + height: 14px; + margin: 4px; + padding: 0px; + color: #ffffff; +} + +QMenu::item:selected { + background-color: #303538; + margin-top: 0px; + margin-bottom: 0px; +} + +QMenu::item:disabled { + color: rgba(255, 255, 255, 0.3); +} + +QMenu::separator { + height: 1px; + margin: 2px; + background-color:#40484C; +} + +QMenu::right-arrow { + image: url("/icons_path/primary/rightarrow.svg"); + width: 16px; + height: 16px; +} + +QMenu::right-arrow:selected { + image: url("/icons_path/disabled/rightarrow.svg"); +} + +/* QMenu Checkboxes */ + +QMenu::indicator:non-exclusive:unchecked { + image: url("/icons_path/primary/checkbox_unchecked_enabled.svg"); +} + +QMenu::indicator:non-exclusive:unchecked:selected { + image: url("/icons_path/primary/checkbox_unchecked_hovered.svg"); +} + +QMenu::indicator:non-exclusive:checked { + image: url("/icons_path/primary/checkbox_checked_enabled.svg"); +} + +QMenu::indicator:non-exclusive:checked:selected { + image: url("/icons_path/primary/checkbox_checked_hovered.svg"); +} + +/* QMenu Radiobuttons */ + +QMenu::indicator:exclusive:unchecked { + image: url("/icons_path/primary/radiobutton_unchecked.svg"); +} + +QMenu::indicator:exclusive:unchecked:selected { + image: url("/icons_path/primary/radiobutton_unchecked_invert.svg"); +} + +QMenu::indicator:exclusive:checked { + image: url("/icons_path/primary/radiobutton_checked.svg"); +} + +QMenu::indicator:exclusive:checked:selected { + image: url("/icons_path/primary/radiobutton_checked_invert.svg"); +} + +/* ------------------------------------------------------------------------ */ +/* QMenuBar */ + +QMenuBar { + background-color: #0f1417; + color: #ffffff; + border-bottom: 2px solid rgba(255, 255, 255, 0); +} + +QMenuBar::item { + /* height: 32px; */ + padding: 4px; + background-color: transparent; + color: #ffffff; +} + +QMenuBar::item:selected, +QMenuBar::item:pressed { + color: #ffffff; + background-color: #303538; +} + +/* ------------------------------------------------------------------------ */ +/* QToolBox */ + +QToolBox::tab { + background-color: #0f1417; + color: #ffffff; + text-transform: capitalize; + border-radius: 4px; + padding-left: 15px; +} + +QToolBox::tab:selected, +QToolBox::tab:hover { + background-color: #84c2e6; +} + +/* ------------------------------------------------------------------------ */ +/* QProgressBar */ + +QProgressBar { + border-radius: 0; + background-color: #0f1417; + text-align: center; + color: transparent; +} + +QProgressBar::chunk { + background-color: #84c2e6; +} + +/* ------------------------------------------------------------------------ */ +/* QScrollBar */ + +QScrollBar { + border: 0; + background: rgba(255, 255, 255, 0.15); + border-radius: 5px; +} + +QScrollBar:horizontal { + height: 10px; +} + +QScrollBar:vertical { + width: 10px; +} + +QScrollBar::handle { + background: #8bd0f0; + border-radius: 5px; +} + +QScrollBar::handle:horizontal { + min-width: 24px; +} + +QScrollBar::handle:vertical { + min-height: 24px; +} + +QScrollBar::handle:hover { + background-color: #84c2e6; +} + +QScrollBar::handle:pressed { + background-color: #699bb8; +} + +QScrollBar::add-line:vertical, +QScrollBar::sub-line:vertical, +QScrollBar::add-line:horizontal, +QScrollBar::sub-line:horizontal { + border: 0; + background: transparent; + width: 0px; + height: 0px; +} + +QScrollBar::sub-page:horizontal, +QScrollBar::add-page:horizontal, +QScrollBar::sub-page:vertical, +QScrollBar::add-page:vertical { + background: transparent; +} + +/* ------------------------------------------------------------------------ */ +/* QScrollBar-Big */ + +QScrollBar.big:horizontal { + border: 0; + background: #232629; + height: 36px; +} + +QScrollBar.big:vertical { + border: 0; + background: #232629; + width: 36px; +} + +QScrollBar.big::handle, +QScrollBar.big::handle:vertical:hover, +QScrollBar.big::handle:horizontal:hover { + background: #84c2e6; +} + +QScrollBar.big::handle:horizontal { + min-width: 24px; +} + +QScrollBar.big::handle:vertical { + min-height: 24px; +} + +QScrollBar.big::add-line:vertical, +QScrollBar.big::sub-line:vertical, +QScrollBar.big::add-line:horizontal, +QScrollBar.big::sub-line:horizontal { + border: 0; + background: transparent; + width: 0px; + height: 0px; +} + +/* ------------------------------------------------------------------------ */ +/* QSlider */ +QSlider { + min-height: 20px; + min-width: 20px; +} + +QSlider:horizontal { + min-height: 30px; + min-width: 30px; +} + +QSlider:vertical { +} + +QSlider::groove:horizontal { + border: 1px solid #262626; + height: 4px; + background: #0f1417; + margin: 0; +} + +QSlider::groove:vertical { + width: 4px; + background: #0f1417; + margin: 12px 0; +} + +QSlider::handle:horizontal { + width: 22px; + height: 18px; + margin: -9px -9px; +} + +QSlider::handle:vertical { + background: #84c2e6; + width: 9px; + height: 9px; + min-height: 0px; + margin: -9px -18px; +} + +QSlider::add-page { + background: #5e5e5e; +} + +QSlider::sub-page { + background: #84c2e6; +} + +/* ------------------------------------------------------------------------ */ +/* QLabel */ + +QLabel { + border: none; + background: transparent; + color: #ffffff; +} + +QLabel:disabled { + color: rgba(255, 255, 255, 0.2); +} + +/* ------------------------------------------------------------------------ */ +/* VLines and HLinex */ + +QFrame[frameShape="4"] { + border-width: 1px 0 0 0; + background: none; +} + +QFrame[frameShape="5"] { + border-width: 0 1px 0 0; + background: none; +} + +QFrame[frameShape="4"], +QFrame[frameShape="5"] { + border-color: #0f1417; +} + +/* ------------------------------------------------------------------------ */ +/* QToolBar */ + +QToolBar { + background: #0f1417; + border: 0px solid; +} + +QToolBar:horizontal { + /* border-bottom: 1px solid rgba(132, 194, 230, 0.7); */ + border-top: 1px solid rgba(132, 194, 230, 0.7); +} + +QToolBar:vertical { + border-right: 1px solid rgba(132, 194, 230, 0.7); + border-left: 1px solid rgba(132, 194, 230, 0.7); +} + +QToolBar::handle:horizontal { + image: url("/icons_path/primary/toolbar-handle-horizontal.svg"); +} + +QToolBar::handle:vertical { + image: url("/icons_path/primary/toolbar-handle-vertical.svg"); +} + +QToolBar::separator:horizontal { + border-top: 1px solid rgba(132, 194, 230, 0.7); + border-bottom: 1px solid rgba(132, 194, 230, 0.7); + width: 1px; +} + +QToolBar::separator:vertical { + border-top: 1px solid rgba(132, 194, 230, 0.7); + border-bottom: 1px solid rgba(132, 194, 230, 0.7); + height: 1px; +} + +/* ------------------------------------------------------------------------ */ +/* QToolButton */ + +QToolButton { + background: #171c1f; + border: 0px; + margin: 2px; + padding: 2px; + border-radius: 15px; + color: #8bd0f0; +} + +QToolButton:hover { + background: #262931; +} + +QToolButton:pressed { + background: #2d303a; +} + +QToolButton:checked { + background: #2d303a; + border: 1px solid #8bd0f0; +} + +/* ------------------------------------------------------------------------ */ +/* General viewers */ + +QTableView { + background-color: #0f1417; + border: 1px solid #232629; + border-radius: 4px; +} + +QTreeView, +QListView { + margin: 0px; + border: 0px; +} + +QTableView::item, +QTreeView::item, +QListView::item { + padding: 2px; + min-height: 12px; + color: #ffffff; + border-color: transparent; +} + +QListView::item { + margin-left: 0px; + margin-right: 2px; + background-color: #1b2023; +} + +/* ------------------------------------------------------------------------ */ +/* Items Selection */ + +QTableView::item:selected, +QTreeView::item:selected, +QListView::item:selected { + background-color: #303538; + color: #ffffff; +} + +QTableView::item:selected:focus, +QTreeView::item:selected:focus, +QListView::item:selected:focus { + color: #ffffff; +} + +QTableView::item:disabled { + color: #bdbdbd; + background-color: #303538; +} + +/* ------------------------------------------------------------------------ */ +/* QTreeView */ + +QTreeView::branch { + background-color: transparent; +} + +QTreeView::branch:hover { + background-color: transparent; +} + +QTreeView::branch:selected { + background-color: #303538; +} + +QTreeView::branch:closed:has-children:has-siblings, +QTreeView::branch:closed:has-children:!has-siblings { + image: url("/icons_path/primary/branch-closed.svg"); + margin-left: -8px; +} + +QTreeView::branch:open:has-children:!has-siblings, +QTreeView::branch:open:has-children:has-siblings { + image: url("/icons_path/primary/branch-open.svg"); + margin-left: -8px; +} + +/* Commented in case decided to show the branch icons */ +/* +QTreeView::branch:has-siblings:!adjoins-item { + border-image: url("/icons_path/disabled/vline.svg"); +} + +QTreeView::branch:has-siblings:adjoins-item { + border-image: url("/icons_path/disabled/branch-more.svg"); +} + +QTreeView::branch:!has-children:!has-siblings:adjoins-item, +QTreeView::branch:has-children:!has-siblings:adjoins-item { + border-image: url("/icons_path/disabled/branch-end.svg"); +} */ + +QTreeView QHeaderView::section { + border: none; +} + +/* QTableView */ + +QTableCornerButton::section { + background-color: #0f1417; + border-radius: 0px; + border-right: 1px solid; + border-bottom: 1px solid; + border-color: #31363b; +} + +QHeaderView { + border: none; +} + +QHeaderView::section { + color: rgba(255, 255, 255, 0.7); + text-transform: capitalize; + background-color: #0f1417; + padding: 4px 6px; + border-radius: 0px; + border-right: 1px solid; + border-bottom: 1px solid; + border-color: #31363b; +} + +QHeaderView::section:vertical { +} + +QHeaderView::section:horizontal { +} + +/* ------------------------------------------------------------------------ */ +/* QLCDNumber */ + +QLCDNumber { + color: #84c2e6; + background-color: #699bb8; + border: 1px solid rgba(132, 194, 230, 0.3); + border-radius: 4px; +} + +/* ------------------------------------------------------------------------ */ +/* QCalendarWidget */ + +QCalendarWidget { + min-height: 300px; +} + +#qt_calendar_prevmonth { + qproperty-icon: url("/icons_path/primary/leftarrow.svg"); +} + +#qt_calendar_nextmonth { + qproperty-icon: url("/icons_path/primary/rightarrow.svg"); +} + +/* ------------------------------------------------------------------------ */ +/* Inline QLineEdit */ + +QTreeView QLineEdit, +QTableView QLineEdit, +QListView QLineEdit { + color: #ffffff; + background-color: #0f1417; + /* border: 1px solid unset; */ + border-radius: unset; + padding: unset; + padding-left: unset; + height: unset; + border-width: unset; + border-top-left-radius: unset; + border-top-right-radius: unset; +} + +/* ------------------------------------------------------------------------ */ +/* QToolTip */ + +QToolTip { + padding: 4px; + border: 1px solid #31363b; + border-radius: 4px; + color: #ffffff; + background-color: #0f1417; +} + +/* ------------------------------------------------------------------------ */ +/* QDialog */ + +/* linux */ +QDialog QToolButton, +QDialog QToolButton:hover, +QDialog QToolButton:pressed, +QDialog QToolButton:checked { + border: 0px; + height: unset; + margin: unset; + padding: unset; + border-right: unset; + border-left: unset; + background-color: #84c2e6; + color: #ffffff; + border-radius: 8px; +} + +QDialog QToolButton:disabled { + background-color: #0f1417; + color: #ffffff; +} + +/* ------------------------------------------------------------------------ */ +/* Grips */ + +QMainWindow::separator:vertical, +QSplitter::handle:horizontal { + image: url("/icons_path/primary/splitter-vertical.svg"); + background-color: rgba(255, 255, 255, 0.03); + width: 15px; +} + +QMainWindow::separator:horizontal, +QSplitter::handle:vertical { + image: url("/icons_path/primary/splitter-horizontal.svg"); + background-color: rgba(255, 255, 255, 0.03); + height: 15px; +} + +QSizeGrip { + image: url("/icons_path/primary/sizegrip.svg"); + background-color: transparent; +} + +QMenuBar QToolButton:hover, +QMenuBar QToolButton:pressed, +QMenuBar QToolButton { + border-width: 0; + border-image: url("/icons_path/primary/rightarrow.svg"); + background-color: transparent; +} + +/* ------------------------------------------------------------------------ */ +/* Focus */ + +QDateTimeEdit:focus, +QSpinBox:focus, +QDoubleSpinBox:focus, +QComboBox:focus { + color: #fff; + border-bottom: 2px solid #8bd0f0; + background-color: #303538; +} + + +QDateTimeEdit::up-button:focus, +QDoubleSpinBox::up-button:focus, +QSpinBox::up-button:focus { + image: url("/icons_path/primary/uparrow.svg"); +} + +QDateTimeEdit::down-button:focus, +QDoubleSpinBox::down-button:focus, +QSpinBox::down-button:focus { + image: url("/icons_path/primary/downarrow.svg"); +} + +/* Special cases from rviz source code */ + +QToolButton[toolTip="Add a new tool"] { + qproperty-iconSize: 16px 16px; + qproperty-icon: url("/icons_path/primary/add.svg"); + background: #171c1f; + border: 0px; + margin: 2px; + padding: 0px; + border-radius: 12px; + width: 24px; + height: 24px; +} + +QToolButton[toolTip="Add a new tool"]:hover { + background: #262931; +} + +QToolButton[toolTip="Add a new tool"]:pressed { + background: #2d303a; +} + +QToolButton[toolTip="Remove a tool from the toolbar"] { + qproperty-iconSize: 16px 16px; + qproperty-icon: url("/icons_path/primary/minus.svg"); + background: #171c1f; + border: 0px; + margin: 2px; + padding: 0px; + border-radius: 12px; + width: 24px; + height: 24px; +} + +QToolButton[toolTip="Remove a tool from the toolbar"]:hover { + background: #262931; +} + +QToolButton[toolTip="Remove a tool from the toolbar"]:pressed { + background: #2d303a; +} + +QDialog { + background-color: #1b2023; +} + +QGroupBox[title="Tool Type"] > QTextBrowser { + background-color: #1b2023; +} + +QGroupBox[title="Tool Type"] { + background-color: #1b2023; +} +QGroupBox[title="Tool Type"] > QTreeView { + background-color: #1b2023; +} + +QGroupBox[title="Panel Name"] { + background-color: #1b2023; +} + +QGroupBox[title="Panel Name"] > QLineEdit { + background-color: #1b2023; +} + +QGroupBox[title="Panel Type"] > QTextBrowser { + background-color: #1b2023; +} + +QGroupBox[title="Panel Type"] { + background-color: #1b2023; +} +QGroupBox[title="Panel Type"] > QTreeView { + background-color: #1b2023; +} + +QGroupBox[title="Create visualization"] { + background-color: #1b2023; +} + +QGroupBox[title="Create visualization"] > QTextBrowser { + background-color: #1b2023; +} +QGroupBox[title="Display Name"] { + background-color: #1b2023; +} + +QGroupBox[title="Display Name"] > QLineEdit { + background-color: #1b2023; +} + +QGroupBox[title="Create visualization"] > QTabWidget { + background-color: #1b2023; +} + +QGroupBox[title="Create visualization"] QTabWidget QTreeWidget { + background-color: #1b2023; + color: white; +} +QGroupBox[title="Create visualization"] QCheckBox { + background-color: #1b2023; + color: white; +} + +QGroupBox[title="Create visualization"] QTabWidget::pane { + background-color: #1b2023; +} + +QGroupBox[title="Create visualization"] QTabBar::tab { + background-color: #1b2023; + color: white; +} + +QGroupBox[title="Create visualization"] QTabBar::tab:selected { + background-color: #383b3f; + border-bottom: 2px solid #8bd0f0; +} + +QGroupBox[title="Create visualization"] QTabBar::tab:!selected { + background-color: #1b2023; + border-bottom: 2px solid #1b2023; +} + +QGroupBox[title="Create visualization"] QTabBar::tab:hover { + color: #fff; + background-color: #292d30; + border-bottom: 2px solid #8bd0f0; +} + +QGroupBox[title="Create visualization"] QTabBar::tab:pressed { + color: #fff; + background-color: #383b3f; + border-bottom: 2px solid #8bd0f0; +} + +QGroupBox[title="Create visualization"] QFrame { + background-color: #1b2023; + border: none; + margin: 0px; + padding: 0px; +} + +QComboBox { + padding: 2px; + margin: 0px; +} + +/* QLineEdit */ +QLineEdit { + border-top-left-radius: 0px; + border-top-right-radius: 0px; + selection-background-color: #84c2e6; + +} + +QLineEdit > QPushButton { + qproperty-icon: url("/icons_path/primary/more.svg"); + qproperty-iconSize: 16px 16px; + qproperty-text: ""; + margin: 0px; + padding: 0px; + background: transparent; + border-radius: 0px; +} + +QLineEdit > QPushButton:hover { + background: transparent; + border-radius: 0px; +} + +/* Not entirely sure if this affects anything other than the close button */ +QDockWidget QToolButton { + qproperty-icon: url("/icons_path/primary/close.svg"); + qproperty-iconSize: 16px 16px; + background: transparent; +} + +QDockWidget QToolButton:hover { + background: #262931; +} + +/* Style the list view of the QComboBox */ +QComboBox QAbstractItemView { + background-color: #1b2023; + height: 16px; +} +QComboBox { + selection-background-color: #84c2e6; + selection-color: #1b2023; +} + + +QGroupBox[title="Create visualization"] QCheckBox::indicator:enabled:checked, +QGroupBox[title="Create visualization"] QCheckBox::indicator:enabled:checked:selected, +QGroupBox[title="Create visualization"] QCheckBox::indicator:enabled:checked:focus, +QGroupBox[title="Create visualization"] QCheckBox::indicator:checked, +QTreeView::indicator:enabled:checked, +QTreeView::indicator:enabled:checked:selected, +QTreeView::indicator:enabled:checked:focus, +QTreeView::indicator:checked { + image: url("/icons_path/primary/checkbox_checked_enabled.svg"); +} + +QGroupBox[title="Create visualization"] QCheckBox::indicator:checked:selected:active, +QTreeView::indicator:checked:selected:active { + image: url("/icons_path/primary/checkbox_checked_hovered.svg"); +} + +QGroupBox[title="Create visualization"] QCheckBox::indicator:disabled:checked, +QGroupBox[title="Create visualization"] QCheckBox::indicator:disabled:checked:selected, +QGroupBox[title="Create visualization"] QCheckBox::indicator:disabled:checked:focus, +QGroupBox[title="Create visualization"] QCheckBox::indicator:checked:disabled, +QTreeView::indicator:disabled:checked, +QTreeView::indicator:disabled:checked:selected, +QTreeView::indicator:disabled:checked:focus, +QTreeView::indicator:checked:disabled { + image: url("/icons_path/primary/checkbox_checked_disabled.svg"); +} + +QGroupBox[title="Create visualization"] QCheckBox::indicator:enabled:unchecked, +QGroupBox[title="Create visualization"] QCheckBox::indicator:enabled:unchecked:selected, +QGroupBox[title="Create visualization"] QCheckBox::indicator:enabled:unchecked:focus, +QGroupBox[title="Create visualization"] QCheckBox::indicator:unchecked, +QTreeView::indicator:enabled:unchecked, +QTreeView::indicator:enabled:unchecked:selected, +QTreeView::indicator:enabled:unchecked:focus, +QTreeView::indicator:unchecked { + image: url("/icons_path/primary/checkbox_unchecked_enabled.svg"); +} + +QGroupBox[title="Create visualization"] QCheckBox::indicator:unchecked:selected:active, +QTreeView::indicator:unchecked:selected:active { + image: url("/icons_path/primary/checkbox_unchecked_hovered.svg"); +} + +QGroupBox[title="Create visualization"] QCheckBox::indicator:disabled:unchecked, +QGroupBox[title="Create visualization"] QCheckBox::indicator:disabled:unchecked:selected, +QGroupBox[title="Create visualization"] QCheckBox::indicator:disabled:unchecked:focus, +QGroupBox[title="Create visualization"] QCheckBox::indicator:unchecked:disabled, +QTreeView::indicator:disabled:unchecked, +QTreeView::indicator:disabled:unchecked:selected, +QTreeView::indicator:disabled:unchecked:focus, +QTreeView::indicator:unchecked:disabled { + image: url("/icons_path/primary/checkbox_unchecked_disabled.svg"); +} + +QGroupBox[title="Create visualization"] QCheckBox::indicator:enabled:indeterminate, +QGroupBox[title="Create visualization"] QCheckBox::indicator:enabled:indeterminate:selected, +QGroupBox[title="Create visualization"] QCheckBox::indicator:enabled:indeterminate:focus, +QGroupBox[title="Create visualization"] QCheckBox::indicator:indeterminate, +QTreeView::indicator:enabled:indeterminate, +QTreeView::indicator:enabled:indeterminate:selected, +QTreeView::indicator:enabled:indeterminate:focus, +QTreeView::indicator:indeterminate { + image: url("/icons_path/primary/checkbox_indeterminate_enabled.svg"); +} + +QGroupBox[title="Create visualization"] QCheckBox::indicator:indeterminate:selected:active, +QTreeView::indicator:indeterminate:selected:active { + image: url("/icons_path/primary/checkbox_indeterminate_hovered.svg"); +} + +QGroupBox[title="Create visualization"] QCheckBox::indicator:disabled:indeterminate, +QGroupBox[title="Create visualization"] QCheckBox::indicator:disabled:indeterminate:selected, +QGroupBox[title="Create visualization"] QCheckBox::indicator:disabled:indeterminate:focus, +QGroupBox[title="Create visualization"] QCheckBox::indicator:indeterminate:disabled, +QTreeView::indicator:disabled:indeterminate, +QTreeView::indicator:disabled:indeterminate:selected, +QTreeView::indicator:disabled:indeterminate:focus, +QTreeView::indicator:indeterminate:disabled { + image: url("/icons_path/primary/checkbox_indeterminate_disabled.svg"); +} +QGroupBox[title="Create visualization"] QCheckBox::indicator, +QTreeView::indicator { + width: 20px; + height: 20px; +} + + +QTreeView::item:disabled { + color: #888888; +} + + +QTreeView QComboBox, +QTreeView QSpinBox, +QTreeView QDoubleSpinBox { + border: 0px; +} + +QTreeView QComboBox:focus, +QTreeView QSpinBox:focus, +QTreeView QDoubleSpinBox:focus { + border: 0px; +} diff --git a/ansible/roles/qt5ct_setup/files/qt5ct.conf b/ansible/roles/qt5ct_setup/files/qt5ct.conf new file mode 100644 index 00000000000..90c386c617f --- /dev/null +++ b/ansible/roles/qt5ct_setup/files/qt5ct.conf @@ -0,0 +1,35 @@ +[Appearance] +color_scheme_path=/usr/share/qt5ct/colors/darker.conf +custom_palette=true +icon_theme=ubuntu-mono-dark +standard_dialogs=default +style=Fusion + +[Fonts] +fixed=@Variant(\0\0\0@\0\0\0\f\0R\0o\0\x62\0o\0t\0o\xbf\xf0\0\0\0\0\0\0\0\0\0\r\x5\x1\0\x32\x10) +general=@Variant(\0\0\0@\0\0\0\f\0R\0o\0\x62\0o\0t\0o\xbf\xf0\0\0\0\0\0\0\0\0\0\r\x5\x1\0\x32\x10) + +[Interface] +activate_item_on_single_click=1 +buttonbox_layout=3 +cursor_flash_time=1000 +dialog_buttons_have_icons=1 +double_click_interval=400 +gui_effects=@Invalid() +keyboard_scheme=2 +menus_have_icons=true +show_shortcuts_in_context_menus=true +stylesheets=autoware_stylesheet_path +toolbutton_style=0 +underline_shortcut=1 +wheel_scroll_lines=3 + +[QSSEditor] +geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\t\xde\0\0\x2~\0\0\f`\0\0\x4\x95\0\0\t\xde\0\0\x2\xa3\0\0\f`\0\0\x4\x95\0\0\0\0\0\0\0\0\n\0\0\0\t\xde\0\0\x2\xa3\0\0\f`\0\0\x4\x95) + +[SettingsWindow] +geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\f\x9c\0\0\x4\x19\0\0\xfz\0\0\a\x3\0\0\f\x9c\0\0\x4>\0\0\xfz\0\0\a\x3\0\0\0\0\0\0\0\0\xf\0\0\0\f\x9c\0\0\x4>\0\0\xfz\0\0\a\x3) + +[Troubleshooting] +force_raster_widgets=2 +ignored_applications=@Invalid() diff --git a/ansible/roles/qt5ct_setup/meta/main.yml b/ansible/roles/qt5ct_setup/meta/main.yml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/ansible/roles/qt5ct_setup/tasks/main.yml b/ansible/roles/qt5ct_setup/tasks/main.yml new file mode 100644 index 00000000000..fbb6c912117 --- /dev/null +++ b/ansible/roles/qt5ct_setup/tasks/main.yml @@ -0,0 +1,81 @@ +- name: Install qt5ct + ansible.builtin.apt: + name: qt5ct + state: present + become: true + +- name: Install rsync + ansible.builtin.package: + name: rsync + state: present + become: true + +- name: Remove qt5ct from auto-start + ansible.builtin.file: + path: /etc/X11/Xsession.d/99qt5ct + state: absent + become: true + +- name: Set variable qt5ct_config_dir + ansible.builtin.set_fact: + qt5ct_config_dir: "{{ ansible_env.HOME }}/.config/qt5ct" + +- name: Ensure qt5ct_config_dir exists + ansible.builtin.file: + path: "{{ qt5ct_config_dir }}" + state: directory + mode: "0755" + +- name: Print the role_path + ansible.builtin.debug: + msg: "The role_path is: {{ role_path }}" + +- name: Set icons_path variable + ansible.builtin.set_fact: + icons_path: "{{ qt5ct_config_dir }}/autoware-rviz-icons" + +- name: Remove autoware-rviz-icons folder if it exists + ansible.builtin.file: + path: "{{ icons_path }}" + state: absent + +# Replace rsync with synchronize which is an ansible wrapper for rsync +- name: Copy autoware-rviz-icons to the qt5ct config directory + ansible.posix.synchronize: + src: "{{ role_path }}/files/autoware-rviz-icons/" + dest: "{{ icons_path }}/" + mode: push + +- name: Fix the paths in the qss file + ansible.builtin.replace: + path: "{{ role_path }}/files/autoware.qss" + regexp: /icons_path/ + replace: "{{ icons_path }}/" + +- name: Ensure qt5ct_config_dir/qss exists + ansible.builtin.file: + path: "{{ qt5ct_config_dir }}/qss" + state: directory + mode: "0755" + +- name: Copy autoware.qss to the qt5ct qss directory + ansible.builtin.copy: + src: "{{ role_path }}/files/autoware.qss" + dest: "{{ qt5ct_config_dir }}/qss/autoware.qss" + force: true + backup: true + mode: "0644" + +- name: Fix the paths in the config file + ansible.builtin.replace: + path: "{{ role_path }}/files/qt5ct.conf" + regexp: autoware_stylesheet_path + replace: "{{ qt5ct_config_dir }}/qss/autoware.qss" + +- name: Copy qt5ct.conf to the config directory + ansible.builtin.copy: + src: "{{ role_path }}/files/qt5ct.conf" + dest: "{{ ansible_env.HOME }}/.config/qt5ct/qt5ct.conf" + force: true + backup: true + mode: "0644" diff --git a/ansible/roles/telegraf/README.md b/ansible/roles/telegraf/README.md new file mode 100644 index 00000000000..5355384e72a --- /dev/null +++ b/ansible/roles/telegraf/README.md @@ -0,0 +1,27 @@ +# telegraf + +This role install [InfluxDB v2](https://docs.influxdata.com/influxdb/v2/get-started/) and [Telegraf](https://docs.influxdata.com/telegraf/v1/) to collect system metrics. + +After installing telegraf and influxdb2, we need to manually make an API token and copy it to the `/etc/telegraf/telegraf.conf`. + +## Create Organization + +When accessing the InfluxDB UI for the first time, you need to create an organization and a backet. Enter as follows. + +![](./files/create-org.png) + +## Generate API token + +Next, move to the `Load Data` tab, click the `GENERATE API TOKEN button`, and generate the API token. + + + +![](./files/load-data.png) + +![](./files/generate-api-token.png) + +## Copy API token and restart Telegraf + +Paste the obtained API token into the empty string part of `token = ""` in `/etc/telegraf/telegraf.conf`. + + diff --git a/ansible/roles/telegraf/defaults/main.yaml b/ansible/roles/telegraf/defaults/main.yaml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/ansible/roles/telegraf/files/create-org.png b/ansible/roles/telegraf/files/create-org.png new file mode 100644 index 00000000000..a286a54883c Binary files /dev/null and b/ansible/roles/telegraf/files/create-org.png differ diff --git a/ansible/roles/telegraf/files/generate-api-token.png b/ansible/roles/telegraf/files/generate-api-token.png new file mode 100644 index 00000000000..4b2bb26596d Binary files /dev/null and b/ansible/roles/telegraf/files/generate-api-token.png differ diff --git a/ansible/roles/telegraf/files/get_telegraf_proccpu_json.sh b/ansible/roles/telegraf/files/get_telegraf_proccpu_json.sh new file mode 100755 index 00000000000..bd70eef20c7 --- /dev/null +++ b/ansible/roles/telegraf/files/get_telegraf_proccpu_json.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +SAMPLING_SEC=5 + +echo "{" +pidstat -u -h -l "${SAMPLING_SEC}" 1 | + tail -n +4 | + awk '{ cpu=$8; $1=$2=$3=$4=$5=$6=$7=$8=$9=""; print cpu,$0 }' | + sort -n | + while read -r cpu cmd; do + if [[ ${cpu%%.*} -le 0 ]]; then + continue + fi + cmd="${cmd// /_}" + cmd="${cmd//=/_}" + cmd="${cmd:0:50}" + echo "\"${cmd}\":${cpu}," + done +echo '"z":0' +echo "}" diff --git a/ansible/roles/telegraf/files/get_telegraf_procmem_json.sh b/ansible/roles/telegraf/files/get_telegraf_procmem_json.sh new file mode 100755 index 00000000000..dd513aa3781 --- /dev/null +++ b/ansible/roles/telegraf/files/get_telegraf_procmem_json.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +echo "{" +ps -ax --format "rss command" | + while read -r rss cmd; do + if [[ $rss -lt 30000 ]]; then + continue + fi + cmd="${cmd// /_}" + cmd="${cmd//=/_}" + cmd="${cmd:0:50}" + echo "\"${cmd}\":${rss}," + done +echo '"z":0' +echo "}" diff --git a/ansible/roles/telegraf/files/load-data.png b/ansible/roles/telegraf/files/load-data.png new file mode 100644 index 00000000000..7094a0378ce Binary files /dev/null and b/ansible/roles/telegraf/files/load-data.png differ diff --git a/ansible/roles/telegraf/files/telegraf.conf b/ansible/roles/telegraf/files/telegraf.conf new file mode 100644 index 00000000000..9593f3f10c1 --- /dev/null +++ b/ansible/roles/telegraf/files/telegraf.conf @@ -0,0 +1,60 @@ +[global_tags] + +[agent] + interval = "10s" + round_interval = true + metric_batch_size = 1000 + metric_buffer_limit = 10000 + collection_jitter = "0s" + flush_interval = "10s" + flush_jitter = "0s" + precision = "0s" + hostname = "" + omit_hostname = false + +[[outputs.influxdb_v2]] + urls = ["http://127.0.0.1:8086"] + # Attach the access token. See also https://docs.influxdata.com/influxdb/cloud/admin/tokens/create-token/#manage-tokens-in-the-influxdb-ui + token = "" + organization = "autowarefoundation" + bucket = "autoware" + timeout = "5s" + user_agent = "telegraf" + +[[inputs.cpu]] + percpu = true + totalcpu = true + collect_cpu_time = false + report_active = false + core_tags = false + +[[inputs.disk]] + ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"] + +[[inputs.diskio]] + +[[inputs.kernel]] + +[[inputs.mem]] + +[[inputs.processes]] + +[[inputs.swap]] + +[[inputs.system]] + +[[inputs.exec]] + commands = ["/opt/autoware/bin/get_telegraf_proccpu_json.sh"] + timeout = "10s" + data_format = "json" + name_suffix = "_proccpu" + +[[inputs.exec]] + commands = ["/opt/autoware/bin/get_telegraf_procmem_json.sh"] + timeout = "5s" + data_format = "json" + name_suffix = "_procmem" + +[[inputs.net]] + +[[inputs.nvidia_smi]] diff --git a/ansible/roles/telegraf/handlers/main.yaml b/ansible/roles/telegraf/handlers/main.yaml new file mode 100644 index 00000000000..854c7d99027 --- /dev/null +++ b/ansible/roles/telegraf/handlers/main.yaml @@ -0,0 +1,4 @@ +- name: Restart telegraf + ansible.builtin.systemd: + name: telegraf + state: restarted diff --git a/ansible/roles/telegraf/meta/main.yaml b/ansible/roles/telegraf/meta/main.yaml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/ansible/roles/telegraf/tasks/main.yaml b/ansible/roles/telegraf/tasks/main.yaml new file mode 100644 index 00000000000..e6cc9a3170e --- /dev/null +++ b/ansible/roles/telegraf/tasks/main.yaml @@ -0,0 +1,136 @@ +- name: Download influxdata-archive_compat.key + become: true + ansible.builtin.get_url: + url: https://repos.influxdata.com/influxdata-archive_compat.key + dest: /tmp/influxdata-archive_compat.key + mode: 0755 + +- name: Verify the checksum of the key file + ansible.builtin.command: sha256sum -c + args: + chdir: /tmp + stdin: 393e8779c89ac8d958f81f942f9ad7fb82a25e133faddaf92e15b16e6ac9ce4c influxdata-archive_compat.key + register: checksum_result + failed_when: checksum_result.rc != 0 + changed_when: false + +- name: Check if GPG key is already converted + ansible.builtin.stat: + path: /tmp/influxdata-archive_compat.gpg + register: gpg_key_stat + +- name: Convert the key to gpg format + ansible.builtin.command: + cmd: gpg --dearmor -o /tmp/influxdata-archive_compat.gpg /tmp/influxdata-archive_compat.key + become: true + when: not gpg_key_stat.stat.exists + changed_when: false + +- name: Check if GPG key is already moved + ansible.builtin.stat: + path: /etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg + register: moved_key_stat + +- name: Move the gpg key to trusted.gpg.d + ansible.builtin.command: + cmd: mv /tmp/influxdata-archive_compat.gpg /etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg + become: true + when: not moved_key_stat.stat.exists + changed_when: false + +- name: Add InfluxData repository + become: true + ansible.builtin.apt_repository: + repo: deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg] https://repos.influxdata.com/debian stable main + state: present + filename: influxdata.list + +- name: Update apt cache + become: true + ansible.builtin.apt: + update_cache: true + cache_valid_time: 3600 + +- name: Install InfluxDB v2 + become: true + ansible.builtin.apt: + name: influxdb2 + state: present + +- name: Install InfluxDB v2 CLI + become: true + ansible.builtin.apt: + name: influxdb2-cli + state: present + +- name: Install Telegraf + become: true + ansible.builtin.apt: + name: telegraf + state: present + +- name: Create telegraf_binary directory + ansible.builtin.file: + path: /opt/autoware/bin + state: directory + mode: 0755 + become: true + +- name: Copy get_telegraf_proccpu_json.sh to /opt/autoware/bin + become: true + ansible.builtin.copy: + src: "{{ role_path }}/files/get_telegraf_proccpu_json.sh" + dest: /opt/autoware/bin/get_telegraf_proccpu_json.sh + owner: root + group: root + mode: 0755 + +- name: Copy get_telegraf_procmem_json.sh to /opt/autoware/bin + become: true + ansible.builtin.copy: + src: "{{ role_path }}/files/get_telegraf_procmem_json.sh" + dest: /opt/autoware/bin/get_telegraf_procmem_json.sh + owner: root + group: root + mode: 0755 + +- name: Copy telegraf.conf to /opt/autoware/bin + become: true + ansible.builtin.copy: + src: "{{ role_path }}/files/telegraf.conf" + dest: /etc/telegraf/telegraf.conf + owner: root + group: root + mode: 0644 + backup: true + notify: + - Restart telegraf + +- name: Ensure telegraf is running and enabled + become: true + ansible.builtin.systemd: + name: telegraf + enabled: true + state: started + +- name: Ensure InfluxDB service is running + become: true + ansible.builtin.service: + name: influxdb + state: started + enabled: true + +- name: Check if InfluxDB is already set up + become: true + ansible.builtin.command: + cmd: influx setup --bucket-status + register: influx_setup_status + ignore_errors: true + changed_when: false + +- name: Set up influxDB v2 + become: true + ansible.builtin.command: + cmd: influx setup -f --name default --username autoware --password autoware --token autowaretoken --org autowarefoundation --bucket autoware --retention 0 + when: influx_setup_status.rc != 0 + changed_when: false diff --git a/autoware.repos b/autoware.repos index ad73ba17249..11758449255 100644 --- a/autoware.repos +++ b/autoware.repos @@ -3,7 +3,7 @@ repositories: core/autoware_msgs: type: git url: https://github.com/autowarefoundation/autoware_msgs.git - version: 1.1.0 + version: 1.2.0 core/autoware_adapi_msgs: type: git url: https://github.com/autowarefoundation/autoware_adapi_msgs.git @@ -28,7 +28,7 @@ repositories: core/autoware_lanelet2_extension: type: git url: https://github.com/autowarefoundation/autoware_lanelet2_extension.git - version: 0.5.0 + version: 0.6.1 core/autoware.core: type: git url: https://github.com/autowarefoundation/autoware.core.git @@ -46,10 +46,11 @@ repositories: type: git url: https://github.com/tier4/tier4_autoware_msgs.git version: tier4/universe + # Fix the version not to merge https://github.com/MORAI-Autonomous/MORAI-ROS2_morai_msgs/pull/9 universe/external/morai_msgs: type: git url: https://github.com/MORAI-Autonomous/MORAI-ROS2_morai_msgs.git - version: main + version: e2e75fc1603a9798773e467a679edf68b448e705 universe/external/muSSP: type: git url: https://github.com/tier4/muSSP.git @@ -99,17 +100,17 @@ repositories: sensor_component/external/nebula: type: git url: https://github.com/tier4/nebula.git - version: main + version: v0.2.1 # Fork of transport_drivers that enables reduction of copy operations sensor_component/transport_drivers: type: git url: https://github.com/autowarefoundation/transport_drivers - version: mutable-buffer-in-udp-callback + version: main # Continental compatible version of ROS 2 socket CAN sensor_component/ros2_socketcan: type: git url: https://github.com/autowarefoundation/ros2_socketcan - version: feat/continental_fd + version: main # sensor_kit sensor_kit/lexus3_sensor_kit_launch: type: git @@ -132,6 +133,10 @@ repositories: type: git url: https://github.com/jkk-research/lexus3_vehicle_launch.git version: main + vehicle/awsim_labs_vehicle_launch: + type: git + url: https://github.com/autowarefoundation/awsim_labs_vehicle_launch.git + version: main vehicle/external/pacmod_interface: type: git url: https://github.com/tier4/pacmod_interface.git diff --git a/docker/Dockerfile b/docker/Dockerfile index 55a0759c380..efde0797845 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,9 +1,10 @@ -# hadolint global ignore=DL3006,DL3008,DL3013 ARG BASE_IMAGE -FROM $BASE_IMAGE as base +# hadolint ignore=DL3006 +FROM $BASE_IMAGE AS base SHELL ["/bin/bash", "-o", "pipefail", "-c"] ARG ROS_DISTRO +ARG SETUP_ARGS # Install apt packages and add GitHub to known hosts for private repositories RUN rm -f /etc/apt/apt.conf.d/docker-clean \ @@ -24,15 +25,19 @@ WORKDIR /autoware # Set up base environment RUN --mount=type=ssh \ --mount=type=cache,target=/var/cache/apt,sharing=locked \ - ./setup-dev-env.sh -y --module base --runtime openadkit \ + ./setup-dev-env.sh -y --module base ${SETUP_ARGS} --no-cuda-drivers --runtime openadkit \ && pip uninstall -y ansible ansible-core \ && apt-get autoremove -y && rm -rf "$HOME"/.cache \ && echo "source /opt/ros/${ROS_DISTRO}/setup.bash" > /etc/bash.bashrc # Create entrypoint +COPY docker/etc/ros_entrypoint.sh /ros_entrypoint.sh +RUN chmod +x /ros_entrypoint.sh +ENTRYPOINT ["/ros_entrypoint.sh"] CMD ["/bin/bash"] -FROM $BASE_IMAGE as rosdep-depend +# hadolint ignore=DL3006 +FROM $BASE_IMAGE AS rosdep-depend SHELL ["/bin/bash", "-o", "pipefail", "-c"] ARG ROS_DISTRO @@ -57,6 +62,112 @@ RUN rosdep update && rosdep keys --ignore-src --from-paths src \ | sort \ > /rosdep-core-depend-packages.txt \ && cat /rosdep-core-depend-packages.txt + +COPY src/universe/external /autoware/src/universe/external +COPY src/universe/autoware.universe/common /autoware/src/universe/autoware.universe/common +RUN rosdep keys --ignore-src --from-paths src \ + | xargs rosdep resolve --rosdistro ${ROS_DISTRO} \ + | grep -v '^#' \ + | sed 's/ \+/\n/g'\ + | sort \ + > /rosdep-universe-common-depend-packages.txt \ + && cat /rosdep-universe-common-depend-packages.txt + +FROM rosdep-depend AS rosdep-universe-sensing-perception-depend +SHELL ["/bin/bash", "-o", "pipefail", "-c"] +ARG ROS_DISTRO + +COPY src/universe/autoware.universe/perception /autoware/src/universe/autoware.universe/perception +COPY src/universe/autoware.universe/sensing /autoware/src/universe/autoware.universe/sensing +RUN rosdep keys --ignore-src --from-paths src \ + | xargs rosdep resolve --rosdistro ${ROS_DISTRO} \ + | grep -v '^#' \ + | sed 's/ \+/\n/g'\ + | sort \ + > /rosdep-universe-sensing-perception-depend-packages.txt \ + && cat /rosdep-universe-sensing-perception-depend-packages.txt +RUN rosdep keys --dependency-types=exec --ignore-src --from-paths src \ + | xargs rosdep resolve --rosdistro ${ROS_DISTRO} \ + | grep -v '^#' \ + | sed 's/ \+/\n/g'\ + | sort \ + > /rosdep-universe-sensing-perception-exec-depend-packages.txt \ + && cat /rosdep-universe-sensing-perception-exec-depend-packages.txt + +FROM rosdep-depend AS rosdep-universe-localization-mapping-depend +SHELL ["/bin/bash", "-o", "pipefail", "-c"] +ARG ROS_DISTRO + +COPY src/universe/autoware.universe/localization /autoware/src/universe/autoware.universe/localization +COPY src/universe/autoware.universe/map /autoware/src/universe/autoware.universe/map +RUN rosdep keys --ignore-src --from-paths src \ + | xargs rosdep resolve --rosdistro ${ROS_DISTRO} \ + | grep -v '^#' \ + | sed 's/ \+/\n/g'\ + | sort \ + > /rosdep-universe-localization-mapping-depend-packages.txt \ + && cat /rosdep-universe-localization-mapping-depend-packages.txt +RUN rosdep keys --dependency-types=exec --ignore-src --from-paths src \ + | xargs rosdep resolve --rosdistro ${ROS_DISTRO} \ + | grep -v '^#' \ + | sed 's/ \+/\n/g'\ + | sort \ + > /rosdep-universe-localization-mapping-exec-depend-packages.txt \ + && cat /rosdep-universe-localization-mapping-exec-depend-packages.txt + +FROM rosdep-depend AS rosdep-universe-planning-control-depend +SHELL ["/bin/bash", "-o", "pipefail", "-c"] +ARG ROS_DISTRO + +COPY src/universe/autoware.universe/control /autoware/src/universe/autoware.universe/control +COPY src/universe/autoware.universe/planning /autoware/src/universe/autoware.universe/planning +# TODO(youtalk): Remove COPYs when https://github.com/autowarefoundation/autoware.universe/issues/8805 is resolved +COPY src/universe/autoware.universe/map/map_loader /autoware/src/universe/autoware.universe/map/map_loader +COPY src/universe/autoware.universe/map/autoware_map_projection_loader /autoware/src/universe/autoware.universe/map/autoware_map_projection_loader +COPY src/universe/autoware.universe/sensing/autoware_pcl_extensions /autoware/src/universe/autoware.universe/sensing/autoware_pcl_extensions +COPY src/universe/autoware.universe/sensing/autoware_pointcloud_preprocessor /autoware/src/universe/autoware.universe/sensing/autoware_pointcloud_preprocessor +RUN rosdep keys --ignore-src --from-paths src \ + | xargs rosdep resolve --rosdistro ${ROS_DISTRO} \ + | grep -v '^#' \ + | sed 's/ \+/\n/g'\ + | sort \ + > /rosdep-universe-planning-control-depend-packages.txt \ + && cat /rosdep-universe-planning-control-depend-packages.txt +RUN rosdep keys --dependency-types=exec --ignore-src --from-paths src \ + | xargs rosdep resolve --rosdistro ${ROS_DISTRO} \ + | grep -v '^#' \ + | sed 's/ \+/\n/g'\ + | sort \ + > /rosdep-universe-planning-control-exec-depend-packages.txt \ + && cat /rosdep-universe-planning-control-exec-depend-packages.txt + +FROM rosdep-depend AS rosdep-universe-vehicle-system-depend +SHELL ["/bin/bash", "-o", "pipefail", "-c"] +ARG ROS_DISTRO + +COPY src/universe/autoware.universe/vehicle /autoware/src/universe/autoware.universe/vehicle +COPY src/universe/autoware.universe/system /autoware/src/universe/autoware.universe/system +COPY src/universe/autoware.universe/map/autoware_map_height_fitter /autoware/src/universe/autoware.universe/map/autoware_map_height_fitter +COPY src/universe/autoware.universe/localization/autoware_pose2twist /autoware/src/universe/autoware.universe/localization/autoware_pose2twist +RUN rosdep keys --ignore-src --from-paths src \ + | xargs rosdep resolve --rosdistro ${ROS_DISTRO} \ + | grep -v '^#' \ + | sed 's/ \+/\n/g'\ + | sort \ + > /rosdep-universe-vehicle-system-depend-packages.txt \ + && cat /rosdep-universe-vehicle-system-depend-packages.txt +RUN rosdep keys --dependency-types=exec --ignore-src --from-paths src \ + | xargs rosdep resolve --rosdistro ${ROS_DISTRO} \ + | grep -v '^#' \ + | sed 's/ \+/\n/g'\ + | sort \ + > /rosdep-universe-vehicle-system-exec-depend-packages.txt \ + && cat /rosdep-universe-vehicle-system-exec-depend-packages.txt + +FROM rosdep-depend AS rosdep-universe-depend +SHELL ["/bin/bash", "-o", "pipefail", "-c"] +ARG ROS_DISTRO + COPY src/launcher /autoware/src/launcher COPY src/param /autoware/src/param COPY src/sensor_component /autoware/src/sensor_component @@ -70,6 +181,7 @@ RUN rosdep keys --ignore-src --from-paths src \ | sort \ > /rosdep-universe-depend-packages.txt \ && cat /rosdep-universe-depend-packages.txt + RUN rosdep keys --dependency-types=exec --ignore-src --from-paths src \ | xargs rosdep resolve --rosdistro ${ROS_DISTRO} \ | grep -v '^#' \ @@ -78,17 +190,16 @@ RUN rosdep keys --dependency-types=exec --ignore-src --from-paths src \ > /rosdep-exec-depend-packages.txt \ && cat /rosdep-exec-depend-packages.txt -FROM base as autoware-core +FROM base AS core-devel SHELL ["/bin/bash", "-o", "pipefail", "-c"] ARG ROS_DISTRO -ARG SETUP_ARGS ENV CCACHE_DIR="/root/.ccache" -# cspell: ignore libcu libnv -# Set up development environment +# Set up development environment and tools RUN --mount=type=ssh \ --mount=type=cache,target=/var/cache/apt,sharing=locked \ - ./setup-dev-env.sh -y --module all ${SETUP_ARGS} --no-cuda-drivers openadkit \ + ./setup-dev-env.sh -y --module all openadkit \ + && ./setup-dev-env.sh -y --module dev-tools openadkit \ && pip uninstall -y ansible ansible-core \ && apt-get autoremove -y && rm -rf "$HOME"/.cache @@ -100,68 +211,373 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ && cat /tmp/rosdep-core-depend-packages.txt | xargs apt-get install -y --no-install-recommends \ && apt-get autoremove -y && rm -rf "$HOME"/.cache -RUN --mount=type=bind,from=rosdep-depend,source=/autoware/src/core,target=/autoware/src/core \ - --mount=type=cache,target=${CCACHE_DIR} \ +RUN --mount=type=cache,target=${CCACHE_DIR} \ + --mount=type=bind,from=rosdep-depend,source=/autoware/src/core,target=/autoware/src/core \ source /opt/ros/"$ROS_DISTRO"/setup.bash \ && du -sh ${CCACHE_DIR} && ccache -s \ && colcon build --cmake-args \ " -Wno-dev" \ " --no-warn-unused-cli" \ + --merge-install \ + --install-base /opt/autoware \ --mixin release compile-commands ccache \ - && du -sh ${CCACHE_DIR} && ccache -s + && du -sh ${CCACHE_DIR} && ccache -s \ + && rm -rf /autoware/build -FROM autoware-core as autoware-universe +ENTRYPOINT ["/ros_entrypoint.sh"] +CMD ["/bin/bash"] + +FROM core-devel AS universe-common-devel +SHELL ["/bin/bash", "-o", "pipefail", "-c"] +ARG ROS_DISTRO +ENV CCACHE_DIR="/root/.ccache" + +# Install rosdep dependencies +COPY --from=rosdep-depend /rosdep-universe-common-depend-packages.txt /tmp/rosdep-universe-common-depend-packages.txt +# hadolint ignore=SC2002 +RUN --mount=type=ssh \ + apt-get update \ + && cat /tmp/rosdep-universe-common-depend-packages.txt | xargs apt-get install -y --no-install-recommends \ + && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* "$HOME"/.cache + +# hadolint ignore=SC1091 +RUN --mount=type=cache,target=${CCACHE_DIR} \ + --mount=type=bind,from=rosdep-depend,source=/autoware/src/universe/autoware.universe/common,target=/autoware/src/universe/autoware.universe/common \ + --mount=type=bind,from=rosdep-depend,source=/autoware/src/universe/external,target=/autoware/src/universe/external \ + source /opt/ros/"$ROS_DISTRO"/setup.bash \ + && source /opt/autoware/setup.bash \ + && du -sh ${CCACHE_DIR} && ccache -s \ + && colcon build --cmake-args \ + " -Wno-dev" \ + " --no-warn-unused-cli" \ + --merge-install \ + --install-base /opt/autoware \ + --mixin release compile-commands ccache \ + && du -sh ${CCACHE_DIR} && ccache -s \ + && rm -rf /autoware/build + +ENTRYPOINT ["/ros_entrypoint.sh"] +CMD ["/bin/bash"] + +FROM universe-common-devel AS universe-sensing-perception-devel +SHELL ["/bin/bash", "-o", "pipefail", "-c"] +ARG ROS_DISTRO +ENV CCACHE_DIR="/root/.ccache" + +# Install rosdep dependencies +COPY --from=rosdep-universe-sensing-perception-depend /rosdep-universe-sensing-perception-depend-packages.txt /tmp/rosdep-universe-sensing-perception-depend-packages.txt +# hadolint ignore=SC2002 +RUN --mount=type=ssh \ + apt-get update \ + && cat /tmp/rosdep-universe-sensing-perception-depend-packages.txt | xargs apt-get install -y --no-install-recommends \ + && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* "$HOME"/.cache + +# hadolint ignore=SC1091 +RUN --mount=type=cache,target=${CCACHE_DIR} \ + --mount=type=bind,from=rosdep-universe-sensing-perception-depend,source=/autoware/src/universe/autoware.universe/perception,target=/autoware/src/universe/autoware.universe/perception \ + --mount=type=bind,from=rosdep-universe-sensing-perception-depend,source=/autoware/src/universe/autoware.universe/sensing,target=/autoware/src/universe/autoware.universe/sensing \ + source /opt/ros/"$ROS_DISTRO"/setup.bash \ + && source /opt/autoware/setup.bash \ + && du -sh ${CCACHE_DIR} && ccache -s \ + && colcon build --cmake-args \ + " -Wno-dev" \ + " --no-warn-unused-cli" \ + --merge-install \ + --install-base /opt/autoware \ + --mixin release compile-commands ccache \ + && du -sh ${CCACHE_DIR} && ccache -s \ + && rm -rf /autoware/build + +ENTRYPOINT ["/ros_entrypoint.sh"] +CMD ["/bin/bash"] + +FROM universe-common-devel AS universe-localization-mapping-devel +SHELL ["/bin/bash", "-o", "pipefail", "-c"] +ARG ROS_DISTRO +ENV CCACHE_DIR="/root/.ccache" + +# Install rosdep dependencies +COPY --from=rosdep-universe-localization-mapping-depend /rosdep-universe-localization-mapping-depend-packages.txt /tmp/rosdep-universe-localization-mapping-depend-packages.txt +# hadolint ignore=SC2002 +RUN --mount=type=ssh \ + apt-get update \ + && cat /tmp/rosdep-universe-localization-mapping-depend-packages.txt | xargs apt-get install -y --no-install-recommends \ + && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* "$HOME"/.cache + +# hadolint ignore=SC1091 +RUN --mount=type=cache,target=${CCACHE_DIR} \ + --mount=type=bind,from=rosdep-universe-localization-mapping-depend,source=/autoware/src/universe/autoware.universe/localization,target=/autoware/src/universe/autoware.universe/localization \ + --mount=type=bind,from=rosdep-universe-localization-mapping-depend,source=/autoware/src/universe/autoware.universe/map,target=/autoware/src/universe/autoware.universe/map \ + source /opt/ros/"$ROS_DISTRO"/setup.bash \ + && source /opt/autoware/setup.bash \ + && du -sh ${CCACHE_DIR} && ccache -s \ + && colcon build --cmake-args \ + " -Wno-dev" \ + " --no-warn-unused-cli" \ + --merge-install \ + --install-base /opt/autoware \ + --mixin release compile-commands ccache \ + && du -sh ${CCACHE_DIR} && ccache -s \ + && rm -rf /autoware/build + +FROM universe-common-devel AS universe-planning-control-devel SHELL ["/bin/bash", "-o", "pipefail", "-c"] ARG ROS_DISTRO -ARG SETUP_ARGS ENV CCACHE_DIR="/root/.ccache" # Install rosdep dependencies -COPY --from=rosdep-depend /rosdep-universe-depend-packages.txt /tmp/rosdep-universe-depend-packages.txt +COPY --from=rosdep-universe-planning-control-depend /rosdep-universe-planning-control-depend-packages.txt /tmp/rosdep-universe-planning-control-depend-packages.txt +# hadolint ignore=SC2002 +RUN --mount=type=ssh \ + apt-get update \ + && cat /tmp/rosdep-universe-planning-control-depend-packages.txt | xargs apt-get install -y --no-install-recommends \ + && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* "$HOME"/.cache + +# hadolint ignore=SC1091 +RUN --mount=type=cache,target=${CCACHE_DIR} \ + --mount=type=bind,from=rosdep-universe-planning-control-depend,source=/autoware/src/universe/autoware.universe/control,target=/autoware/src/universe/autoware.universe/control \ + --mount=type=bind,from=rosdep-universe-planning-control-depend,source=/autoware/src/universe/autoware.universe/planning,target=/autoware/src/universe/autoware.universe/planning \ + # TODO(youtalk): Remove --mount options when https://github.com/autowarefoundation/autoware.universe/issues/8805 is resolved + --mount=type=bind,from=rosdep-universe-planning-control-depend,source=/autoware/src/universe/autoware.universe/map/map_loader,target=/autoware/src/universe/autoware.universe/map/map_loader \ + --mount=type=bind,from=rosdep-universe-planning-control-depend,source=/autoware/src/universe/autoware.universe/map/autoware_map_projection_loader,target=/autoware/src/universe/autoware.universe/map/autoware_map_projection_loader \ + --mount=type=bind,from=rosdep-universe-planning-control-depend,source=/autoware/src/universe/autoware.universe/sensing/autoware_pcl_extensions,target=/autoware/src/universe/autoware.universe/sensing/autoware_pcl_extensions \ + --mount=type=bind,from=rosdep-universe-planning-control-depend,source=/autoware/src/universe/autoware.universe/sensing/autoware_pointcloud_preprocessor,target=/autoware/src/universe/autoware.universe/sensing/autoware_pointcloud_preprocessor \ + source /opt/ros/"$ROS_DISTRO"/setup.bash \ + && source /opt/autoware/setup.bash \ + && du -sh ${CCACHE_DIR} && ccache -s \ + && colcon build --cmake-args \ + " -Wno-dev" \ + " --no-warn-unused-cli" \ + --merge-install \ + --install-base /opt/autoware \ + --mixin release compile-commands ccache \ + && du -sh ${CCACHE_DIR} && ccache -s \ + && rm -rf /autoware/build + +ENTRYPOINT ["/ros_entrypoint.sh"] +CMD ["/bin/bash"] + +FROM universe-common-devel AS universe-vehicle-system-devel +SHELL ["/bin/bash", "-o", "pipefail", "-c"] +ARG ROS_DISTRO +ENV CCACHE_DIR="/root/.ccache" + +# Install rosdep dependencies +COPY --from=rosdep-universe-vehicle-system-depend /rosdep-universe-vehicle-system-depend-packages.txt /tmp/rosdep-universe-vehicle-system-depend-packages.txt +# hadolint ignore=SC2002 +RUN --mount=type=ssh \ + apt-get update \ + && cat /tmp/rosdep-universe-vehicle-system-depend-packages.txt | xargs apt-get install -y --no-install-recommends \ + && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* "$HOME"/.cache + +# hadolint ignore=SC1091 +RUN --mount=type=cache,target=${CCACHE_DIR} \ + --mount=type=bind,from=rosdep-universe-vehicle-system-depend,source=/autoware/src/universe/autoware.universe/vehicle,target=/autoware/src/universe/autoware.universe/vehicle \ + --mount=type=bind,from=rosdep-universe-vehicle-system-depend,source=/autoware/src/universe/autoware.universe/system,target=/autoware/src/universe/autoware.universe/system \ + --mount=type=bind,from=rosdep-universe-vehicle-system-depend,source=/autoware/src/universe/autoware.universe/map/autoware_map_height_fitter,target=/autoware/src/universe/autoware.universe/map/autoware_map_height_fitter \ + --mount=type=bind,from=rosdep-universe-vehicle-system-depend,source=/autoware/src/universe/autoware.universe/localization/autoware_pose2twist,target=/autoware/src/universe/autoware.universe/localization/autoware_pose2twist \ + source /opt/ros/"$ROS_DISTRO"/setup.bash \ + && source /opt/autoware/setup.bash \ + && du -sh ${CCACHE_DIR} && ccache -s \ + && colcon build --cmake-args \ + " -Wno-dev" \ + " --no-warn-unused-cli" \ + --merge-install \ + --install-base /opt/autoware \ + --mixin release compile-commands ccache \ + && du -sh ${CCACHE_DIR} && ccache -s \ + && rm -rf /autoware/build + +ENTRYPOINT ["/ros_entrypoint.sh"] +CMD ["/bin/bash"] + +FROM universe-common-devel AS universe-devel +SHELL ["/bin/bash", "-o", "pipefail", "-c"] +ARG ROS_DISTRO +ENV CCACHE_DIR="/root/.ccache" + +# Install rosdep dependencies +COPY --from=rosdep-universe-depend /rosdep-universe-depend-packages.txt /tmp/rosdep-universe-depend-packages.txt # hadolint ignore=SC2002 RUN --mount=type=ssh \ apt-get update \ && cat /tmp/rosdep-universe-depend-packages.txt | xargs apt-get install -y --no-install-recommends \ && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* "$HOME"/.cache -# Build Autoware -RUN --mount=type=bind,from=rosdep-depend,source=/autoware/src,target=/autoware/src \ - --mount=type=cache,target=${CCACHE_DIR} \ +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 +# 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 \ + --mount=type=bind,from=rosdep-universe-depend,source=/autoware/src/param,target=/autoware/src/param \ + --mount=type=bind,from=rosdep-universe-depend,source=/autoware/src/sensor_component,target=/autoware/src/sensor_component \ + --mount=type=bind,from=rosdep-universe-depend,source=/autoware/src/sensor_kit,target=/autoware/src/sensor_kit \ + --mount=type=bind,from=rosdep-universe-depend,source=/autoware/src/universe/autoware.universe/evaluator,target=/autoware/src/universe/autoware.universe/evaluator \ + --mount=type=bind,from=rosdep-universe-depend,source=/autoware/src/universe/autoware.universe/launch,target=/autoware/src/universe/autoware.universe/launch \ + --mount=type=bind,from=rosdep-universe-depend,source=/autoware/src/universe/autoware.universe/simulator,target=/autoware/src/universe/autoware.universe/simulator \ + --mount=type=bind,from=rosdep-universe-depend,source=/autoware/src/universe/autoware.universe/tools,target=/autoware/src/universe/autoware.universe/tools \ + --mount=type=bind,from=rosdep-universe-depend,source=/autoware/src/vehicle,target=/autoware/src/vehicle \ source /opt/ros/"$ROS_DISTRO"/setup.bash \ + && source /opt/autoware/setup.bash \ && du -sh ${CCACHE_DIR} && ccache -s \ && colcon build --cmake-args \ " -Wno-dev" \ " --no-warn-unused-cli" \ + --merge-install \ + --install-base /opt/autoware \ --mixin release compile-commands ccache \ - && du -sh ${CCACHE_DIR} && ccache -s + && du -sh ${CCACHE_DIR} && ccache -s \ + && rm -rf /autoware/build +ENTRYPOINT ["/ros_entrypoint.sh"] CMD ["/bin/bash"] -FROM autoware-universe as devel +FROM base AS universe-sensing-perception SHELL ["/bin/bash", "-o", "pipefail", "-c"] +ARG ROS_DISTRO +ARG LIB_DIR +ARG SETUP_ARGS -# Install development tools and artifacts +# Set up runtime environment and artifacts +COPY --from=rosdep-universe-sensing-perception-depend /rosdep-universe-sensing-perception-exec-depend-packages.txt /tmp/rosdep-universe-sensing-perception-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 dev-tools openadkit \ + ./setup-dev-env.sh -y --module all ${SETUP_ARGS} --download-artifacts --no-cuda-drivers --runtime openadkit \ && pip uninstall -y ansible ansible-core \ - && apt-get autoremove -y && rm -rf "$HOME"/.cache + && apt-get update \ + && cat /tmp/rosdep-universe-sensing-perception-exec-depend-packages.txt | xargs apt-get install -y --no-install-recommends \ + && apt-get autoremove -y && rm -rf "$HOME"/.cache \ + && find /usr/lib/$LIB_DIR-linux-gnu -name "*.a" -type f -delete \ + && find / -name "*.o" -type f -delete \ + && find / -name "*.h" -type f -delete \ + && find / -name "*.hpp" -type f -delete \ + && rm -rf /autoware/ansible /autoware/ansible-galaxy-requirements.yaml /autoware/setup-dev-env.sh /autoware/*.env \ + /root/.local/pipx /opt/ros/"$ROS_DISTRO"/include /etc/apt/sources.list.d/cuda*.list \ + /etc/apt/sources.list.d/docker.list /etc/apt/sources.list.d/nvidia-docker.list \ + /usr/include /usr/share/doc /usr/lib/gcc /usr/lib/jvm /usr/lib/llvm* + +COPY --from=universe-sensing-perception-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"] + +FROM base AS universe-localization-mapping +SHELL ["/bin/bash", "-o", "pipefail", "-c"] +ARG ROS_DISTRO +ARG LIB_DIR +ARG SETUP_ARGS + +# Set up runtime environment and artifacts +COPY --from=rosdep-universe-localization-mapping-depend /rosdep-universe-localization-mapping-exec-depend-packages.txt /tmp/rosdep-universe-localization-mapping-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 ${SETUP_ARGS} --no-cuda-drivers --runtime openadkit \ + && pip uninstall -y ansible ansible-core \ + && apt-get update \ + && cat /tmp/rosdep-universe-localization-mapping-exec-depend-packages.txt | xargs apt-get install -y --no-install-recommends \ + && apt-get autoremove -y && rm -rf "$HOME"/.cache \ + && find /usr/lib/$LIB_DIR-linux-gnu -name "*.a" -type f -delete \ + && find / -name "*.o" -type f -delete \ + && find / -name "*.h" -type f -delete \ + && find / -name "*.hpp" -type f -delete \ + && rm -rf /autoware/ansible /autoware/ansible-galaxy-requirements.yaml /autoware/setup-dev-env.sh /autoware/*.env \ + /root/.local/pipx /opt/ros/"$ROS_DISTRO"/include /etc/apt/sources.list.d/cuda*.list \ + /etc/apt/sources.list.d/docker.list /etc/apt/sources.list.d/nvidia-docker.list \ + /usr/include /usr/share/doc /usr/lib/gcc /usr/lib/jvm /usr/lib/llvm* + +COPY --from=universe-localization-mapping-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"] + +FROM base AS universe-planning-control +SHELL ["/bin/bash", "-o", "pipefail", "-c"] +ARG ROS_DISTRO +ARG LIB_DIR +ARG SETUP_ARGS + +# Set up runtime environment and artifacts +COPY --from=rosdep-universe-planning-control-depend /rosdep-universe-planning-control-exec-depend-packages.txt /tmp/rosdep-universe-planning-control-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 ${SETUP_ARGS} --no-cuda-drivers --runtime openadkit \ + && pip uninstall -y ansible ansible-core \ + && apt-get update \ + && cat /tmp/rosdep-universe-planning-control-exec-depend-packages.txt | xargs apt-get install -y --no-install-recommends \ + && apt-get autoremove -y && rm -rf "$HOME"/.cache \ + && find /usr/lib/$LIB_DIR-linux-gnu -name "*.a" -type f -delete \ + && find / -name "*.o" -type f -delete \ + && find / -name "*.h" -type f -delete \ + && find / -name "*.hpp" -type f -delete \ + && rm -rf /autoware/ansible /autoware/ansible-galaxy-requirements.yaml /autoware/setup-dev-env.sh /autoware/*.env \ + /root/.local/pipx /opt/ros/"$ROS_DISTRO"/include /etc/apt/sources.list.d/cuda*.list \ + /etc/apt/sources.list.d/docker.list /etc/apt/sources.list.d/nvidia-docker.list \ + /usr/include /usr/share/doc /usr/lib/gcc /usr/lib/jvm /usr/lib/llvm* + +COPY --from=universe-planning-control-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"] + +FROM base AS universe-vehicle-system +SHELL ["/bin/bash", "-o", "pipefail", "-c"] +ARG ROS_DISTRO +ARG LIB_DIR +ARG SETUP_ARGS + +# Set up runtime environment and artifacts +COPY --from=rosdep-universe-vehicle-system-depend /rosdep-universe-vehicle-system-exec-depend-packages.txt /tmp/rosdep-universe-vehicle-system-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 ${SETUP_ARGS} --no-cuda-drivers --runtime openadkit \ + && pip uninstall -y ansible ansible-core \ + && apt-get update \ + && cat /tmp/rosdep-universe-vehicle-system-exec-depend-packages.txt | xargs apt-get install -y --no-install-recommends \ + && apt-get autoremove -y && rm -rf "$HOME"/.cache \ + && find /usr/lib/$LIB_DIR-linux-gnu -name "*.a" -type f -delete \ + && find / -name "*.o" -type f -delete \ + && find / -name "*.h" -type f -delete \ + && find / -name "*.hpp" -type f -delete \ + && rm -rf /autoware/ansible /autoware/ansible-galaxy-requirements.yaml /autoware/setup-dev-env.sh /autoware/*.env \ + /root/.local/pipx /opt/ros/"$ROS_DISTRO"/include /etc/apt/sources.list.d/cuda*.list \ + /etc/apt/sources.list.d/docker.list /etc/apt/sources.list.d/nvidia-docker.list \ + /usr/include /usr/share/doc /usr/lib/gcc /usr/lib/jvm /usr/lib/llvm* + +COPY --from=universe-vehicle-system-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 -COPY src /autoware/src -# Create entrypoint -COPY docker/etc/ros_entrypoint.sh /ros_entrypoint.sh -RUN chmod +x /ros_entrypoint.sh ENTRYPOINT ["/ros_entrypoint.sh"] CMD ["/bin/bash"] -FROM base as runtime +FROM base AS universe SHELL ["/bin/bash", "-o", "pipefail", "-c"] ARG ROS_DISTRO ARG LIB_DIR ARG SETUP_ARGS # Set up runtime environment and artifacts -COPY --from=rosdep-depend /rosdep-exec-depend-packages.txt /tmp/rosdep-exec-depend-packages.txt +COPY --from=rosdep-universe-depend /rosdep-exec-depend-packages.txt /tmp/rosdep-exec-depend-packages.txt # hadolint ignore=SC2002 RUN --mount=type=ssh \ --mount=type=cache,target=/var/cache/apt,sharing=locked \ @@ -174,19 +590,16 @@ RUN --mount=type=ssh \ && find / -name "*.o" -type f -delete \ && find / -name "*.h" -type f -delete \ && find / -name "*.hpp" -type f -delete \ - && rm -rf /autoware/ansible \ + && rm -rf /autoware/ansible /autoware/ansible-galaxy-requirements.yaml /autoware/setup-dev-env.sh /autoware/*.env \ /root/.local/pipx /opt/ros/"$ROS_DISTRO"/include /etc/apt/sources.list.d/cuda*.list \ /etc/apt/sources.list.d/docker.list /etc/apt/sources.list.d/nvidia-docker.list \ /usr/include /usr/share/doc /usr/lib/gcc /usr/lib/jvm /usr/lib/llvm* -COPY --from=autoware-universe /autoware/install/ /autoware/install/ +COPY --from=universe-devel /opt/autoware /opt/autoware # Copy bash aliases COPY docker/etc/.bash_aliases /root/.bash_aliases -RUN echo "source /autoware/install/setup.bash" > /etc/bash.bashrc +RUN echo "source /opt/autoware/setup.bash" > /etc/bash.bashrc -# Create entrypoint -COPY docker/etc/ros_entrypoint.sh /ros_entrypoint.sh -RUN chmod +x /ros_entrypoint.sh ENTRYPOINT ["/ros_entrypoint.sh"] -CMD ["bash"] +CMD ["/bin/bash"] diff --git a/docker/Dockerfile.svg b/docker/Dockerfile.svg new file mode 100644 index 00000000000..a8d5d4e1d37 --- /dev/null +++ b/docker/Dockerfile.svg @@ -0,0 +1,414 @@ + + + + + + +G + + +cluster_legend + + + + +key +FROM ...  +COPY --from=...  +RUN --mount=(.*)from=...  + + + +key2 +  +  +  + + + +key:e->key2:w + + + + + +key:e->key2:w + + + + + +key:e->key2:w + + + + + +external_image_0 + +$BASE_IMAGE + + + +stage_0 + +base + + + +external_image_0->stage_0 + + + + + +stage_1 + +rosdep-depend + + + +external_image_0->stage_1 + + + + + +stage_7 + +core-devel + + + +stage_0->stage_7 + + + + + +stage_14 + +universe-sensing-perception + + + +stage_0->stage_14 + + + + + + +stage_15 + +universe-localization-mapping + + + +stage_0->stage_15 + + + + + +stage_16 + +universe-planning-control + + + +stage_0->stage_16 + + + + + + + +stage_17 + +universe-vehicle-system + + + +stage_0->stage_17 + + + + +stage_18 + +universe + + + +stage_0->stage_18 + + + + + +stage_1->stage_7 + + + + + +stage_2 + +rosdep-universe-sensing-perception-depend + + + +stage_1->stage_2 + + + + + +stage_3 + +rosdep-universe-localization-mapping-depend + + + +stage_1->stage_3 + + + + + +stage_4 + +rosdep-universe-planning-control-depend + + + +stage_1->stage_4 + + + + + + +stage_5 + +rosdep-universe-vehicle-system-depend + + + +stage_1->stage_5 + + + + + +stage_6 + +rosdep-universe-depend + + + +stage_1->stage_6 + + + + + + +stage_8 + +universe-common-devel + + + +stage_1->stage_8 + + + + + +stage_7->stage_8 + + + + + +stage_2->stage_14 + + + + + +stage_9 + +universe-sensing-perception-devel + + + +stage_2->stage_9 + + + + + +stage_3->stage_15 + + + + + +stage_10 + +universe-localization-mapping-devel + + + +stage_3->stage_10 + + + + + +stage_4->stage_16 + + + + + +stage_11 + +universe-planning-control-devel + + + +stage_4->stage_11 + + + + + +stage_5->stage_17 + + + + + + +stage_12 + +universe-vehicle-system-devel + + + +stage_5->stage_12 + + + + + +stage_6->stage_18 + + + + + +stage_13 + +universe-devel + + + +stage_6->stage_13 + + + + + +stage_8->stage_9 + + + + + +stage_8->stage_10 + + + + + +stage_8->stage_11 + + + + + +stage_8->stage_12 + + + + + +stage_8->stage_13 + + + + + +stage_9->stage_14 + + + + + +stage_9->stage_13 + + + + + +stage_10->stage_15 + + + + + +stage_10->stage_13 + + + + + +stage_11->stage_16 + + + + + +stage_11->stage_13 + + + + + +stage_12->stage_17 + + + + + +stage_12->stage_13 + + + + + +stage_13->stage_18 + + + + + diff --git a/docker/README.md b/docker/README.md index a569443bf01..2dc13c925bf 100644 --- a/docker/README.md +++ b/docker/README.md @@ -3,3 +3,170 @@ [Open AD Kit](https://autoware.org/open-ad-kit/) offers containers for Autoware to simplify the development and deployment of Autoware and its dependencies. This directory contains scripts to build and run the containers. Detailed instructions on how to use the containers can be found in the [Open AD Kit documentation](https://autowarefoundation.github.io/autoware-documentation/main/installation/autoware/docker-installation/). + +## Development containers + +When using Open AD Kit as a development container, it is easy to use Autoware's all-in-one development container image, `ghcr.io/autowarefoundation/autoware:universe-devel-cuda`. +If you do not need the CUDA drivers, you can also use the smaller image `ghcr.io/autowarefoundation/autoware:universe-devel`. + +```shell +$ git clone git@github.com:autowarefoundation/autoware.git +$ cd autoware +$ vcs import src < autoware.repos +$ docker run -it --rm \ + –v $PWD/src/universe/autoware.universe/XXX/autoware_YYY:/autoware/src/autoware_YYY \ + ghcr.io/autowarefoundation/autoware:universe-devel-cuda +$ colcon build --mixin debug compile-commands +$ source install/setup.bash +$ ros2 run --prefix "gdb -ex run --args" autoware_YYY ZZZ +``` + +For example, if you want to make modifications to [`autoware.universe/perception/autoware_bytetrack`](https://github.com/autowarefoundation/autoware.universe/tree/main/perception/autoware_bytetrack), you can execute the following commands to perform the volume mount and debug build and execution of only the `autoware_bytetrack`. + +Note that `gdb` is not currently installed in the development containers, but it would be installed in the near future. + +```shell +$ docker run -it --rm \ + -v $PWD/src/universe/autoware.universe/perception/autoware_bytetrack:/autoware/src/autoware_bytetrack \ + ghcr.io/autowarefoundation/autoware:universe-devel-cuda +$ root@a566e785c4d2:/autoware# colcon build --mixin debug compile-commands +Starting >>> autoware_bytetrack +[Processing: autoware_bytetrack] +Finished <<< autoware_bytetrack [37.9s] + +Summary: 1 package finished [38.1s] +$ root@a566e785c4d2:/autoware# source install/setup.bash +$ root@a566e785c4d2:/autoware# apt update && apt install gdb +$ root@a566e785c4d2:/autoware# ros2 run --prefix "gdb -ex run --args" autoware_bytetrack bytetrack_node_exe +GNU gdb (Ubuntu 12.1-0ubuntu1~22.04.2) 12.1 +... +[Thread debugging using libthread_db enabled] +... +[New Thread 0x7ff6f3fff640 (LWP 1205)] +Init ByteTrack! +``` + +## Runtime containers + +In the execution container, there is the all-in-one runtime container for Autoware, `ghcr.io/autowarefoundation/autoware:universe-cuda`, and the multi-containerized `ghcr.io/autowarefoundation/autoware:universe-***-cuda` for each component of Autoware Universe. + +The all-in-one execution container also has the autoware_launch package installed, allowing it to be started in the same way as a locally built Autoware. + +```shell +git clone git@github.com:autowarefoundation/autoware.git +cd autoware +docker run -it --rm ghcr.io/autowarefoundation/autoware:universe-cuda +ros2 launch autoware_launch planning_simulator.launch.xml map_path:=... +``` + +For example, if you want to run the runtime container that only includes the `sensing/perception` components, you can execute it as follows. + +```shell +docker run -it --rm ghcr.io/autowarefoundation/autoware:universe-sensing-perception-cuda +ros2 launch autoware_pointcloud_preprocessor preprocessor.launch.xml +``` + +## Multi-stage Dockerfile structure + +![](./Dockerfile.svg) + +The suffix `-devel` (e.g. `universe-devel`) is intended for use as a [development container](https://containers.dev). On the other hand, those without the `-devel` suffix (e.g. `universe`) are intended to be used as a runtime container. + +### `$BASE_IMAGE` + +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` + +This stage performs only the basic setup required for all Autoware images. + +### `rosdep-depend` + +The ROS dependency package list files will be generated. +These files will be used in the subsequent stages: + +- `core-devel` +- `universe-common` +- `universe-COMPONENT-devel` (e.g. `universe-sensing-perception-devel`) +- `universe-COMPONENT` (e.g. `universe-sensing-perception`) +- `universe-devel` +- `universe` + +By generating only the package list files and copying them to the subsequent stages, the dependency packages will not be reinstalled during the container build process unless the dependency packages change. + +### `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`. + +### `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`. + +- `universe/external` +- `universe/autoware.universe/common` + +### `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`. + +- `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. + +### `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`. + +- `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. + +### `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`. + +- `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. + +### `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`. + +- `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. + +### `universe-devel` + +This stage installs the dependency packages based on `/rosdep-universe-depend-packages.txt` and build the remaining packages of `autoware.repos`: + +- `launcher` +- `param` +- `sensor_component` +- `sensor_kit` +- `universe/autoware.universe/evaluator` +- `universe/autoware.universe/launch` +- `universe/autoware.universe/simulator` +- `universe/autoware.universe/system` +- `universe/autoware.universe/tools` +- `universe/autoware.universe/vehicle` +- `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` + +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. diff --git a/docker/build.sh b/docker/build.sh index 4824a88e11b..b962137b79c 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -59,7 +59,7 @@ set_cuda_options() { # Set build options set_build_options() { if [ "$option_devel_only" = "true" ]; then - targets=("devel") + targets=("universe-devel") else targets=() fi @@ -132,9 +132,9 @@ build_images() { --set "*.args.BASE_IMAGE=$base_image" \ --set "*.args.SETUP_ARGS=$setup_args" \ --set "*.args.LIB_DIR=$lib_dir" \ - --set "base.tags=ghcr.io/autowarefoundation/autoware:latest-base" \ - --set "devel.tags=ghcr.io/autowarefoundation/autoware:latest-devel$image_name_suffix" \ - --set "runtime.tags=ghcr.io/autowarefoundation/autoware:latest-runtime$image_name_suffix" \ + --set "base.tags=ghcr.io/autowarefoundation/autoware:base" \ + --set "universe-devel.tags=ghcr.io/autowarefoundation/autoware:universe-devel$image_name_suffix" \ + --set "universe.tags=ghcr.io/autowarefoundation/autoware:universe$image_name_suffix" \ "${targets[@]}" set +x } diff --git a/docker/docker-bake.hcl b/docker/docker-bake.hcl index 9e3fb6536a7..35d0f7fdbfc 100644 --- a/docker/docker-bake.hcl +++ b/docker/docker-bake.hcl @@ -1,13 +1,33 @@ group "default" { - targets = ["base", "autoware-core", "autoware-universe", "devel", "runtime"] + targets = [ + "base", + "core-devel", + "universe-sensing-perception-devel", + "universe-sensing-perception", + "universe-localization-mapping-devel", + "universe-localization-mapping", + "universe-planning-control-devel", + "universe-planning-control", + "universe-vehicle-system-devel", + "universe-vehicle-system", + "universe-devel", + "universe" + ] } // For docker/metadata-action target "docker-metadata-action-base" {} -target "docker-metadata-action-autoware-core" {} -target "docker-metadata-action-autoware-universe" {} -target "docker-metadata-action-devel" {} -target "docker-metadata-action-runtime" {} +target "docker-metadata-action-core-devel" {} +target "docker-metadata-action-universe-sensing-perception-devel" {} +target "docker-metadata-action-universe-sensing-perception" {} +target "docker-metadata-action-universe-localization-mapping-devel" {} +target "docker-metadata-action-universe-localization-mapping" {} +target "docker-metadata-action-universe-planning-control-devel" {} +target "docker-metadata-action-universe-planning-control" {} +target "docker-metadata-action-universe-vehicle-system-devel" {} +target "docker-metadata-action-universe-vehicle-system" {} +target "docker-metadata-action-universe-devel" {} +target "docker-metadata-action-universe" {} target "base" { inherits = ["docker-metadata-action-base"] @@ -15,26 +35,68 @@ target "base" { target = "base" } -target "autoware-core" { - inherits = ["docker-metadata-action-autoware-core"] +target "core-devel" { + inherits = ["docker-metadata-action-core-devel"] dockerfile = "docker/Dockerfile" - target = "autoware-core" + target = "core-devel" } -target "autoware-universe" { - inherits = ["docker-metadata-action-autoware-universe"] +target "universe-sensing-perception-devel" { + inherits = ["docker-metadata-action-universe-sensing-perception-devel"] dockerfile = "docker/Dockerfile" - target = "autoware-universe" + target = "universe-sensing-perception-devel" } -target "devel" { - inherits = ["docker-metadata-action-devel"] +target "universe-sensing-perception" { + inherits = ["docker-metadata-action-universe-sensing-perception"] dockerfile = "docker/Dockerfile" - target = "devel" + target = "universe-sensing-perception" } -target "runtime" { - inherits = ["docker-metadata-action-runtime"] +target "universe-localization-mapping-devel" { + inherits = ["docker-metadata-action-universe-localization-mapping-devel"] dockerfile = "docker/Dockerfile" - target = "runtime" + target = "universe-localization-mapping-devel" +} + +target "universe-localization-mapping" { + inherits = ["docker-metadata-action-universe-localization-mapping"] + dockerfile = "docker/Dockerfile" + target = "universe-localization-mapping" +} + +target "universe-planning-control-devel" { + inherits = ["docker-metadata-action-universe-planning-control-devel"] + dockerfile = "docker/Dockerfile" + target = "universe-planning-control-devel" +} + +target "universe-planning-control" { + inherits = ["docker-metadata-action-universe-planning-control"] + dockerfile = "docker/Dockerfile" + target = "universe-planning-control" +} + +target "universe-vehicle-system-devel" { + inherits = ["docker-metadata-action-universe-vehicle-system-devel"] + dockerfile = "docker/Dockerfile" + target = "universe-vehicle-system-devel" +} + +target "universe-vehicle-system" { + inherits = ["docker-metadata-action-universe-vehicle-system"] + dockerfile = "docker/Dockerfile" + target = "universe-vehicle-system" +} + +target "universe-devel" { + inherits = ["docker-metadata-action-universe-devel"] + dockerfile = "docker/Dockerfile" + target = "universe-devel" +} + +target "universe" { + inherits = ["docker-metadata-action-universe"] + dockerfile = "docker/Dockerfile" + target = "universe" } diff --git a/docker/etc/ros_entrypoint.sh b/docker/etc/ros_entrypoint.sh index cbe45ef3bdb..25484312db6 100644 --- a/docker/etc/ros_entrypoint.sh +++ b/docker/etc/ros_entrypoint.sh @@ -10,7 +10,7 @@ GROUP_NAME=${LOCAL_GROUP} # Check if any of the variables are empty if [[ -z $USER_ID || -z $USER_NAME || -z $GROUP_ID || -z $GROUP_NAME ]]; then source "/opt/ros/$ROS_DISTRO/setup.bash" - source /autoware/install/setup.bash + source /opt/autoware/setup.bash exec "$@" else echo "Starting with user: $USER_NAME >> UID $USER_ID, GID: $GROUP_ID" @@ -25,7 +25,7 @@ else # Source ROS2 # hadolint ignore=SC1090 source "/opt/ros/$ROS_DISTRO/setup.bash" - source /autoware/install/setup.bash + source /opt/autoware/setup.bash # Execute the command as the user exec /usr/sbin/gosu "$USER_NAME" "$@" diff --git a/docker/run.sh b/docker/run.sh index 17be654d8cc..a1c920906b6 100755 --- a/docker/run.sh +++ b/docker/run.sh @@ -91,7 +91,7 @@ parse_arguments() { set_variables() { if [ "$option_devel" = "true" ]; then # Set image based on option - IMAGE="ghcr.io/autowarefoundation/autoware:latest-devel" + IMAGE="ghcr.io/autowarefoundation/autoware:universe-devel" # Set workspace path, if not provided use the current directory if [ "$WORKSPACE_PATH" = "" ]; then @@ -113,12 +113,12 @@ set_variables() { fi else # Set image based on option - IMAGE="ghcr.io/autowarefoundation/autoware:latest-runtime" + IMAGE="ghcr.io/autowarefoundation/autoware:universe" # Set map path if [ "$MAP_PATH" = "" ]; then echo -e "\n------------------------------------------------------------" - echo -e "${RED}Note:${NC} The --map-path option is mandatory for the runtime. For development environment with shell access, use --devel option." + echo -e "${RED}Note:${NC} The --map-path option is mandatory for the universe(runtime image). For development environment with shell access, use --devel option." echo -e "------------------------------------------------------------" exit 1 else diff --git a/setup-dev-env.sh b/setup-dev-env.sh index e5cb6953f61..5c8c141b6e9 100755 --- a/setup-dev-env.sh +++ b/setup-dev-env.sh @@ -127,13 +127,7 @@ else fi # Check downloading artifacts -if [ "$option_yes" = "true" ] || [ "$option_download_artifacts" = "true" ]; then - echo -e "\e[36mArtifacts will be downloaded to $option_data_dir\e[m" - ansible_args+=("--extra-vars" "prompt_download_artifacts=y") -fi - -# Check downloading artifacts -if [ "$target_playbook" = "autoware.dev_env.openadk" ]; then +if [ "$target_playbook" = "autoware.dev_env.openadkit" ]; then if [ "$option_download_artifacts" = "true" ]; then echo -e "\e[36mArtifacts will be downloaded to $option_data_dir\e[m" ansible_args+=("--extra-vars" "prompt_download_artifacts=y")