Skip to content

Commit e38d87a

Browse files
authored
Merge branch 'main' into yolov10
2 parents 4381b95 + 70f5cef commit e38d87a

File tree

241 files changed

+5537
-7964
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

241 files changed

+5537
-7964
lines changed

.github/CODEOWNERS

+3-4
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ common/autoware_auto_common/** opensource@apex.ai satoshi.ota@tier4.jp shumpei.w
44
common/autoware_component_interface_specs_universe/** isamu.takagi@tier4.jp yukihiro.saito@tier4.jp
55
common/autoware_component_interface_tools/** isamu.takagi@tier4.jp
66
common/autoware_component_interface_utils/** isamu.takagi@tier4.jp yukihiro.saito@tier4.jp
7+
common/autoware_cuda_dependency_meta/** esteve.fernandez@tier4.jp
78
common/autoware_fake_test_node/** opensource@apex.ai satoshi.ota@tier4.jp shumpei.wakabayashi@tier4.jp tomoya.kimura@tier4.jp
89
common/autoware_global_parameter_loader/** ryohsuke.mitsudome@tier4.jp
910
common/autoware_glog_component/** takamasa.horibe@tier4.jp
1011
common/autoware_goal_distance_calculator/** taiki.tanaka@tier4.jp
1112
common/autoware_grid_map_utils/** maxime.clement@tier4.jp
12-
common/autoware_object_recognition_utils/** takayuki.murooka@tier4.jp yoshi.ri@tier4.jp
1313
common/autoware_path_distance_calculator/** isamu.takagi@tier4.jp
1414
common/autoware_polar_grid/** yukihiro.saito@tier4.jp
1515
common/autoware_signal_processing/** ali.boyali@tier4.jp fumiya.watanabe@tier4.jp kyoichi.sugahara@tier4.jp takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp
@@ -25,7 +25,7 @@ control/autoware_control_validator/** kyoichi.sugahara@tier4.jp makoto.kurihara@
2525
control/autoware_external_cmd_selector/** fumiya.watanabe@tier4.jp satoshi.ota@tier4.jp shumpei.wakabayashi@tier4.jp taiki.tanaka@tier4.jp takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp tomoya.kimura@tier4.jp
2626
control/autoware_joy_controller/** fumiya.watanabe@tier4.jp satoshi.ota@tier4.jp shumpei.wakabayashi@tier4.jp taiki.tanaka@tier4.jp takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp tomoya.kimura@tier4.jp
2727
control/autoware_lane_departure_checker/** kyoichi.sugahara@tier4.jp makoto.kurihara@tier4.jp zulfaqar.azmi@tier4.jp
28-
control/autoware_mpc_lateral_controller/** kyoichi.sugahara@tier4.jp takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp
28+
control/autoware_mpc_lateral_controller/** alqudah.mohammad@tier4.jp kyoichi.sugahara@tier4.jp takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp
2929
control/autoware_obstacle_collision_checker/** fumiya.watanabe@tier4.jp satoshi.ota@tier4.jp shumpei.wakabayashi@tier4.jp taiki.tanaka@tier4.jp takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp tomoya.kimura@tier4.jp
3030
control/autoware_operation_mode_transition_manager/** takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp tomoya.kimura@tier4.jp
3131
control/autoware_pid_longitudinal_controller/** mamoru.sobue@tier4.jp takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp yuki.takagi@tier4.jp
@@ -128,7 +128,6 @@ planning/autoware_obstacle_cruise_planner/** berkay@leodrive.ai kosuke.takeuchi@
128128
planning/autoware_obstacle_stop_planner/** berkay@leodrive.ai bnk@leodrive.ai satoshi.ota@tier4.jp shumpei.wakabayashi@tier4.jp taiki.tanaka@tier4.jp tomoya.kimura@tier4.jp
129129
planning/autoware_path_optimizer/** kosuke.takeuchi@tier4.jp takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp
130130
planning/autoware_path_smoother/** maxime.clement@tier4.jp takayuki.murooka@tier4.jp
131-
planning/autoware_planning_factor_interface/** mamoru.sobue@tier4.jp satoshi.ota@tier4.jp
132131
planning/autoware_planning_topic_converter/** kosuke.takeuchi@tier4.jp satoshi.ota@tier4.jp shumpei.wakabayashi@tier4.jp
133132
planning/autoware_planning_validator/** kosuke.takeuchi@tier4.jp takamasa.horibe@tier4.jp
134133
planning/autoware_remaining_distance_time_calculator/** ahmed.ebrahim@leodrive.ai
@@ -206,7 +205,7 @@ system/autoware_default_adapi_helpers/autoware_automatic_pose_initializer/** isa
206205
system/autoware_diagnostic_graph_aggregator/** isamu.takagi@tier4.jp junya.sasaki@tier4.jp
207206
system/autoware_diagnostic_graph_utils/** isamu.takagi@tier4.jp junya.sasaki@tier4.jp
208207
system/autoware_dummy_diag_publisher/** fumihito.ito@tier4.jp tetsuhiro.kawaguchi@tier4.jp
209-
system/autoware_dummy_infrastructure/** junya.sasaki@tier4.jp ryohsuke.mitsudome@tier4.jp
208+
system/autoware_dummy_infrastructure/** akihisa.nagata@tier4.jp junya.sasaki@tier4.jp kosuke.takeuchi@tier4.jp ryohsuke.mitsudome@tier4.jp takeshi.miura@tier4.jp
210209
system/autoware_duplicated_node_checker/** junya.sasaki@tier4.jp mamoru.sobue@tier4.jp shumpei.wakabayashi@tier4.jp uken.ryu@tier4.jp
211210
system/autoware_hazard_status_converter/** isamu.takagi@tier4.jp junya.sasaki@tier4.jp
212211
system/autoware_mrm_comfortable_stop_operator/** junya.sasaki@tier4.jp makoto.kurihara@tier4.jp tomohito.ando@tier4.jp
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
name: build-and-test-packages-above-differential
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
container:
7+
required: true
8+
type: string
9+
runner:
10+
default: ubuntu-24.04
11+
required: false
12+
type: string
13+
rosdistro:
14+
default: humble
15+
required: false
16+
type: string
17+
run-condition:
18+
default: true
19+
required: false
20+
type: boolean
21+
container-suffix:
22+
required: false
23+
default: ""
24+
type: string
25+
build-pre-command:
26+
required: false
27+
default: ""
28+
type: string
29+
secrets:
30+
codecov-token:
31+
required: true
32+
33+
env:
34+
CC: /usr/lib/ccache/gcc
35+
CXX: /usr/lib/ccache/g++
36+
37+
jobs:
38+
build-and-test-packages-above-differential:
39+
if: ${{ inputs.run-condition }}
40+
runs-on: ${{ inputs.runner }}
41+
container: ${{ inputs.container }}${{ inputs.container-suffix }}
42+
steps:
43+
- name: Set PR fetch depth
44+
run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> "${GITHUB_ENV}"
45+
shell: bash
46+
47+
- name: Checkout PR branch and all PR commits
48+
uses: actions/checkout@v4
49+
with:
50+
ref: ${{ github.event.pull_request.head.sha }}
51+
fetch-depth: ${{ env.PR_FETCH_DEPTH }}
52+
53+
- name: Show disk space before the tasks
54+
run: df -h
55+
shell: bash
56+
57+
- name: Show machine specs
58+
run: lscpu && free -h
59+
shell: bash
60+
61+
- name: Remove exec_depend
62+
uses: autowarefoundation/autoware-github-actions/remove-exec-depend@v1
63+
64+
- name: Get modified packages
65+
id: get-modified-packages
66+
uses: autowarefoundation/autoware-github-actions/get-modified-packages@v1
67+
68+
- name: Create ccache directory
69+
run: |
70+
mkdir -p ${CCACHE_DIR}
71+
du -sh ${CCACHE_DIR} && ccache -s
72+
shell: bash
73+
74+
- name: Attempt to restore ccache
75+
uses: actions/cache/restore@v4
76+
with:
77+
path: |
78+
/root/.ccache
79+
key: ccache-main-${{ runner.arch }}-${{ inputs.rosdistro }}-${{ github.event.pull_request.base.sha }}
80+
restore-keys: |
81+
ccache-main-${{ runner.arch }}-${{ inputs.rosdistro }}-
82+
83+
- name: Show ccache stats before build and reset stats
84+
run: |
85+
du -sh ${CCACHE_DIR} && ccache -s
86+
ccache --zero-stats
87+
shell: bash
88+
89+
- name: Export CUDA state as a variable for adding to cache key
90+
run: |
91+
build_type_cuda_state=nocuda
92+
if [[ "${{ inputs.container-suffix }}" == "-cuda" ]]; then
93+
build_type_cuda_state=cuda
94+
fi
95+
echo "BUILD_TYPE_CUDA_STATE=$build_type_cuda_state" >> "${GITHUB_ENV}"
96+
echo "::notice::BUILD_TYPE_CUDA_STATE=$build_type_cuda_state"
97+
shell: bash
98+
99+
- name: Prepare build_depends.repos file (main branch)
100+
if: ${{ github.event.pull_request.base.ref == 'main' }}
101+
uses: ./.github/actions/combine-repos-action
102+
with:
103+
base_file: build_depends_humble.repos
104+
overlay_file: build_depends_nightly.repos
105+
output_file: build_depends.repos
106+
107+
- name: Prepare build_depends.repos file (humble branch)
108+
if: ${{ github.event.pull_request.base.ref == 'humble' }}
109+
run: cp build_depends_humble.repos build_depends.repos
110+
shell: bash
111+
112+
- name: Build
113+
if: ${{ steps.get-modified-packages.outputs.modified-packages != '' }}
114+
uses: autowarefoundation/autoware-github-actions/colcon-build@v1
115+
with:
116+
rosdistro: ${{ inputs.rosdistro }}
117+
target-packages: ${{ steps.get-modified-packages.outputs.modified-packages }}
118+
build-depends-repos: build_depends.repos
119+
packages-above-repos: packages_above.repos
120+
cache-key-element: ${{ env.BUILD_TYPE_CUDA_STATE }}
121+
build-pre-command: ${{ inputs.build-pre-command }}
122+
123+
- name: Show ccache stats after build
124+
run: du -sh ${CCACHE_DIR} && ccache -s
125+
shell: bash
126+
127+
- name: Test
128+
id: test
129+
if: ${{ steps.get-modified-packages.outputs.modified-packages != '' }}
130+
uses: autowarefoundation/autoware-github-actions/colcon-test@v1
131+
with:
132+
rosdistro: ${{ inputs.rosdistro }}
133+
target-packages: ${{ steps.get-modified-packages.outputs.modified-packages }}
134+
build-depends-repos: build_depends.repos
135+
packages-above-repos: packages_above.repos
136+
137+
- name: Upload coverage to CodeCov
138+
if: ${{ steps.test.outputs.coverage-report-files != '' }}
139+
uses: codecov/codecov-action@v4
140+
with:
141+
files: ${{ steps.test.outputs.coverage-report-files }}
142+
fail_ci_if_error: false
143+
verbose: true
144+
flags: differential${{ inputs.container-suffix }}
145+
token: ${{ secrets.codecov-token }}
146+
147+
- name: Show disk space after the tasks
148+
run: df -h
149+
shell: bash

.github/workflows/build-test-tidy-pr.yaml

+11
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,17 @@ jobs:
5050
secrets:
5151
codecov-token: ${{ secrets.CODECOV_TOKEN }}
5252

53+
build-and-test-packages-above-differential:
54+
if: ${{ always() }}
55+
needs:
56+
- require-label
57+
uses: ./.github/workflows/build-and-test-packages-above-differential.yaml
58+
with:
59+
container: ghcr.io/autowarefoundation/autoware:universe-devel
60+
run-condition: ${{ needs.require-label.outputs.result == 'true' }}
61+
secrets:
62+
codecov-token: ${{ secrets.CODECOV_TOKEN }}
63+
5364
build-and-test-differential-cuda:
5465
if: ${{ always() }}
5566
needs: check-if-cuda-job-is-needed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
cmake_minimum_required(VERSION 3.8)
2+
project(autoware_cuda_dependency_meta NONE)
3+
4+
find_package(ament_cmake REQUIRED)
5+
6+
ament_package()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# autoware_cuda_dependency_meta
2+
3+
## Purpose
4+
5+
This is a virtual package that packages on Autoware.universe that use CUDA must depend on.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0"?>
2+
<package format="3">
3+
<name>autoware_cuda_dependency_meta</name>
4+
<version>0.0.1</version>
5+
<description>Virtual package that provides an empty cuda stub package</description>
6+
7+
<author email="esteve.fernandez@tier4.jp">Esteve Fernandez</author>
8+
<maintainer email="esteve.fernandez@tier4.jp">Esteve Fernandez</maintainer>
9+
10+
<license>Apache License 2.0</license>
11+
12+
<buildtool_depend>ament_cmake</buildtool_depend>
13+
14+
<export>
15+
<build_type>ament_cmake</build_type>
16+
</export>
17+
</package>

common/autoware_goal_distance_calculator/launch/goal_distance_calculator.launch.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<launch>
2-
<arg name="config_file" default="$(find-pkg-share goal_distance_calculator)/config/goal_distance_calculator.param.yaml"/>
2+
<arg name="config_file" default="$(find-pkg-share autoware_goal_distance_calculator)/config/goal_distance_calculator.param.yaml"/>
33
<node pkg="autoware_goal_distance_calculator" exec="autoware_goal_distance_calculator_node" name="autoware_goal_distance_calculator" output="screen">
44
<param from="$(var config_file)"/>
55
</node>

common/autoware_universe_utils/src/geometry/alt_geometry.cpp

+34-30
Original file line numberDiff line numberDiff line change
@@ -263,28 +263,30 @@ bool covered_by(const alt::Point2d & point, const alt::ConvexPolygon2d & poly)
263263
return false;
264264
}
265265

266-
double cross;
267266
for (auto it = vertices.cbegin(); it != std::prev(vertices.cend()); ++it) {
268267
const auto & p1 = *it;
269268
const auto & p2 = *std::next(it);
270269

271-
if (p1.y() <= point.y() && p2.y() >= point.y()) { // upward edge
272-
cross = (p2 - p1).cross(point - p1);
273-
if (cross > 0) { // point is to the left of edge
274-
winding_number++;
275-
continue;
276-
}
277-
} else if (p1.y() >= point.y() && p2.y() <= point.y()) { // downward edge
278-
cross = (p2 - p1).cross(point - p1);
279-
if (cross < 0) { // point is to the left of edge
280-
winding_number--;
281-
continue;
282-
}
283-
} else {
270+
const auto is_upward_edge = p1.y() <= point.y() && p2.y() >= point.y();
271+
const auto is_downward_edge = p1.y() >= point.y() && p2.y() <= point.y();
272+
273+
if (!is_upward_edge && !is_downward_edge) {
274+
continue;
275+
}
276+
277+
const auto start_vec = point - p1;
278+
const auto end_vec = point - p2;
279+
const auto cross = start_vec.cross(end_vec);
280+
281+
if (is_upward_edge && cross > 0) { // point is to the left of edge
282+
winding_number++;
283+
continue;
284+
} else if (is_downward_edge && cross < 0) { // point is to the left of edge
285+
winding_number--;
284286
continue;
285287
}
286288

287-
if (std::abs(cross) < epsilon) { // point is on edge
289+
if (std::abs(cross) < epsilon && start_vec.dot(end_vec) <= 0.) { // point is on edge
288290
return true;
289291
}
290292
}
@@ -600,28 +602,30 @@ bool within(const alt::Point2d & point, const alt::ConvexPolygon2d & poly)
600602
return false;
601603
}
602604

603-
double cross;
604605
for (auto it = vertices.cbegin(); it != std::prev(vertices.cend()); ++it) {
605606
const auto & p1 = *it;
606607
const auto & p2 = *std::next(it);
607608

608-
if (p1.y() < point.y() && p2.y() > point.y()) { // upward edge
609-
cross = (p2 - p1).cross(point - p1);
610-
if (cross > 0) { // point is to the left of edge
611-
winding_number++;
612-
continue;
613-
}
614-
} else if (p1.y() > point.y() && p2.y() < point.y()) { // downward edge
615-
cross = (p2 - p1).cross(point - p1);
616-
if (cross < 0) { // point is to the left of edge
617-
winding_number--;
618-
continue;
619-
}
620-
} else {
609+
const auto is_upward_edge = p1.y() < point.y() && p2.y() > point.y();
610+
const auto is_downward_edge = p1.y() > point.y() && p2.y() < point.y();
611+
612+
if (!is_upward_edge && !is_downward_edge) {
613+
continue;
614+
}
615+
616+
const auto start_vec = point - p1;
617+
const auto end_vec = point - p2;
618+
const auto cross = start_vec.cross(end_vec);
619+
620+
if (is_upward_edge && cross > 0) { // point is to the left of edge
621+
winding_number++;
622+
continue;
623+
} else if (is_downward_edge && cross < 0) { // point is to the left of edge
624+
winding_number--;
621625
continue;
622626
}
623627

624-
if (std::abs(cross) < epsilon) { // point is on edge
628+
if (std::abs(cross) < epsilon && start_vec.dot(end_vec) <= 0.) { // point is on edge
625629
return false;
626630
}
627631
}

common/autoware_universe_utils/test/src/geometry/test_alt_geometry.cpp

+22
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,17 @@ TEST(alt_geometry, coveredBy)
164164

165165
EXPECT_TRUE(result);
166166
}
167+
168+
{ // The point is on the extended line of an edge of the polygon
169+
const Point2d point = {0.0, 0.0};
170+
const Point2d p1 = {3.0, 0.0};
171+
const Point2d p2 = {3.0, 1.0};
172+
const Point2d p3 = {4.0, 1.0};
173+
const Point2d p4 = {4.0, 0.0};
174+
const auto result = covered_by(point, ConvexPolygon2d::create({p1, p2, p3, p4}).value());
175+
176+
EXPECT_FALSE(result);
177+
}
167178
}
168179

169180
TEST(alt_geometry, disjoint)
@@ -674,6 +685,17 @@ TEST(alt_geometry, within)
674685
EXPECT_FALSE(result);
675686
}
676687

688+
{ // The point is on the extended line of an edge of the polygon
689+
const Point2d point = {0.0, 0.0};
690+
const Point2d p1 = {3.0, 0.0};
691+
const Point2d p2 = {3.0, 1.0};
692+
const Point2d p3 = {4.0, 1.0};
693+
const Point2d p4 = {4.0, 0.0};
694+
const auto result = within(point, ConvexPolygon2d::create({p1, p2, p3, p4}).value());
695+
696+
EXPECT_FALSE(result);
697+
}
698+
677699
{ // One polygon is within the other
678700
const Point2d p1 = {1.0, 1.0};
679701
const Point2d p2 = {1.0, -1.0};

control/autoware_control_validator/README.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,10 @@ The following parameters can be set for the `control_validator`:
5757

5858
The input trajectory is detected as invalid if the index exceeds the following thresholds.
5959

60-
| Name | Type | Description | Default value |
61-
| :---------------------------------- | :----- | :---------------------------------------------------------------------------------------------------------- | :------------ |
62-
| `thresholds.max_distance_deviation` | double | invalid threshold of the max distance deviation between the predicted path and the reference trajectory [m] | 1.0 |
63-
| `thresholds.rolling_back_velocity` | double | threshold velocity to valid the vehicle velocity [m/s] | 0.5 |
64-
| `thresholds.over_velocity_offset` | double | threshold velocity offset to valid the vehicle velocity [m/s] | 2.0 |
65-
| `thresholds.over_velocity_ratio` | double | threshold ratio to valid the vehicle velocity [*] | 0.2 |
60+
| Name | Type | Description | Default value |
61+
| :----------------------------------- | :----- | :---------------------------------------------------------------------------------------------------------- | :------------ |
62+
| `thresholds.max_distance_deviation` | double | invalid threshold of the max distance deviation between the predicted path and the reference trajectory [m] | 1.0 |
63+
| `thresholds.rolling_back_velocity` | double | threshold velocity to valid the vehicle velocity [m/s] | 0.5 |
64+
| `thresholds.over_velocity_offset` | double | threshold velocity offset to valid the vehicle velocity [m/s] | 2.0 |
65+
| `thresholds.over_velocity_ratio` | double | threshold ratio to valid the vehicle velocity [*] | 0.2 |
66+
| `thresholds.overrun_stop_point_dist` | double | threshold distance to overrun stop point [m] | 0.8 |

control/autoware_control_validator/config/control_validator.param.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
rolling_back_velocity: 0.5
1313
over_velocity_offset: 2.0
1414
over_velocity_ratio: 0.2
15+
overrun_stop_point_dist: 0.8
16+
nominal_latency: 0.01
1517

1618
vel_lpf_gain: 0.9 # Time constant 0.33
1719
hold_velocity_error_until_stop: true

0 commit comments

Comments
 (0)