Skip to content

Commit c775c9b

Browse files
authored
Merge branch 'main' into fix/ignore_spell_check
2 parents d5680f3 + b86a00d commit c775c9b

File tree

42 files changed

+815
-120
lines changed

Some content is hidden

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

42 files changed

+815
-120
lines changed

.github/workflows/build-and-test.yaml

+1-9
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
jobs:
1010
build-and-test:
1111
if: ${{ github.event_name != 'push' || github.ref_name == github.event.repository.default_branch }}
12-
runs-on: ubuntu-latest
12+
runs-on: [self-hosted, linux, X64]
1313
container: ${{ matrix.container }}${{ matrix.container-suffix }}
1414
strategy:
1515
fail-fast: false
@@ -27,14 +27,6 @@ jobs:
2727
- name: Check out repository
2828
uses: actions/checkout@v3
2929

30-
- name: Free disk space (Ubuntu)
31-
uses: jlumbroso/free-disk-space@v1.2.0
32-
with:
33-
tool-cache: false
34-
dotnet: false
35-
swap-storage: false
36-
large-packages: false
37-
3830
- name: Remove exec_depend
3931
uses: autowarefoundation/autoware-github-actions/remove-exec-depend@v1
4032

control/control_validator/src/utils.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@ Trajectory alignTrajectoryWithReferenceTrajectory(
104104

105105
// If first point of predicted_trajectory is in front of start of trajectory, erase points which
106106
// are in front of trajectory start point and insert pNew along the predicted_trajectory
107-
// predicted_trajectory:     p1-----p2-----p3----//------pN
107+
// predicted_trajectory: p1-----p2-----p3----//------pN
108108
// trajectory: t1--------//------tN
109109
//
110-
// predicted_trajectory:      pNew--p3----//------pN
110+
// predicted_trajectory: pNew--p3----//------pN
111111
// trajectory: t1--------//------tN
112112
auto predicted_trajectory_point_removed = removeFrontTrajectoryPoint(
113113
trajectory_points, modified_trajectory_points, predicted_trajectory_points);
@@ -119,7 +119,7 @@ Trajectory alignTrajectoryWithReferenceTrajectory(
119119

120120
// If last point of predicted_trajectory is behind of end of trajectory, erase points which are
121121
// behind trajectory last point and insert pNew along the predicted_trajectory
122-
// predicted_trajectory:     p1-----//------pN-2-----pN-1-----pN
122+
// predicted_trajectory: p1-----//------pN-2-----pN-1-----pN
123123
// trajectory: t1-----//-----tN-1--tN
124124
//
125125
// predicted_trajectory: p1-----//------pN-2-pNew

localization/ndt_scan_matcher/src/map_update_module.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,14 @@ void MapUpdateModule::update_map(const geometry_msgs::msg::Point & position)
7171
if (need_rebuild_) {
7272
ndt_ptr_mutex_->lock();
7373
auto param = ndt_ptr_->getParams();
74+
auto input_source = ndt_ptr_->getInputSource();
7475

7576
ndt_ptr_.reset(new NdtType);
7677

7778
ndt_ptr_->setParams(param);
7879

7980
update_ndt(position, *ndt_ptr_);
81+
ndt_ptr_->setInputSource(input_source);
8082
ndt_ptr_mutex_->unlock();
8183
need_rebuild_ = false;
8284
} else {

perception/compare_map_segmentation/schema/distance_based_compare_map_filter.schema.json

+28-1
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,36 @@
1515
"type": "boolean",
1616
"default": "true",
1717
"description": "map loading mode selection, true for dynamic map loading, false for static map loading, recommended for no-split map pointcloud"
18+
},
19+
"timer_interval_ms": {
20+
"type": "number",
21+
"default": "100",
22+
"description": "Timer interval to load map points [ms]"
23+
},
24+
"map_update_distance_threshold": {
25+
"type": "number",
26+
"default": "10.0",
27+
"description": "Threshold distance to update map points with input points [m]"
28+
},
29+
"map_loader_radius": {
30+
"type": "number",
31+
"default": "150.0",
32+
"description": "Radius to load map points [m]"
33+
},
34+
"publish_debug_pcd": {
35+
"type": "boolean",
36+
"default": "false",
37+
"description": "Publish a downsampled map pointcloud for debugging"
1838
}
1939
},
20-
"required": ["distance_threshold", "use_dynamic_map_loading"],
40+
"required": [
41+
"distance_threshold",
42+
"use_dynamic_map_loading",
43+
"timer_interval_ms",
44+
"map_update_distance_threshold",
45+
"map_loader_radius",
46+
"publish_debug_pcd"
47+
],
2148
"additionalProperties": false
2249
}
2350
},

