Skip to content

Commit

Permalink
Merge branch 'main' into feat/tier4_state_rviz_plugin/sub_by_polling
Browse files Browse the repository at this point in the history
  • Loading branch information
Autumn60 committed Jun 17, 2024
2 parents 572e660 + a6b5f27 commit b5b8afd
Show file tree
Hide file tree
Showing 131 changed files with 1,443 additions and 426 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ common/geography_utils/** koji.minoda@tier4.jp
common/global_parameter_loader/** ryohsuke.mitsudome@tier4.jp
common/glog_component/** takamasa.horibe@tier4.jp
common/goal_distance_calculator/** taiki.tanaka@tier4.jp
common/grid_map_utils/** maxime.clement@tier4.jp
common/autoware_grid_map_utils/** maxime.clement@tier4.jp
common/interpolation/** fumiya.watanabe@tier4.jp takayuki.murooka@tier4.jp
common/kalman_filter/** koji.minoda@tier4.jp takeshi.ishita@tier4.jp yukihiro.saito@tier4.jp
common/motion_utils/** fumiya.watanabe@tier4.jp kosuke.takeuchi@tier4.jp mamoru.sobue@tier4.jp satoshi.ota@tier4.jp taiki.tanaka@tier4.jp takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp tomoya.kimura@tier4.jp
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cancel-previous-workflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.12.0
uses: styfle/cancel-workflow-action@0.12.1
with:
workflow_id: all
all_but_latest: true
2 changes: 1 addition & 1 deletion .github/workflows/check-build-depends.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
build-depends-repos: build_depends.repos
steps:
- name: Check out repository
uses: actions/checkout@v4
uses: actions/checkout@v3

- name: Remove exec_depend
uses: autowarefoundation/autoware-github-actions/remove-exec-depend@v1
Expand Down
22 changes: 15 additions & 7 deletions .github/workflows/clang-tidy-differential.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,29 @@ on:
types:
- opened
- synchronize
- reopened
- labeled

jobs:
prevent-no-label-execution:
uses: autowarefoundation/autoware-github-actions/.github/workflows/prevent-no-label-execution.yaml@v1
make-sure-label-is-present:
uses: autowarefoundation/autoware-github-actions/.github/workflows/make-sure-label-is-present.yaml@v1
with:
label: tag:run-clang-tidy-differential

clang-tidy-differential:
needs: prevent-no-label-execution
if: ${{ needs.prevent-no-label-execution.outputs.run == 'true' }}
needs: make-sure-label-is-present
if: ${{ needs.make-sure-label-is-present.outputs.result == 'true' }}
runs-on: ubuntu-latest
container: ghcr.io/autowarefoundation/autoware:latest-prebuilt-cuda
steps:
- name: Check out repository
- name: Set PR fetch depth
run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> "${GITHUB_ENV}"

- name: Checkout PR branch and all PR commits
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: ${{ env.PR_FETCH_DEPTH }}

- name: Show disk space before the tasks
run: df -h
Expand All @@ -36,7 +41,7 @@ jobs:

- name: Get modified files
id: get-modified-files
uses: tj-actions/changed-files@v35
uses: tj-actions/changed-files@v42
with:
files: |
**/*.cpp
Expand All @@ -51,3 +56,6 @@ jobs:
target-files: ${{ steps.get-modified-files.outputs.all_changed_files }}
clang-tidy-config-url: https://github.com/raw/autowarefoundation/autoware/main/.clang-tidy
build-depends-repos: build_depends.repos

- name: Show disk space after the tasks
run: df -h
4 changes: 2 additions & 2 deletions .github/workflows/clang-tidy-pr-comments-manually.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
uses: actions/checkout@v3

