Skip to content

Commit

Permalink
Merge pull request autowarefoundation#39 from tier4/sync-upstream
Browse files Browse the repository at this point in the history
chore: sync upstream
  • Loading branch information
tier4-autoware-public-bot[bot] authored Apr 26, 2022
2 parents 75b9e2d + 80007ed commit 8278cce
Show file tree
Hide file tree
Showing 394 changed files with 5,404 additions and 4,997 deletions.
1 change: 1 addition & 0 deletions .github/sync-files.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- source: .github/PULL_REQUEST_TEMPLATE/standard-change.md
- source: .github/dependabot.yaml
- source: .github/stale.yml
- source: .github/workflows/github-release.yaml
- source: .github/workflows/pre-commit.yaml
- source: .github/workflows/pre-commit-optional.yaml
- source: .github/workflows/semantic-pull-request.yaml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/clang-tidy-pr-comments.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
cp /tmp/clang-tidy-result/fixes.yaml fixes.yaml
- name: Run clang-tidy-pr-comments action
uses: platisd/clang-tidy-pr-comments@1.1.6
uses: platisd/clang-tidy-pr-comments@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
clang_tidy_fixes: fixes.yaml
Expand Down
63 changes: 63 additions & 0 deletions .github/workflows/github-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: github-release

on:
push:
branches:
- beta/v*
tags:
- v*
workflow_dispatch:
inputs:
beta-branch-or-tag-name:
type: string
required: true

jobs:
github-release:
runs-on: ubuntu-latest
steps:
- name: Set tag name
id: set-tag-name
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
REF_NAME="${{ github.event.inputs.beta-branch-or-tag-name }}"
else
REF_NAME="${{ github.ref_name }}"
fi
echo ::set-output name=ref-name::"$REF_NAME"
echo ::set-output name=tag-name::"${REF_NAME#beta/}"
- name: Check out repository
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ steps.set-tag-name.outputs.ref-name }}

- name: Set target name for beta branches
id: set-target-name
run: |
if [[ "${{ steps.set-tag-name.outputs.ref-name }}" =~ "beta/" ]]; then
echo ::set-output name=target-name::"${{ steps.set-tag-name.outputs.ref-name }}"
fi
- name: Create a local tag for beta branches
run: |
if [ "${{ steps.set-target-name.outputs.target-name }}" != "" ]; then
git tag "${{ steps.set-tag-name.outputs.tag-name }}"
fi
- name: Run generate-changelog
id: generate-changelog
uses: autowarefoundation/autoware-github-actions/generate-changelog@v1

- name: Release to GitHub
run: |
gh release create "${{ steps.set-tag-name.outputs.tag-name }}" \
--draft \
--target "${{ steps.set-target-name.outputs.target-name }}" \
--title "Release ${{ steps.set-tag-name.outputs.tag-name }}" \
--notes "$NOTES"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NOTES: ${{ steps.generate-changelog.outputs.changelog }}
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,4 @@ repos:
args: [--quiet]
exclude: .cu

