Skip to content

Commit

Permalink
Merge branch 'tier4/proposal' into fix/isTurning
Browse files Browse the repository at this point in the history
  • Loading branch information
tkimura4 authored Feb 10, 2022
2 parents 66a1031 + eb599ae commit 65c6778
Show file tree
Hide file tree
Showing 125 changed files with 1,978 additions and 1,586 deletions.
21 changes: 15 additions & 6 deletions .github/sync-files.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,33 @@
- repository: autowarefoundation/autoware
files:
- source: CODE_OF_CONDUCT.md
- source: CONTRIBUTING.md
- source: DISCLAIMER.md
- source: LICENSE
- source: .github/dependabot.yaml
- source: .github/workflows/pre-commit-optional.yaml
- source: .github/workflows/semantic-pull-request.yaml
- source: .github/workflows/spell-check.yaml
- source: .github/workflows/spell-check-differential.yaml
- source: .clang-format
- source: .markdown-link-check.json
- source: .markdownlint.yaml
- source: .pre-commit-config-optional.yaml
- source: .prettierignore
- source: .prettierrc
- source: .prettierrc.yaml
- source: .yamllint.yaml
- source: CPPLINT.cfg
- source: setup.cfg

- repository: autowarefoundation/autoware_common
files:
- source: .github/workflows/automatic-rebase.yaml
- source: .github/workflows/build-and-test-arm.yaml
- source: .github/workflows/build-and-test-arm-pr.yaml
- source: .github/workflows/build-and-test.yaml
- source: .github/workflows/build-and-test-pr.yaml
- source: .github/workflows/build-and-test-differential.yaml
- source: .github/workflows/build-and-test-differential-self-hosted.yaml
- source: .github/workflows/build-and-test-self-hosted.yaml
- source: .github/workflows/check-build-depends.yaml
- source: .github/workflows/pre-commit.yaml

- repository: autowarefoundation/autoware-documentation
files:
- source: .github/workflows/deploy-docs.yaml
- source: .github/workflows/delete-closed-pr-docs.yaml
29 changes: 0 additions & 29 deletions .github/workflows/automatic-rebase.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build-and-test-arm-pr
name: build-and-test-differential-self-hosted

on:
pull_request:
Expand All @@ -14,11 +14,11 @@ jobs:
with:
label: ARM64

build-and-test-arm:
build-and-test-differential-self-hosted:
needs: prevent-no-label-execution
if: ${{ needs.prevent-no-label-execution.outputs.run == 'true' }}
runs-on: [self-hosted, linux, ARM64]
container: ros:galactic
container: ghcr.io/autowarefoundation/autoware-universe:latest
steps:
- name: Check out repository
uses: actions/checkout@v2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: build-and-test-pr
name: build-and-test-differential

on:
pull_request:

jobs:
build-and-test:
build-and-test-differential:
runs-on: ubuntu-latest
container: ros:galactic
container: ghcr.io/autowarefoundation/autoware-universe:latest
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.9.1
Expand Down Expand Up @@ -36,18 +36,27 @@ jobs:
target-packages: ${{ steps.get-modified-packages.outputs.modified-packages }}
build-depends-repos: build_depends.repos

- name: Upload coverage to Codecov
if: ${{ steps.get-modified-packages.outputs.modified-packages != '' }}
- name: Check the existence of coverage files
id: check-file-existence
uses: autowarefoundation/autoware-github-actions/check-file-existence@tier4/proposal
with:
files: |
lcov/total_coverage.info
coveragepy/.coverage
condition: or

- name: Upload coverage to CodeCov
if: ${{ steps.check-file-existence.outputs.exists == 'true' }}
uses: codecov/codecov-action@v2
with:
files: lcov/total_coverage.info,coveragepy/.coverage
fail_ci_if_error: false
verbose: true

clang-tidy:
clang-tidy-differential:
runs-on: ubuntu-latest
container: ros:galactic
needs: build-and-test
needs: build-and-test-differential
steps:
- name: Check out repository
uses: actions/checkout@v2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: build-and-test-arm
name: build-and-test-self-hosted

on:
schedule:
- cron: 0 19 * * * # run at 4 AM JST
workflow_dispatch:

jobs:
build-and-test-arm:
runs-on: ARM64
container: ros:galactic
build-and-test-self-hosted:
runs-on: [self-hosted, linux, ARM64]
container: ghcr.io/autowarefoundation/autoware-universe:latest
steps:
- name: Check out repository
uses: actions/checkout@v2
Expand Down
20 changes: 14 additions & 6 deletions .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@ name: build-and-test

on:
push:
branches:
- main
- tier4/proposal
schedule:
- cron: 0 19 * * * # run at 4 AM JST
workflow_dispatch:

jobs:
build-and-test:
if: ${{ github.event_name != 'push' || github.ref_name == github.event.repository.default_branch }}
runs-on: ubuntu-latest
container: ros:galactic
container: ghcr.io/autowarefoundation/autoware-universe:latest
steps:
- name: Check out repository
uses: actions/checkout@v2
Expand All @@ -36,9 +34,19 @@ jobs:
target-packages: ${{ steps.get-self-packages.outputs.self-packages }}
build-depends-repos: build_depends.repos