perception/compare_map_segmentation/schema/voxel_based_approximate_compare_map_filter.schema.json

+29-1
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,37 @@
2020
"type": "number",
2121
"default": "0.5",
2222
"description": "Positive ratio to reduce voxel_leaf_size and neighbor point distance threshold in z axis"
23+
},
24+
"timer_interval_ms": {
25+
"type": "number",
26+
"default": "100",
27+
"description": "Timer interval to load map points [ms]"
28+
},
29+
"map_update_distance_threshold": {
30+
"type": "number",
31+
"default": "10.0",
32+
"description": "Threshold distance to update map points with input points [m]"
33+
},
34+
"map_loader_radius": {
35+
"type": "number",
36+
"default": "150.0",
37+
"description": "Radius to load map points [m]"
38+
},
39+
"publish_debug_pcd": {
40+
"type": "boolean",
41+
"default": "false",
42+
"description": "Publish a downsampled map pointcloud for debugging"
2343
}
2444
},
25-
"required": ["distance_threshold", "use_dynamic_map_loading", "downsize_ratio_z_axis"],
45+
"required": [
46+
"distance_threshold",
47+
"use_dynamic_map_loading",
48+
"downsize_ratio_z_axis",
49+
"timer_interval_ms",
50+
"map_update_distance_threshold",
51+
"map_loader_radius",
52+
"publish_debug_pcd"
53+
],
2654
"additionalProperties": false
2755
}
2856
},

perception/compare_map_segmentation/schema/voxel_based_compare_map_filter.schema.json

+11-5
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@
2121
"default": "0.5",
2222
"description": "Positive ratio to reduce voxel_leaf_size and neighbor point distance threshold in z axis"
2323
},
24+
"timer_interval_ms": {
25+
"type": "number",
26+
"default": "100",
27+
"description": "Timer interval to load map points [ms]"
28+
},
2429
"map_update_distance_threshold": {
2530
"type": "number",
2631
"default": "10.0",
@@ -31,19 +36,20 @@
3136
"default": "150.0",
3237
"description": "Radius to load map points [m]"
3338
},
34-
"timer_interval_ms": {
35-
"type": "number",
36-
"default": "100",
37-
"description": "Timer interval to load map points [ms]"
39+
"publish_debug_pcd": {
40+
"type": "boolean",
41+
"default": "false",
42+
"description": "Publish a downsampled map pointcloud for debugging"
3843
}
3944
},
4045
"required": [
4146
"distance_threshold",
4247
"use_dynamic_map_loading",
4348
"downsize_ratio_z_axis",
49+
"timer_interval_ms",
4450
"map_update_distance_threshold",
4551
"map_loader_radius",
46-
"timer_interval_ms"
52+
"publish_debug_pcd"
4753
],
4854
"additionalProperties": false
4955
}

perception/compare_map_segmentation/schema/voxel_distance_based_compare_map_filter.schema.json

+29-1
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,37 @@
2020
"type": "number",
2121
"default": "0.5",
2222
"description": "Positive ratio to reduce voxel_leaf_size and neighbor point distance threshold in z axis"
23+
},
24+
"timer_interval_ms": {
25+
"type": "number",
26+
"default": "100",
27+
"description": "Timer interval to load map points [ms]"
28+
},
29+
"map_update_distance_threshold": {
30+
"type": "number",
31+
"default": "10.0",
32+
"description": "Threshold distance to update map points with input points [m]"
33+
},
34+
"map_loader_radius": {
35+
"type": "number",
36+
"default": "150.0",
37+
"description": "Radius to load map points [m]"
38+
},
39+
"publish_debug_pcd": {
40+
"type": "boolean",
41+
"default": "false",
42+
"description": "Publish a downsampled map pointcloud for debugging"
2343
}
2444
},
25-
"required": ["distance_threshold", "use_dynamic_map_loading", "downsize_ratio_z_axis"],
45+
"required": [
46+
"distance_threshold",
47+
"use_dynamic_map_loading",
48+
"downsize_ratio_z_axis",
49+
"timer_interval_ms",
50+
"map_update_distance_threshold",
51+
"map_loader_radius",
52+
"publish_debug_pcd"
53+
],
2654
"additionalProperties": false
2755
}
2856
},

