Skip to content

Commit b2f138d

Browse files
committed
merge branch main into autoware_msg
Signed-off-by: liu cui <cynthia.liu@autocore.ai>
2 parents 0f894d7 + 7f368a2 commit b2f138d

File tree

112 files changed

+4970
-1069
lines changed

Some content is hidden

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

112 files changed

+4970
-1069
lines changed

build_depends.repos

-5
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,3 @@ repositories:
4141
type: git
4242
url: https://github.com/MORAI-Autonomous/MORAI-ROS2_morai_msgs.git
4343
version: main
44-
#vehicle
45-
vehicle/sample_vehicle_launch:
46-
type: git
47-
url: https://github.com/autowarefoundation/sample_vehicle_launch.git
48-
version: main

common/global_parameter_loader/CMakeLists.txt

-5
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@ project(global_parameter_loader)
44
find_package(autoware_cmake REQUIRED)
55
autoware_package()
66

7-
if(BUILD_TESTING)
8-
file(GLOB_RECURSE test_files test/*.cpp)
9-
ament_add_ros_isolated_gtest(test_global_params_launch ${test_files})
10-
endif()
11-
127
ament_auto_package(
138
INSTALL_TO_SHARE
149
launch

common/global_parameter_loader/package.xml

+1-3
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@
1010
<buildtool_depend>ament_cmake_auto</buildtool_depend>
1111
<buildtool_depend>autoware_cmake</buildtool_depend>
1212

13-
<depend>sample_vehicle_description</depend>
14-
<depend>vehicle_info_util</depend>
13+
<exec_depend>vehicle_info_util</exec_depend>
1514

16-
<test_depend>ament_cmake_ros</test_depend>
1715
<test_depend>ament_lint_auto</test_depend>
1816
<test_depend>autoware_lint_common</test_depend>
1917

common/global_parameter_loader/test/test_global_params_launch.cpp

-44
This file was deleted.

common/tier4_logging_level_configure_rviz_plugin/config/logger_config.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,14 @@ Planning:
5151
behavior_path_avoidance_by_lane_change:
5252
- node_name: /planning/scenario_planning/lane_driving/behavior_planning/behavior_path_planner
5353
logger_name: lane_change.AVOIDANCE_BY_LANE_CHANGE
54+
- node_name: /planning/scenario_planning/lane_driving/behavior_planning/behavior_path_planner
55+
logger_name: lane_change.utils
5456

5557
behavior_path_lane_change:
5658
- node_name: /planning/scenario_planning/lane_driving/behavior_planning/behavior_path_planner
5759
logger_name: lane_change.NORMAL
60+
- node_name: /planning/scenario_planning/lane_driving/behavior_planning/behavior_path_planner
61+
logger_name: lane_change.utils
5862

5963
behavior_velocity_planner:
6064
- node_name: /planning/scenario_planning/lane_driving/behavior_planning/behavior_velocity_planner
@@ -78,6 +82,10 @@ Planning:
7882
- node_name: /planning/scenario_planning/motion_velocity_smoother
7983
logger_name: tier4_autoware_utils
8084

85+
route_handler:
86+
- node_name: /planning/scenario_planning/lane_driving/behavior_planning/behavior_path_planner
87+
logger_name: route_handler
88+
8189
# ============================================================
8290
# control
8391
# ============================================================

control/autonomous_emergency_braking/README.md

+11-3
Original file line numberDiff line numberDiff line change
@@ -86,20 +86,28 @@ where $v$ and $\omega$ are current longitudinal velocity and angular velocity re
8686

8787
### 3. Get target obstacles from the input point cloud
8888

89-
After generating the ego predicted path, we select target obstacles from the input point cloud. This obstacle filtering has two major steps, which are rough filtering and rigorous filtering.
89+
After generating the ego predicted path, we select target obstacles from the input point cloud. This obstacle filtering has three major steps, which are rough filtering, noise filtering with clustering and rigorous filtering.
9090

9191
#### Rough filtering
9292

93-
In rough filtering step, we select target obstacle with simple filter. Create a search area up to a certain distance (default 5[m]) away from the predicted path of the ego vehicle and ignore the point cloud (obstacles) that are not within it. The image of the rough filtering is illustrated below.
93+
In rough filtering step, we select target obstacle with simple filter. Create a search area up to a certain distance (default is half of the ego vehicle width plus the `path_footprint_extra_margin` parameter) away from the predicted path of the ego vehicle and ignore the point cloud that are not within it. The image of the rough filtering is illustrated below.
9494

9595
![rough_filtering](./image/obstacle_filtering_1.drawio.svg)
9696

97+
#### Noise filtering with clustering and convex hulls
98+
99+
To prevent the AEB from considering noisy points, euclidean clustering is performed on the filtered point cloud. The points in the point cloud that are not close enough to other points to form a cluster are discarded. The parameters `cluster_tolerance`, `minimum_cluster_size` and `maximum_cluster_size` can be used to tune the clustering and the size of objects to be ignored, for more information about the clustering method used by the AEB module, please check the official documentation on euclidean clustering of the PCL library: <https://pcl.readthedocs.io/projects/tutorials/en/master/cluster_extraction.html>.
100+
101+
Furthermore, a 2D convex hull is created around each detected cluster, the vertices of each hull represent the most extreme/outside points of the cluster. These vertices are then checked in the next step.
102+
97103
#### Rigorous filtering
98104

99-
After rough filtering, it performs a geometric collision check to determine whether the filtered obstacles actually have possibility to collide with the ego vehicle. In this check, the ego vehicle is represented as a rectangle, and the point cloud obstacles are represented as points.
105+
After Noise filtering, it performs a geometric collision check to determine whether the filtered obstacles/hull vertices actually have possibility to collide with the ego vehicle. In this check, the ego vehicle is represented as a rectangle, and the point cloud obstacles are represented as points. Only the vertices with a possibility of collision are kept.
100106

101107
![rigorous_filtering](./image/obstacle_filtering_2.drawio.svg)
102108

109+
Finally, the vertex that is closest to the ego vehicle is chosen as the candidate for collision checking: Since rss distance is used to judge if a collision will happen or not, if the closest vertex to the ego is deemed to be safe, the rest of the vertices (and the points in the clusters) will also be safe.
110+
103111
### 4. Collision check with target obstacles
104112

105113
In the fourth step, it checks the collision with filtered obstacles using RSS distance. RSS is formulated as:

control/autonomous_emergency_braking/config/autonomous_emergency_braking.param.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
publish_debug_pointcloud: false
44
use_predicted_trajectory: true
55
use_imu_path: true
6+
path_footprint_extra_margin: 1.0
67
detection_range_min_height: 0.0
78
detection_range_max_height_margin: 0.0
89
voxel_grid_x: 0.05
@@ -14,6 +15,9 @@
1415
t_response: 1.0
1516
a_ego_min: -3.0
1617
a_obj_min: -1.0
18+
cluster_tolerance: 0.1 #[m]
19+
minimum_cluster_size: 10
20+
maximum_cluster_size: 10000
1721
imu_prediction_time_horizon: 1.5
1822
imu_prediction_time_interval: 0.1
1923
mpc_prediction_time_horizon: 1.5

control/autonomous_emergency_braking/include/autonomous_emergency_braking/node.hpp

+16-8
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <diagnostic_updater/diagnostic_updater.hpp>
1919
#include <pcl_ros/transforms.hpp>
2020
#include <rclcpp/rclcpp.hpp>
21+
#include <tier4_autoware_utils/geometry/geometry.hpp>
2122
#include <vehicle_info_util/vehicle_info_util.hpp>
2223

2324
#include <autoware_planning_msgs/msg/trajectory.hpp>
@@ -64,7 +65,6 @@ using visualization_msgs::msg::Marker;
6465
using visualization_msgs::msg::MarkerArray;
6566
using Path = std::vector<geometry_msgs::msg::Pose>;
6667
using Vector3 = geometry_msgs::msg::Vector3;
67-
6868
struct ObjectData
6969
{
7070
rclcpp::Time stamp;
@@ -138,15 +138,19 @@ class AEB : public rclcpp::Node
138138
// main function
139139
void onCheckCollision(DiagnosticStatusWrapper & stat);
140140
bool checkCollision(MarkerArray & debug_markers);
141-
bool hasCollision(
142-
const double current_v, const Path & ego_path, const std::vector<ObjectData> & objects);
141+
bool hasCollision(const double current_v, const ObjectData & closest_object);
142+
143+
Path generateEgoPath(const double curr_v, const double curr_w);
144+
std::optional<Path> generateEgoPath(const Trajectory & predicted_traj);
145+
std::vector<Polygon2d> generatePathFootprint(const Path & path, const double extra_width_margin);
143146

144-
Path generateEgoPath(const double curr_v, const double curr_w, std::vector<Polygon2d> & polygons);
145-
std::optional<Path> generateEgoPath(
146-
const Trajectory & predicted_traj, std::vector<Polygon2d> & polygons);
147-
void createObjectData(
147+
void createObjectDataUsingPointCloudClusters(
148148
const Path & ego_path, const std::vector<Polygon2d> & ego_polys, const rclcpp::Time & stamp,
149-
std::vector<ObjectData> & objects);
149+
std::vector<ObjectData> & objects,
150+
const pcl::PointCloud<pcl::PointXYZ>::Ptr obstacle_points_ptr);
151+
152+
void cropPointCloudWithEgoFootprintPath(
153+
const std::vector<Polygon2d> & ego_polys, pcl::PointCloud<pcl::PointXYZ>::Ptr filtered_objects);
150154

151155
void addMarker(
152156
const rclcpp::Time & current_time, const Path & path, const std::vector<Polygon2d> & polygons,
@@ -175,6 +179,7 @@ class AEB : public rclcpp::Node
175179
bool publish_debug_pointcloud_;
176180
bool use_predicted_trajectory_;
177181
bool use_imu_path_;
182+
double path_footprint_extra_margin_;
178183
double detection_range_min_height_;
179184
double detection_range_max_height_margin_;
180185
double voxel_grid_x_;
@@ -186,6 +191,9 @@ class AEB : public rclcpp::Node
186191
double t_response_;
187192
double a_ego_min_;
188193
double a_obj_min_;
194+
double cluster_tolerance_;
195+
int minimum_cluster_size_;
196+
int maximum_cluster_size_;
189197
double imu_prediction_time_horizon_;
190198
double imu_prediction_time_interval_;
191199
double mpc_prediction_time_horizon_;

0 commit comments

Comments
 (0)