- name: Upload coverage to Codecov
- name: Check the existence of coverage files
id: check-file-existence
uses: autowarefoundation/autoware-github-actions/check-file-existence@tier4/proposal
with:
files: |
lcov/total_coverage.info
coveragepy/.coverage
condition: or

- name: Upload coverage to CodeCov
if: ${{ steps.check-file-existence.outputs.exists == 'true' }}
uses: codecov/codecov-action@v2
with:
files: lcov/total_coverage.info,coveragepy/.coverage
fail_ci_if_error: true
fail_ci_if_error: false
verbose: 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 @@ -8,7 +8,7 @@ on:
jobs:
check-build-depends:
runs-on: ubuntu-latest
container: ros:galactic
container: ghcr.io/autowarefoundation/autoware-universe:latest
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.9.1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: spell-check
name: spell-check-differential

on:
pull_request:

jobs:
spell-check:
spell-check-differential:
runs-on: ubuntu-latest
steps:
- name: Check out repository
Expand Down
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ci:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: v4.1.0
hooks:
- id: check-json
- id: check-merge-conflict
Expand All @@ -24,7 +24,7 @@ repos:
args: [-c, .markdownlint.yaml, --fix]

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.5.0
rev: v2.5.1
hooks:
- id: prettier

Expand All @@ -40,12 +40,12 @@ repos:
- id: sort-package-xml

- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.8.0.1
rev: v0.8.0.3
hooks:
- id: shellcheck

- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.4.1-1
rev: v3.4.2-1
hooks:
- id: shfmt
args: [-w, -s, -i=4]
Expand All @@ -56,7 +56,7 @@ repos:
- id: isort

- repo: https://github.com/psf/black
rev: 21.11b1
rev: 22.1.0
hooks:
- id: black
args: [--line-length=100]
Expand All @@ -78,7 +78,7 @@ repos:
]

- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v12.0.1
rev: v13.0.0
hooks:
- id: clang-format

Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*.param.yaml
*.rviz
3 changes: 3 additions & 0 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ ignore: |
*.param.yaml
rules:
braces:
level: error
max-spaces-inside: 1 # To format with Prettier
comments:
level: error
min-spaces-from-content: 1 # To be compatible with C++ and Python
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,9 @@ GoalDistanceCalculatorNode::GoalDistanceCalculatorNode(const rclcpp::NodeOptions
self_pose_listener_.waitForFirstPose();

// Timer
double delta_time = 1.0 / static_cast<double>(node_param_.update_rate);
auto timer_callback_ = std::bind(&GoalDistanceCalculatorNode::onTimer, this);
const auto period_ns =
std::chrono::duration_cast<std::chrono::nanoseconds>(std::chrono::duration<double>(delta_time));
timer_ = std::make_shared<rclcpp::GenericTimer<decltype(timer_callback_)>>(
this->get_clock(), period_ns, std::move(timer_callback_),
this->get_node_base_interface()->get_context());
this->get_node_timers_interface()->add_timer(timer_, nullptr);
const auto period_ns = rclcpp::Rate(node_param_.update_rate).period();
timer_ = rclcpp::create_timer(
this, get_clock(), period_ns, std::bind(&GoalDistanceCalculatorNode::onTimer, this));
goal_distance_calculator_ = std::make_unique<GoalDistanceCalculator>();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ using autoware::common::types::float64_t;
class OSQP_INTERFACE_PUBLIC OSQPInterface
{
private:
OSQPWorkspace * m_work = nullptr;
std::unique_ptr<OSQPWorkspace, std::function<void(OSQPWorkspace *)>> m_work;
std::unique_ptr<OSQPSettings> m_settings;
std::unique_ptr<OSQPData> m_data;
// store last work info since work is cleaned up at every execution to prevent memory leak.
Expand All @@ -59,6 +59,8 @@ class OSQP_INTERFACE_PUBLIC OSQPInterface
// Runs the solver on the stored problem.
std::tuple<std::vector<float64_t>, std::vector<float64_t>, int64_t, int64_t> solve();

static void OSQPWorkspaceDeleter(OSQPWorkspace * ptr) noexcept;

public:
/// \brief Constructor without problem formulation
explicit OSQPInterface(
Expand All @@ -73,12 +75,11 @@ class OSQP_INTERFACE_PUBLIC OSQPInterface
OSQPInterface(
const Eigen::MatrixXd & P, const Eigen::MatrixXd & A, const std::vector<float64_t> & q,
const std::vector<float64_t> & l, const std::vector<float64_t> & u, const c_float eps_abs);
~OSQPInterface();

/****************
* OPTIMIZATION
****************/
/// \brief Solves the stored convec quadratic program (QP) problem using the OSQP solver.
/// \brief Solves the stored convex quadratic program (QP) problem using the OSQP solver.
//
/// \return The function returns a tuple containing the solution as two float vectors.
/// \return The first element of the tuple contains the 'primal' solution.
Expand Down
Loading

0 comments on commit 65c6778

Please sign in to comment.