perception/map_based_prediction/images/inside_road.svg

+1-1
Loading

perception/multi_object_tracker/include/multi_object_tracker/tracker/model/tracker_base.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class Tracker
7979
const rclcpp::Time & time) const;
8080

8181
/*
82-
* Pure virtual function
82+
* Pure virtual function
8383
*/
8484

8585
protected:

perception/radar_object_tracker/include/radar_object_tracker/tracker/model/tracker_base.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class Tracker
7979
const rclcpp::Time & time) const;
8080

8181
/*
82-
* Pure virtual function
82+
* Pure virtual function
8383
*/
8484

8585
protected:

planning/behavior_path_avoidance_by_lane_change_module/include/behavior_path_avoidance_by_lane_change_module/scene.hpp

+4
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ class AvoidanceByLaneChange : public NormalLaneChange
5454
const AvoidancePlanningData & data, const PredictedObject & object) const;
5555

5656
void fillAvoidanceTargetObjects(AvoidancePlanningData & data, AvoidanceDebugData & debug) const;
57+
58+
double calcMinAvoidanceLength(const ObjectData & nearest_object) const;
59+
double calcMinimumLaneChangeLength() const;
60+
double calcLateralOffset() const;
5761
};
5862
} // namespace behavior_path_planner
5963

planning/behavior_path_avoidance_by_lane_change_module/src/interface.cpp

+2-5
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,9 @@
1616

1717
#include "behavior_path_planner_common/interface/scene_module_interface.hpp"
1818
#include "behavior_path_planner_common/interface/scene_module_visitor.hpp"
19-
#include "behavior_path_planner_common/marker_utils/utils.hpp"
2019

21-
#include <algorithm>
2220
#include <memory>
2321
#include <string>
24-
#include <utility>
25-
#include <vector>
2622

