Skip to content

Commit

Permalink
Merge pull request #115 from youtalk/upstream-to-origin
Browse files Browse the repository at this point in the history
feat: upstream to origin
  • Loading branch information
youtalk authored Oct 9, 2024
2 parents e9a06d1 + 9171aff commit 1ef5aae
Show file tree
Hide file tree
Showing 69 changed files with 2,733 additions and 261 deletions.
4 changes: 0 additions & 4 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,10 @@ docker
# Ignore a part of files under src
src/**/.*
src/**/*.asc
src/**/*.csv
src/**/*.gif
src/**/*.md
src/**/*.pcd
src/**/*.png
src/**/*.svg
!src/universe/autoware.universe/common/autoware_overlay_rviz_plugin/autoware_overlay_rviz_plugin/assets
!src/universe/autoware.universe/vehicle/autoware_raw_vehicle_cmd_converter/data/default

# Ignore generated files by colcon
build
Expand Down
66 changes: 46 additions & 20 deletions .github/actions/docker-build-and-push/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ runs:
with:
images: ${{ github.repository_owner }}/${{ inputs.bake-target }}
tags: |
type=raw,value=base${{ inputs.tag-suffix && '-' }}${{ inputs.tag-suffix }}
type=raw,value=base${{ inputs.tag-suffix && '-' }}${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}
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
Expand All @@ -93,8 +93,8 @@ runs:
with:
images: ${{ github.repository_owner }}/${{ inputs.bake-target }}
tags: |
type=raw,value=core-devel${{ inputs.tag-suffix && '-' }}${{ inputs.tag-suffix }}
type=raw,value=core-devel${{ inputs.tag-suffix && '-' }}${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}
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
Expand All @@ -105,8 +105,8 @@ runs:
with:
images: ${{ github.repository_owner }}/${{ inputs.bake-target }}
tags: |
type=raw,value=universe-sensing-perception-devel${{ inputs.tag-suffix && '-' }}${{ inputs.tag-suffix }}
type=raw,value=universe-sensing-perception-devel${{ inputs.tag-suffix && '-' }}${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}
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
Expand All @@ -117,8 +117,8 @@ runs:
with:
images: ${{ github.repository_owner }}/${{ inputs.bake-target }}
tags: |
type=raw,value=universe-sensing-perception${{ inputs.tag-suffix && '-' }}${{ inputs.tag-suffix }}
type=raw,value=universe-sensing-perception${{ inputs.tag-suffix && '-' }}${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}
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
Expand All @@ -129,8 +129,8 @@ runs:
with:
images: ${{ github.repository_owner }}/${{ inputs.bake-target }}
tags: |
type=raw,value=universe-localization-mapping-devel${{ inputs.tag-suffix && '-' }}${{ inputs.tag-suffix }}
type=raw,value=universe-localization-mapping-devel${{ inputs.tag-suffix && '-' }}${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}
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
Expand All @@ -141,8 +141,8 @@ runs:
with:
images: ${{ github.repository_owner }}/${{ inputs.bake-target }}
tags: |
type=raw,value=universe-localization-mapping${{ inputs.tag-suffix && '-' }}${{ inputs.tag-suffix }}
type=raw,value=universe-localization-mapping${{ inputs.tag-suffix && '-' }}${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}
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
Expand All @@ -153,8 +153,8 @@ runs:
with:
images: ${{ github.repository_owner }}/${{ inputs.bake-target }}
tags: |
type=raw,value=universe-planning-control-devel${{ inputs.tag-suffix && '-' }}${{ inputs.tag-suffix }}
type=raw,value=universe-planning-control-devel${{ inputs.tag-suffix && '-' }}${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}
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
Expand All @@ -165,20 +165,44 @@ runs:
with:
images: ${{ github.repository_owner }}/${{ inputs.bake-target }}
tags: |
type=raw,value=universe-planning-control${{ inputs.tag-suffix && '-' }}${{ inputs.tag-suffix }}
type=raw,value=universe-planning-control${{ inputs.tag-suffix && '-' }}${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}
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: |
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
- 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: |
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
- name: Docker meta for autoware:universe-devel
id: meta-universe-devel
uses: docker/metadata-action@v5
with:
images: ${{ github.repository_owner }}/${{ inputs.bake-target }}
tags: |
type=raw,value=universe-devel${{ inputs.tag-suffix && '-' }}${{ inputs.tag-suffix }}
type=raw,value=universe-devel${{ inputs.tag-suffix && '-' }}${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}
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
Expand All @@ -189,8 +213,8 @@ runs:
with:
images: ${{ github.repository_owner }}/${{ inputs.bake-target }}
tags: |
type=raw,value=universe${{ inputs.tag-suffix && '-' }}${{ inputs.tag-suffix }}
type=raw,value=universe${{ inputs.tag-suffix && '-' }}${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}
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
Expand All @@ -215,6 +239,8 @@ runs:
${{ 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
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/create-prs-to-update-vcs-repositories.yaml
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions .github/workflows/docker-build-and-push-arm64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
- name: Check if PR author is the specific user
id: author-check
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
*.cache-from=type=registry,ref=${{ github.repository }}-buildcache:${{ matrix.name }}-${{ matrix.platform }}-${{ github.head_ref }}
*.cache-from=type=registry,ref=${{ github.repository }}-buildcache:${{ matrix.name }}-${{ matrix.platform }}-main
*.cache-to=type=registry,ref=${{ github.repository }}-buildcache:${{ matrix.name }}-${{ matrix.platform }}-${{ github.head_ref }},mode=max
tag-suffix: ${{ matrix.additional-tag-suffix }}-${{ matrix.platform }}
tag-suffix: ${{ matrix.tag-suffix }}
dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Show disk space
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docker-build-and-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 if PR author is the specific user
id: author-check
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
*.cache-from=type=registry,ref=${{ github.repository }}-buildcache:${{ matrix.name }}-${{ matrix.platform }}-${{ github.head_ref }}
*.cache-from=type=registry,ref=${{ github.repository }}-buildcache:${{ matrix.name }}-${{ matrix.platform }}-main
*.cache-to=type=registry,ref=${{ github.repository }}-buildcache:${{ matrix.name }}-${{ matrix.platform }}-${{ github.head_ref }},mode=max
tag-suffix: ${{ matrix.additional-tag-suffix }}-${{ matrix.platform }}
tag-suffix: ${{ matrix.tag-suffix }}
dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Show disk space
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/health-check-arm64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/health-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-docker-manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: update-docker-manifest

on:
schedule:
- cron: 0 0 * * *
- cron: 0 */2 * * *
workflow_dispatch:

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
4 changes: 4 additions & 0 deletions ansible/playbooks/install_rviz_theme.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- name: Install RViz theme
hosts: localhost
roles:
- autoware.dev_env.qt5ct_setup
3 changes: 3 additions & 0 deletions ansible/playbooks/universe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
60 changes: 60 additions & 0 deletions ansible/roles/qt5ct_setup/README.md
Original file line number Diff line number Diff line change
@@ -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 `<node>` element:

```xml
<node
pkg="rviz2"
exec="rviz2"
name="rviz2"
output="screen"
args="-d $(var rviz_config) -s $(find-pkg-share autoware_launch)/rviz/image/autoware.png"
if="$(var rviz)"
respawn="$(var rviz_respawn)">
<env name="QT_QPA_PLATFORMTHEME" value="qt5ct"/>
</node>
```

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.
1 change: 1 addition & 0 deletions ansible/roles/qt5ct_setup/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# defaults file for qt5ct_setup
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 1ef5aae

Please sign in to comment.