forked from AutomotiveAIChallenge/aichallenge-2024
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into sync-upstream
- Loading branch information
Showing
13 changed files
with
405 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
{ | ||
"ignorePaths": [ | ||
"**/*.bash", | ||
"**/*.cspell.json", | ||
"**/*.dae", | ||
"**/*.html", | ||
"**/*.mp3", | ||
"**/*.mp4", | ||
"**/*.pcd", | ||
"**/*.rviz", | ||
"**/*.sh", | ||
"**/*.stl", | ||
"**/*.svg", | ||
"**/*.wav", | ||
"**/*.zip", | ||
"**/.git/**", | ||
"**/.gitignore", | ||
"**/.vscode/**", | ||
"**/build/**", | ||
"**/CHANGELOG.rst", | ||
"**/.clang-format", | ||
"**/CPPLINT.cfg", | ||
"**/Doxyfile", | ||
"**/install/**", | ||
"**/log/**", | ||
"**/package-lock.json" | ||
], | ||
"ignoreRegExpList": [ | ||
"\\[.*/.*\\]\\(https://github.com", | ||
"Copyright .*[0-9]{4}.+", | ||
"github.com[/:][\\w._\\-]+(/[\\w._\\-]+)?", | ||
"ppa:.+/[^\\s]+", | ||
"@[a-zA-Z0-9](?:[a-zA-Z0-9]|-(?=[a-zA-Z0-9])){0,38}" | ||
], | ||
"overrides": [ | ||
{ | ||
"filename": "**/*.yaml", | ||
"ignoreRegExpList": ["author: .+$", "git_email: .+$", "git_user: .+$", "uses: .+$"] | ||
}, | ||
{ | ||
"filename": "**/package.xml", | ||
"ignoreRegExpList": ["<author.*?</author>", "<maintainer.*?</maintainer>"] | ||
}, | ||
{ | ||
"filename": "**/{*.cpp,*.hpp}", | ||
"ignoreRegExpList": ["@author .*$", "[\\@]tparam", "\\author .*$", "Author(s)?( )?: .*$", "TODO\\((.*?)\\)"] | ||
} | ||
], | ||
"words": [ | ||
"ackermann", | ||
"adapi", | ||
"aichallenge", | ||
"autocompute", | ||
"automotiveaichallenge", | ||
"autoware", | ||
"awsim", | ||
"booars", | ||
"buildtool", | ||
"colcon", | ||
"costmap", | ||
"cuda", | ||
"cyclonedds", | ||
"dallara", | ||
"dcmake", | ||
"distro", | ||
"downsample", | ||
"freespace", | ||
"gnss", | ||
"gnucxx", | ||
"gtest", | ||
"initialpose", | ||
"lanechange", | ||
"lanefollowing", | ||
"lanelet", | ||
"lanelets", | ||
"libgazebo", | ||
"libgl", | ||
"linalg", | ||
"lowpass", | ||
"mapfile", | ||
"mathcal", | ||
"mgrs", | ||
"odometry", | ||
"osrf", | ||
"pitstop", | ||
"pointcloud", | ||
"rclcpp", | ||
"rclpy", | ||
"rcutils", | ||
"rgba", | ||
"rois", | ||
"rosdep", | ||
"rosdistro", | ||
"rviz", | ||
"schematypens", | ||
"sideshift", | ||
"srvs", | ||
"stddev", | ||
"traj", | ||
"urdf", | ||
"velodyne", | ||
"wextra", | ||
"wmctrl", | ||
"wpedantic", | ||
"xacro", | ||
"xyzrpy", | ||
"zcvf" | ||
] | ||
} |
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
aichallenge/workspace/src/aichallenge_submit/aichallenge_submit_launch/** @booars/aic2024-developers | ||
aichallenge/workspace/src/aichallenge_submit/booars_utils/** @Autumn60 | ||
aichallenge/workspace/src/aichallenge_submit/goal_pose_setter/** @hrjp | ||
aichallenge/workspace/src/aichallenge_submit/gyro_odometer/** @booars/aic2024-developers | ||
aichallenge/workspace/src/aichallenge_submit/imu_corrector/** @booars/aic2024-developers | ||
aichallenge/workspace/src/aichallenge_submit/imu_gnss_poser/** @booars/aic2024-developers | ||
aichallenge/workspace/src/aichallenge_submit/path_to_trajectory/** @booars/aic2024-developers | ||
aichallenge/workspace/src/aichallenge_submit/racing_kart_description/** @Autumn60 | ||
aichallenge/workspace/src/aichallenge_submit/racing_kart_sensor_kit_description/** @booars/aic2024-developers | ||
aichallenge/workspace/src/aichallenge_submit/simple_pure_pursuit/** @sitahara | ||
aichallenge/workspace/src/aichallenge_system/aichallenge_system_launch/** @booars/aic2024-developers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: spell-check-differential | ||
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
spell-check-differential: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Run spell check | ||
uses: streetsidesoftware/cspell-action@v6 | ||
with: | ||
config: .cspell.json | ||
incremental_files_only: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: spell-check | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
spell-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Run spell check | ||
uses: streetsidesoftware/cspell-action@v6 | ||
with: | ||
config: .cspell.json | ||
incremental_files_only: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: sync-upstream | ||
|
||
on: | ||
schedule: | ||
- cron: 0 0 * * * | ||
workflow_dispatch: | ||
|
||
jobs: | ||
sync-upstream: | ||
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 sync-branches | ||
uses: autowarefoundation/autoware-github-actions/sync-branches@v1 | ||
with: | ||
token: ${{ steps.generate-token.outputs.token }} | ||
base-branch: main | ||
sync-pr-branch: sync-upstream | ||
sync-target-repository: https://github.com/AutomotiveAIChallenge/aichallenge-2024.git | ||
sync-target-branch: main | ||
pr-title: "chore: sync upstream" | ||
pr-labels: | | ||
bot | ||
sync-upstream | ||
auto-merge-method: merge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Modified from https://github.com/ament/ament_lint/blob/master/ament_clang_format/ament_clang_format/configuration/.clang-format | ||
Language: Cpp | ||
BasedOnStyle: Google | ||
|
||
AccessModifierOffset: -2 | ||
AlignAfterOpenBracket: AlwaysBreak | ||
AllowShortFunctionsOnASingleLine: InlineOnly | ||
BraceWrapping: | ||
AfterClass: true | ||
AfterFunction: true | ||
AfterNamespace: true | ||
AfterStruct: true | ||
BreakBeforeBraces: Custom | ||
ColumnLimit: 100 | ||
ConstructorInitializerIndentWidth: 0 | ||
ContinuationIndentWidth: 2 | ||
DerivePointerAlignment: false | ||
PointerAlignment: Middle | ||
ReflowComments: true | ||
IncludeCategories: | ||
# C++ system headers | ||
- Regex: <[a-z_]*> | ||
Priority: 6 | ||
CaseSensitive: true | ||
# C system headers | ||
- Regex: <.*\.h> | ||
Priority: 5 | ||
CaseSensitive: true | ||
# Boost headers | ||
- Regex: boost/.* | ||
Priority: 4 | ||
CaseSensitive: true | ||
# Message headers | ||
- Regex: .*_msgs/.* | ||
Priority: 3 | ||
CaseSensitive: true | ||
- Regex: .*_srvs/.* | ||
Priority: 3 | ||
CaseSensitive: true | ||
# Other Package headers | ||
- Regex: <.*> | ||
Priority: 2 | ||
CaseSensitive: true | ||
# Local package headers | ||
- Regex: '".*"' | ||
Priority: 1 | ||
CaseSensitive: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
/build | ||
/install | ||
/log | ||
|
||
.vscode | ||
*.code-workspace |
19 changes: 19 additions & 0 deletions
19
aichallenge/workspace/src/aichallenge_submit/booars_utils/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
cmake_minimum_required(VERSION 3.5) | ||
project(booars_utils) | ||
|
||
if(NOT CMAKE_CXX_STANDARD) | ||
set(CMAKE_CXX_STANDARD 17) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
set(CMAKE_CXX_EXTENSIONS OFF) | ||
endif() | ||
|
||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
add_compile_options(-Wall -Wextra -Wpedantic) | ||
endif() | ||
|
||
find_package(ament_cmake_auto REQUIRED) | ||
ament_auto_find_build_dependencies() | ||
|
||
include_directories(include) | ||
|
||
ament_auto_package() |
52 changes: 52 additions & 0 deletions
52
...workspace/src/aichallenge_submit/booars_utils/include/booars_utils/ros/function_timer.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// Copyright 2024 Booars | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#ifndef BOOARS_UTILS__ROS__FUNCTION_TIMER_HPP_ | ||
#define BOOARS_UTILS__ROS__FUNCTION_TIMER_HPP_ | ||
|
||
#include <memory> | ||
#include <rclcpp/rclcpp.hpp> | ||
#include <utility> | ||
|
||
namespace booars_utils::ros { | ||
|
||
class FunctionTimer { | ||
private: | ||
rclcpp::TimerBase::SharedPtr timer_; | ||
|
||
public: | ||
using SharedPtr = std::shared_ptr<FunctionTimer>; | ||
|
||
static SharedPtr create_function_timer(rclcpp::Node* node, | ||
const double update_rate_hz, | ||
std::function<void()> callback) { | ||
return std::make_shared<FunctionTimer>(node, update_rate_hz, callback); | ||
} | ||
|
||
explicit FunctionTimer(rclcpp::Node* node, const double update_rate_hz, | ||
std::function<void()> callback) { | ||
const double dt = 1.0 / update_rate_hz; | ||
|
||
auto period = std::chrono::duration_cast<std::chrono::nanoseconds>( | ||
std::chrono::duration<double>(dt)); | ||
timer_ = std::make_shared<rclcpp::GenericTimer<decltype(callback)>>( | ||
node->get_clock(), period, std::move(callback), | ||
node->get_node_base_interface()->get_context()); | ||
node->get_node_timers_interface()->add_timer(timer_, nullptr); | ||
} | ||
}; | ||
|
||
} // namespace booars_utils::ros | ||
|
||
#endif // BOOARS_UTILS__ROS__FUNCTION_TIMER_HPP_ |
20 changes: 20 additions & 0 deletions
20
aichallenge/workspace/src/aichallenge_submit/booars_utils/package.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0"?> | ||
<?xml-model href="http://download.ros.org/schema/package_format2.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?> | ||
<package format="3"> | ||
<name>booars_utils</name> | ||
<version>0.1.0</version> | ||
<description>The booars_utils package</description> | ||
<maintainer email="[email protected]">Akiro Harada</maintainer> | ||
|
||
<license>Apache 2</license> | ||
|
||
<buildtool_depend>ament_cmake_auto</buildtool_depend> | ||
|
||
<depend>rclcpp</depend> | ||
|
||
<test_depend>ament_lint_auto</test_depend> | ||
|
||
<export> | ||
<build_type>ament_cmake</build_type> | ||
</export> | ||
</package> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.