2723
namespace behavior_path_planner
2824
{
@@ -45,7 +41,8 @@ AvoidanceByLaneChangeInterface::AvoidanceByLaneChangeInterface(
4541

4642
bool AvoidanceByLaneChangeInterface::isExecutionRequested() const
4743
{
48-
return module_type_->isLaneChangeRequired() && module_type_->specialRequiredCheck();
44+
return module_type_->isLaneChangeRequired() && module_type_->specialRequiredCheck() &&
45+
module_type_->isValidPath();
4946
}
5047
void AvoidanceByLaneChangeInterface::processOnEntry()
5148
{

planning/behavior_path_avoidance_by_lane_change_module/src/scene.cpp

+55-35
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,21 @@
2020
#include "behavior_path_planner_common/utils/path_utils.hpp"
2121
#include "behavior_path_planner_common/utils/utils.hpp"
2222

23+
#include <behavior_path_avoidance_module/data_structs.hpp>
24+
#include <behavior_path_lane_change_module/utils/utils.hpp>
2325
#include <lanelet2_extension/utility/utilities.hpp>
2426
#include <rclcpp/logging.hpp>
2527

2628
#include <boost/geometry/algorithms/centroid.hpp>
2729
#include <boost/geometry/strategies/cartesian/centroid_bashein_detmer.hpp>
2830

31+
#include <limits>
2932
#include <utility>
3033

3134
namespace behavior_path_planner
3235
{
36+
using behavior_path_planner::utils::lane_change::debug::createExecutionArea;
37+
3338
AvoidanceByLaneChange::AvoidanceByLaneChange(
3439
const std::shared_ptr<LaneChangeParameters> & parameters,
3540
std::shared_ptr<AvoidanceByLCParameters> avoidance_parameters)
@@ -68,44 +73,15 @@ bool AvoidanceByLaneChange::specialRequiredCheck() const
6873
return false;
6974
}
7075

71-
const auto current_lanes = getCurrentLanes();
72-
if (current_lanes.empty()) {
73-
RCLCPP_DEBUG(logger_, "no empty lanes");
74-
return false;
75-
}
76-
7776
const auto & nearest_object = data.target_objects.front();
77+
const auto minimum_avoid_length = calcMinAvoidanceLength(nearest_object);
78+
const auto minimum_lane_change_length = calcMinimumLaneChangeLength();
7879

79-
// get minimum lane change distance
80-
const auto shift_intervals =
81-
getRouteHandler()->getLateralIntervalsToPreferredLane(current_lanes.back(), direction_);
82-
const double minimum_lane_change_length = utils::lane_change::calcMinimumLaneChangeLength(
83-
*lane_change_parameters_, shift_intervals,
84-
lane_change_parameters_->backward_length_buffer_for_end_of_lane);
85-
86-
// get minimum avoid distance
87-
88-
const auto ego_width = getCommonParam().vehicle_width;
89-
const auto nearest_object_type = utils::getHighestProbLabel(nearest_object.object.classification);
90-
const auto nearest_object_parameter =
91-
avoidance_parameters_->object_parameters.at(nearest_object_type);
92-
const auto avoid_margin =
93-
nearest_object_parameter.safety_buffer_lateral * nearest_object.distance_factor +
94-
nearest_object_parameter.avoid_margin_lateral + 0.5 * ego_width;
95-
96-
avoidance_helper_->setData(planner_data_);
97-
const auto shift_length = avoidance_helper_->getShiftLength(
98-
nearest_object, utils::avoidance::isOnRight(nearest_object), avoid_margin);
99-
100-
const auto maximum_avoid_distance = avoidance_helper_->getMaxAvoidanceDistance(shift_length);
101-
102-
RCLCPP_DEBUG(
103-
logger_,
104-
"nearest_object.longitudinal %.3f, minimum_lane_change_length %.3f, maximum_avoid_distance "
105-
"%.3f",
106-
nearest_object.longitudinal, minimum_lane_change_length, maximum_avoid_distance);
80+
lane_change_debug_.execution_area = createExecutionArea(
81+
getCommonParam().vehicle_info, getEgoPose(),
82+
std::max(minimum_lane_change_length, minimum_avoid_length), calcLateralOffset());
10783

108-
return nearest_object.longitudinal > std::max(minimum_lane_change_length, maximum_avoid_distance);
84+
return nearest_object.longitudinal > std::max(minimum_lane_change_length, minimum_avoid_length);
10985
}
11086

11187
bool AvoidanceByLaneChange::specialExpiredCheck() const
@@ -274,4 +250,48 @@ ObjectData AvoidanceByLaneChange::createObjectData(
274250

275251
return object_data;
276252
}
253+
254+
double AvoidanceByLaneChange::calcMinAvoidanceLength(const ObjectData & nearest_object) const
255+
{
256+
const auto ego_width = getCommonParam().vehicle_width;
257+
const auto nearest_object_type = utils::getHighestProbLabel(nearest_object.object.classification);
258+
const auto nearest_object_parameter =
259+
avoidance_parameters_->object_parameters.at(nearest_object_type);
260+
const auto avoid_margin =
261+
nearest_object_parameter.safety_buffer_lateral * nearest_object.distance_factor +
262+
nearest_object_parameter.avoid_margin_lateral + 0.5 * ego_width;
263+
264+
avoidance_helper_->setData(planner_data_);
265+
const auto shift_length = avoidance_helper_->getShiftLength(
266+
nearest_object, utils::avoidance::isOnRight(nearest_object), avoid_margin);
267+
268+
return avoidance_helper_->getMinAvoidanceDistance(shift_length);
269+
}
270+
271+
double AvoidanceByLaneChange::calcMinimumLaneChangeLength() const
272+
{
273+
const auto current_lanes = getCurrentLanes();
274+
if (current_lanes.empty()) {
275+
RCLCPP_DEBUG(logger_, "no empty lanes");
276+
return std::numeric_limits<double>::infinity();
277+
}
278+
279+
// get minimum lane change distance
280+
const auto shift_intervals =
281+
getRouteHandler()->getLateralIntervalsToPreferredLane(current_lanes.back(), direction_);
282+
return utils::lane_change::calcMinimumLaneChangeLength(
283+
*lane_change_parameters_, shift_intervals,
284+
lane_change_parameters_->backward_length_buffer_for_end_of_lane);
285+
}
286+
287+
double AvoidanceByLaneChange::calcLateralOffset() const
288+
{
289+
auto additional_lat_offset{0.0};
290+
for (const auto & [type, p] : avoidance_parameters_->object_parameters) {
291+
const auto offset =
292+
2.0 * p.envelope_buffer_margin + p.safety_buffer_lateral + p.avoid_margin_lateral;
293+
additional_lat_offset = std::max(additional_lat_offset, offset);
294+
}
295+
return additional_lat_offset;
296+
}
277297
} // namespace behavior_path_planner

0 commit comments

Comments
 (0)