- name: Download analysis results
run: |
Expand All @@ -36,7 +36,7 @@ jobs:
- name: Check out PR head
if: ${{ steps.check-fixes-yaml-existence.outputs.exists == 'true' }}
uses: actions/checkout@v4
uses: actions/checkout@v3
with:
repository: ${{ steps.set-variables.outputs.pr-head-repo }}
ref: ${{ steps.set-variables.outputs.pr-head-ref }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/clang-tidy-pr-comments.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
uses: actions/checkout@v3

- name: Download analysis results
run: |
Expand All @@ -37,7 +37,7 @@ jobs:
- name: Check out PR head
if: ${{ steps.check-fixes-yaml-existence.outputs.exists == 'true' }}
uses: actions/checkout@v4
uses: actions/checkout@v3
with:
repository: ${{ steps.set-variables.outputs.pr-head-repo }}
ref: ${{ steps.set-variables.outputs.pr-head-ref }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/delete-closed-pr-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
uses: actions/checkout@v3
with:
fetch-depth: 0

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/pre-commit-autoupdate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: pre-commit-autoupdate

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

jobs:
check-secret:
uses: autowarefoundation/autoware-github-actions/.github/workflows/check-secret.yaml@v1
secrets:
secret: ${{ secrets.APP_ID }}

pre-commit-autoupdate:
needs: check-secret
if: ${{ needs.check-secret.outputs.set == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Generate token
id: generate-token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.PRIVATE_KEY }}

- name: Run pre-commit-autoupdate
uses: autowarefoundation/autoware-github-actions/pre-commit-autoupdate@v1
with:
token: ${{ steps.generate-token.outputs.token }}
pre-commit-config: .pre-commit-config.yaml
pr-labels: |
tag:bot
tag:pre-commit-autoupdate
pr-branch: pre-commit-autoupdate
pr-title: "ci(pre-commit): autoupdate"
pr-commit-message: "ci(pre-commit): autoupdate"
auto-merge-method: squash
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
steps:
- name: Generate token
id: generate-token
uses: tibdex/github-app-token@v1
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.PRIVATE_KEY }}
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/spell-check-daily.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: spell-check-daily

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

jobs:
spell-check-daily:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Run spell-check
uses: autowarefoundation/autoware-github-actions/spell-check@v1
with:
local-cspell-json: .cspell.json
incremental-files-only: false
cspell-json-url: https://github.com/raw/tier4/autoware-spell-check-dict/main/.cspell.json
17 changes: 17 additions & 0 deletions .github/workflows/spell-check-differential.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: spell-check-differential

on:
pull_request:

jobs:
spell-check-differential:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Run spell-check
uses: autowarefoundation/autoware-github-actions/spell-check@v1
with:
local-cspell-json: .cspell.json
cspell-json-url: https://github.com/raw/tier4/autoware-spell-check-dict/main/.cspell.json
2 changes: 1 addition & 1 deletion .github/workflows/sync-files.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
steps:
- name: Generate token
id: generate-token
uses: tibdex/github-app-token@v1
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.PRIVATE_KEY }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-codeowners-from-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
steps:
- name: Generate token
id: generate-token
uses: tibdex/github-app-token@v1
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.PRIVATE_KEY }}
Expand Down
1 change: 1 addition & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ MD029:
style: ordered
MD033: false
MD041: false
MD045: false
MD046: false
MD049: false
2 changes: 1 addition & 1 deletion .pre-commit-config-optional.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/tcort/markdown-link-check
rev: v3.11.2
rev: v3.12.2
hooks:
- id: markdown-link-check
args: [--quiet, --config=.markdown-link-check.json]
20 changes: 10 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ci:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.6.0
hooks:
- id: check-json
- id: check-merge-conflict
Expand All @@ -18,18 +18,18 @@ repos:
args: [--markdown-linebreak-ext=md]

- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.33.0
rev: v0.41.0
hooks:
- id: markdownlint
args: [-c, .markdownlint.yaml, --fix]

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.6
rev: v4.0.0-alpha.8
hooks:
- id: prettier

- repo: https://github.com/adrienverge/yamllint
rev: v1.30.0
rev: v1.35.1
hooks:
- id: yamllint

Expand All @@ -44,29 +44,29 @@ repos:
- id: sort-package-xml

- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.9.0.2
rev: v0.10.0.1
hooks:
- id: shellcheck

- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.6.0-2
rev: v3.8.0-1
hooks:
- id: shfmt
args: [-w, -s, -i=4]

- repo: https://github.com/pycqa/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort

- repo: https://github.com/psf/black
rev: 23.3.0
rev: 24.4.2
hooks:
- id: black
args: [--line-length=100]

- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v16.0.0
rev: v18.1.6
hooks:
- id: clang-format
types_or: [c++, c, cuda]
Expand All @@ -79,7 +79,7 @@ repos:
exclude: .cu

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.23.2
rev: 0.28.5
hooks:
- id: check-metaschema
files: ^.+/schema/.*schema\.json$
Expand Down
2 changes: 1 addition & 1 deletion common/.pages
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ nav:
- 'Common Libraries':
- 'autoware_auto_common':
- 'comparisons': common/autoware_auto_common/design/comparisons
- 'autoware_grid_map_utils': common/autoware_grid_map_utils
- 'autoware_point_types': common/autoware_point_types
- 'Cuda Utils': common/cuda_utils
- 'Geography Utils': common/geography_utils
- 'Global Parameter Loader': common/global_parameter_loader/Readme
- 'Glog Component': common/glog_component
- 'grid_map_utils': common/grid_map_utils
- 'interpolation': common/interpolation
- 'Kalman Filter': common/kalman_filter
- 'Motion Utils': common/motion_utils
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.5)
project(grid_map_utils)
project(autoware_grid_map_utils)

if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 17)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ More details on the scan line algorithm can be found in the References.

## API

The `grid_map_utils::PolygonIterator` follows the same API as the original [`grid_map::PolygonIterator`](https://docs.ros.org/en/kinetic/api/grid_map_core/html/classgrid__map_1_1PolygonIterator.html).
The `autoware::grid_map_utils::PolygonIterator` follows the same API as the original [`grid_map::PolygonIterator`](https://docs.ros.org/en/kinetic/api/grid_map_core/html/classgrid__map_1_1PolygonIterator.html).

## Assumptions

The behavior of the `grid_map_utils::PolygonIterator` is only guaranteed to match the `grid_map::PolygonIterator` if edges of the polygon do not _exactly_ cross any cell center.
The behavior of the `autoware::grid_map_utils::PolygonIterator` is only guaranteed to match the `grid_map::PolygonIterator` if edges of the polygon do not _exactly_ cross any cell center.
In such a case, whether the crossed cell is considered inside or outside of the polygon can vary due to floating precision error.

## Performances

Benchmarking code is implemented in `test/benchmarking.cpp` and is also used to validate that the `grid_map_utils::PolygonIterator` behaves exactly like the `grid_map::PolygonIterator`.
Benchmarking code is implemented in `test/benchmarking.cpp` and is also used to validate that the `autoware::grid_map_utils::PolygonIterator` behaves exactly like the `grid_map::PolygonIterator`.

The following figure shows a comparison of the runtime between the implementation of this package (`grid_map_utils`) and the original implementation (`grid_map`).
The following figure shows a comparison of the runtime between the implementation of this package (`autoware_grid_map_utils`) and the original implementation (`grid_map`).
The time measured includes the construction of the iterator and the iteration over all indexes and is shown using a logarithmic scale.
Results were obtained varying the side size of a square grid map with `100 <= n <= 1000` (size=`n` means a grid of `n x n` cells),
random polygons with a number of vertices `3 <= m <= 100` and with each parameter `(n,m)` repeated 10 times.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef GRID_MAP_UTILS__POLYGON_ITERATOR_HPP_
#define GRID_MAP_UTILS__POLYGON_ITERATOR_HPP_
#ifndef AUTOWARE_GRID_MAP_UTILS__POLYGON_ITERATOR_HPP_
#define AUTOWARE_GRID_MAP_UTILS__POLYGON_ITERATOR_HPP_

#include "grid_map_core/TypeDefs.hpp"

Expand All @@ -24,7 +24,7 @@
#include <utility>
#include <vector>

namespace grid_map_utils
namespace autoware::grid_map_utils
{

/// @brief Representation of a polygon edge made of 2 vertices
Expand Down Expand Up @@ -124,6 +124,6 @@ class PolygonIterator
int current_col_;
int current_to_col_;
};
} // namespace grid_map_utils
} // namespace autoware::grid_map_utils

#endif // GRID_MAP_UTILS__POLYGON_ITERATOR_HPP_
#endif // AUTOWARE_GRID_MAP_UTILS__POLYGON_ITERATOR_HPP_
Loading

0 comments on commit b5b8afd

Please sign in to comment.