exclude: .svg|control/trajectory_follower|control/trajectory_follower_nodes|common/autoware_auto_cmake|common/autoware_auto_common|common/autoware_auto_geometry|common/autoware_auto_tf2|common/autoware_testing|common/fake_test_node|common/had_map_utils|common/motion_common|common/motion_testing|common/time_utils|common/vehicle_constants_manager|common/autoware_auto_perception_rviz_plugin|common/osqp_interface|simulator/simple_planning_simulator|planning/freespace_planner|planning/astar_search|planning/costmap_generator
exclude: .svg
22 changes: 10 additions & 12 deletions common/autoware_auto_cmake/design/autoware_auto_cmake-design.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
autoware_auto_cmake {#autoware-auto-cmake-design}
===========
# autoware_auto_cmake {#autoware-auto-cmake-design}

This is the design document for the `autoware_auto_cmake` package.


# Purpose
## Purpose

Provide common CMake variables and functions to Autoware packages.

Expand All @@ -13,17 +11,17 @@ Those include:
- Setting the language standard
- Getting user-provided variables
- Providing functions to:
+ set compiler flags
+ turn off optimizations
- set compiler flags
- turn off optimizations

# Design
## Design

## Usage
### Usage

Add `autoware_auto_cmake` as a "build_depend" in the dependent packages.

### CMake variables {#cmake-config-variables}
#### CMake variables {#cmake-config-variables}

|Name|Type|Descritpion|Default|
|----|----|-----------|-------|
|`DOWNLOAD_ARTIFACTS`|*BOOL*|Allow downloading artifacts at build time.|`OFF`|
| Name | Type | Descritpion | Default |
| -------------------- | ------ | ------------------------------------------ | ------- |
| `DOWNLOAD_ARTIFACTS` | _BOOL_ | Allow downloading artifacts at build time. | `OFF` |
4 changes: 2 additions & 2 deletions common/autoware_auto_cmake/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@

<build_depend>ros_environment</build_depend>

<buildtool_export_depend>ament_cmake_core</buildtool_export_depend>
<buildtool_export_depend>ament_cmake_lint_cmake</buildtool_export_depend>
<buildtool_export_depend>ament_cmake_copyright</buildtool_export_depend>
<buildtool_export_depend>ament_cmake_core</buildtool_export_depend>
<buildtool_export_depend>ament_cmake_cppcheck</buildtool_export_depend>
<buildtool_export_depend>ament_cmake_cpplint</buildtool_export_depend>
<buildtool_export_depend>ament_cmake_lint_cmake</buildtool_export_depend>
<buildtool_export_depend>ament_cmake_uncrustify</buildtool_export_depend>

<test_depend>ament_cmake_lint_cmake</test_depend>
Expand Down
32 changes: 16 additions & 16 deletions common/autoware_auto_common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ if(BUILD_TESTING)
# Temporarily disable cpplint and uncrustify
list(APPEND AMENT_LINT_AUTO_EXCLUDE
ament_cmake_cpplint
ament_cmake_uncrustify
)

ament_lint_auto_find_test_dependencies()
Expand All @@ -46,27 +45,28 @@ if(BUILD_TESTING)
find_package(ament_cmake_cpplint)
ament_cpplint(${FILES_MINUS_SOME})

# Re-enable uncrustify
find_package(ament_cmake_uncrustify)
ament_uncrustify(${FILES_MINUS_SOME})

# Unit tests
set(TEST_COMMON test_common_gtest)
ament_add_gtest(${TEST_COMMON}
test/gtest_main.cpp
test/test_bool_comparisons.cpp
test/test_byte_reader.cpp
test/test_float_comparisons.cpp
test/test_mahalanobis_distance.cpp
test/test_message_field_adapters.cpp
test/test_template_utils.cpp
test/test_angle_utils.cpp
test/test_type_name.cpp
test/test_type_traits.cpp)
test/gtest_main.cpp
test/test_bool_comparisons.cpp
test/test_byte_reader.cpp
test/test_float_comparisons.cpp
test/test_mahalanobis_distance.cpp
test/test_message_field_adapters.cpp
test/test_template_utils.cpp
test/test_angle_utils.cpp
test/test_type_name.cpp
test/test_type_traits.cpp
)
autoware_set_compile_options(${TEST_COMMON})
target_compile_options(${TEST_COMMON} PRIVATE -Wno-sign-conversion)
target_include_directories(${TEST_COMMON} PRIVATE include)
ament_target_dependencies(${TEST_COMMON} builtin_interfaces Eigen3)
ament_target_dependencies(${TEST_COMMON}
builtin_interfaces
Eigen3
geometry_msgs
)
endif()

# Ament Exporting
Expand Down
17 changes: 8 additions & 9 deletions common/autoware_auto_common/design/comparisons.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Comparisons {#helper-comparisons}
===========
# Comparisons {#helper-comparisons}

The `float_comparisons.hpp` library is a simple set of functions for performing approximate numerical comparisons.
There are separate functions for performing comparisons using absolute bounds and relative bounds. Absolute comparison checks are prefixed with `abs_` and relative checks are prefixed with `rel_`.
Expand All @@ -8,19 +7,19 @@ The `bool_comparisons.hpp` library additionally contains an XOR operator.

The intent of the library is to improve readability of code and reduce likelihood of typographical errors when using numerical and boolean comparisons.

# Target use cases
## Target use cases

The approximate comparisons are intended to be used to check whether two numbers lie within some absolute or relative interval.
The `exclusive_or` function will test whether two values cast to different boolean values.

# Assumptions
## Assumptions

* The approximate comparisons all take an `epsilon` parameter.
The value of this parameter must be >= 0.
* The library is only intended to be used with floating point types.
A static assertion will be thrown if the library is used with a non-floating point type.
- The approximate comparisons all take an `epsilon` parameter.
The value of this parameter must be >= 0.
- The library is only intended to be used with floating point types.
A static assertion will be thrown if the library is used with a non-floating point type.

# Example Usage
## Example Usage

```c++
#include "common/bool_comparisons.hpp"
Expand Down
Loading

0 comments on commit 8278cce

Please sign in to comment.