Skip to content

Commit 03f2daf

Browse files
Merge pull request #1802 from tier4/sync-awf-latest
chore: sync awf-latest
2 parents 2bee1e0 + bcec02e commit 03f2daf

File tree

8 files changed

+69
-72
lines changed

8 files changed

+69
-72
lines changed

common/autoware_trajectory/package.xml

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
<depend>lanelet2_core</depend>
2121
<depend>rclcpp</depend>
2222
<depend>tf2</depend>
23-
<depend>tier4_planning_msgs</depend>
2423

2524
<test_depend>ament_cmake_ros</test_depend>
2625
<test_depend>ament_lint_auto</test_depend>

perception/autoware_map_based_prediction/README.md

-1
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,6 @@ If the target object is inside the road or crosswalk, this module outputs one or
230230

231231
| Parameter | Unit | Type | Description |
232232
| ---------------------------------------------------------------- | ----- | ------ | ------------------------------------------------------------------------------------------------------------------------------------- |
233-
| `enable_delay_compensation` | [-] | bool | flag to enable the time delay compensation for the position of the object |
234233
| `prediction_time_horizon` | [s] | double | predict time duration for predicted path |
235234
| `lateral_control_time_horizon` | [s] | double | time duration for predicted path will reach the reference path (mostly center of the lane) |
236235
| `prediction_sampling_delta_time` | [s] | double | sampling time for points in predicted path |

perception/autoware_map_based_prediction/include/map_based_prediction/map_based_prediction_node.hpp

-7
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,6 @@ class MapBasedPredictionNode : public rclcpp::Node
117117

118118
////// Parameters
119119

120-
// Object Parameters
121-
bool enable_delay_compensation_;
122-
123120
//// Vehicle Parameters
124121
// Lanelet Parameters
125122
double dist_threshold_for_searching_lanelet_;
@@ -174,10 +171,6 @@ class MapBasedPredictionNode : public rclcpp::Node
174171
// Object process
175172
PredictedObject convertToPredictedObject(const TrackedObject & tracked_object);
176173
void updateObjectData(TrackedObject & object);
177-
geometry_msgs::msg::Pose compensateTimeDelay(
178-
const geometry_msgs::msg::Pose & delayed_pose, const geometry_msgs::msg::Twist & twist,
179-
const double dt) const;
180-
181174
//// Vehicle process
182175
// Lanelet process
183176
LaneletsData getCurrentLanelets(const TrackedObject & object);

perception/autoware_map_based_prediction/src/map_based_prediction_node.cpp

-37
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,6 @@ MapBasedPredictionNode::MapBasedPredictionNode(const rclcpp::NodeOptions & node_
364364
google::InitGoogleLogging("map_based_prediction_node");
365365
google::InstallFailureSignalHandler();
366366
}
367-
enable_delay_compensation_ = declare_parameter<bool>("enable_delay_compensation");
368367
prediction_time_horizon_.vehicle = declare_parameter<double>("prediction_time_horizon.vehicle");
369368
prediction_time_horizon_.pedestrian =
370369
declare_parameter<double>("prediction_time_horizon.pedestrian");
@@ -1246,42 +1245,6 @@ Maneuver MapBasedPredictionNode::predictObjectManeuverByLatDiffDistance(
12461245
return Maneuver::LANE_FOLLOW;
12471246
}
12481247

1249-
geometry_msgs::msg::Pose MapBasedPredictionNode::compensateTimeDelay(
1250-
const geometry_msgs::msg::Pose & delayed_pose, const geometry_msgs::msg::Twist & twist,
1251-
const double dt) const
1252-
{
1253-
if (!enable_delay_compensation_) {
1254-
return delayed_pose;
1255-
}
1256-
1257-
/* == Nonlinear model ==
1258-
*
1259-
* x_{k+1} = x_k + vx_k * cos(yaw_k) * dt - vy_k * sin(yaw_k) * dt
1260-
* y_{k+1} = y_k + vx_k * sin(yaw_k) * dt + vy_k * cos(yaw_k) * dt
1261-
* yaw_{k+1} = yaw_k + (wz_k) * dt
1262-
*
1263-
*/
1264-
1265-
const double vx = twist.linear.x;
1266-
const double vy = twist.linear.y;
1267-
const double wz = twist.angular.z;
1268-
const double prev_yaw = tf2::getYaw(delayed_pose.orientation);
1269-
const double prev_x = delayed_pose.position.x;
1270-
const double prev_y = delayed_pose.position.y;
1271-
const double prev_z = delayed_pose.position.z;
1272-
1273-
const double curr_x = prev_x + vx * std::cos(prev_yaw) * dt - vy * std::sin(prev_yaw) * dt;
1274-
const double curr_y = prev_y + vx * std::sin(prev_yaw) * dt + vy * std::cos(prev_yaw) * dt;
1275-
const double curr_z = prev_z;
1276-
const double curr_yaw = prev_yaw + wz * dt;
1277-
1278-
geometry_msgs::msg::Pose current_pose;
1279-
current_pose.position = autoware::universe_utils::createPoint(curr_x, curr_y, curr_z);
1280-
current_pose.orientation = autoware::universe_utils::createQuaternionFromYaw(curr_yaw);
1281-
1282-
return current_pose;
1283-
}
1284-
12851248
double MapBasedPredictionNode::calcRightLateralOffset(
12861249
const lanelet::ConstLineString2d & boundary_line, const geometry_msgs::msg::Pose & search_pose)
12871250
{

perception/autoware_traffic_light_arbiter/README.md

+1-9
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,4 @@ The table below outlines how the matching process determines the output based on
3939

4040
## Parameters
4141

42-
### Core Parameters
43-
44-
| Name | Type | Default Value | Description |
45-
| --------------------------- | ------ | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
46-
| `external_delay_tolerance` | double | 5.0 | The duration in seconds an external message is considered valid for merging in comparison with current time |
47-
| `external_time_tolerance` | double | 5.0 | The duration in seconds an external message is considered valid for merging in comparison with a timestamp of perception message |
48-
| `perception_time_tolerance` | double | 1.0 | The duration in seconds a perception message is considered valid for merging in comparison with a timestamp of external message |
49-
| `external_priority` | bool | false | Whether or not externals signals take precedence over perception-based ones. If false, the merging uses confidence as a criteria |
50-
| `enable_signal_matching` | bool | false | Decide whether to validate the match between perception signals and external signals. If set to true, verify that the colors match and only publish them if they are identical |
42+
{{ json_to_markdown("perception/autoware_traffic_light_arbiter/schema/traffic_light_arbiter.schema.json") }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"title": "autoware_traffic_light_arbiter parameters",
4+
"type": "object",
5+
"definitions": {
6+
"traffic_light_arbiter": {
7+
"type": "object",
8+
"properties": {
9+
"external_delay_tolerance": {
10+
"type": "number",
11+
"description": "The duration in seconds an external message is considered valid for merging in comparison with current time.",
12+
"default": 5.0
13+
},
14+
"external_time_tolerance": {
15+
"type": "number",
16+
"description": "The duration in seconds an external message is considered valid for merging.",
17+
"default": 5.0
18+
},
19+
"perception_time_tolerance": {
20+
"type": "number",
21+
"description": "The duration in seconds a perception message is considered valid for merging.",
22+
"default": 1.0
23+
},
24+
"external_priority": {
25+
"type": "boolean",
26+
"description": "Whether or not external signals take precedence over perception-based ones. If false, the merging uses confidence as a criteria.",
27+
"default": false
28+
},
29+
"enable_signal_matching": {
30+
"type": "boolean",
31+
"description": "Decide whether to validate the match between perception signals and external signals. If set to true, verify that the colors match and only publish them if they are identical.",
32+
"default": false
33+
}
34+
},
35+
"required": [
36+
"external_delay_tolerance",
37+
"external_time_tolerance",
38+
"perception_time_tolerance",
39+
"external_priority",
40+
"enable_signal_matching"
41+
],
42+
"additionalProperties": false
43+
}
44+
},
45+
"properties": {
46+
"/**": {
47+
"type": "object",
48+
"properties": {
49+
"ros__parameters": {
50+
"$ref": "#/definitions/traffic_light_arbiter"
51+
}
52+
},
53+
"required": ["ros__parameters"],
54+
"additionalProperties": false
55+
}
56+
},
57+
"required": ["/**"],
58+
"additionalProperties": false
59+
}

perception/autoware_traffic_light_arbiter/src/traffic_light_arbiter.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ namespace autoware
7171
TrafficLightArbiter::TrafficLightArbiter(const rclcpp::NodeOptions & options)
7272
: Node("traffic_light_arbiter", options)
7373
{
74-
external_delay_tolerance_ = this->declare_parameter<double>("external_delay_tolerance", 5.0);
75-
external_time_tolerance_ = this->declare_parameter<double>("external_time_tolerance", 5.0);
76-
perception_time_tolerance_ = this->declare_parameter<double>("perception_time_tolerance", 1.0);
77-
external_priority_ = this->declare_parameter<bool>("external_priority", false);
78-
enable_signal_matching_ = this->declare_parameter<bool>("enable_signal_matching", false);
74+
external_delay_tolerance_ = this->declare_parameter<double>("external_delay_tolerance");
75+
external_time_tolerance_ = this->declare_parameter<double>("external_time_tolerance");
76+
perception_time_tolerance_ = this->declare_parameter<double>("perception_time_tolerance");
77+
external_priority_ = this->declare_parameter<bool>("external_priority");
78+
enable_signal_matching_ = this->declare_parameter<bool>("enable_signal_matching");
7979

8080
if (enable_signal_matching_) {
8181
signal_match_validator_ = std::make_unique<SignalMatchValidator>();

planning/behavior_path_planner/autoware_behavior_path_planner_common/src/utils/drivable_area_expansion/static_drivable_area.cpp

+4-12
Original file line numberDiff line numberDiff line change
@@ -1666,22 +1666,14 @@ std::vector<geometry_msgs::msg::Point> calcBound(
16661666
: postProcess(bound, path, planner_data, drivable_lanes, is_left, is_driving_forward);
16671667
};
16681668

1669-
// Step2. if there is no drivable area defined by polygon, return original drivable bound.
1670-
if (!enable_expanding_hatched_road_markings && !enable_expanding_intersection_areas) {
1671-
return post_process(removeOverlapPoints(to_ros_point(bound_points)), skip_post_process);
1672-
}
1673-
1674-
// Step3.if there are hatched road markings, expand drivable bound with the polygon.
1669+
// if there is no drivable area defined by polygon, return original drivable bound.
1670+
// if there are hatched road markings, expand drivable bound with the polygon.
1671+
// if there are intersection areas, expand drivable bound with the polygon.
16751672
if (enable_expanding_hatched_road_markings) {
16761673
bound_points = getBoundWithHatchedRoadMarkings(bound_points, route_handler);
16771674
}
16781675

1679-
if (!enable_expanding_intersection_areas) {
1680-
return post_process(removeOverlapPoints(to_ros_point(bound_points)), skip_post_process);
1681-
}
1682-
1683-
// Step4. if there are intersection areas, expand drivable bound with the polygon.
1684-
{
1676+
if (enable_expanding_intersection_areas) {
16851677
bound_points =
16861678
getBoundWithIntersectionAreas(bound_points, route_handler, drivable_lanes, is_left);
16871679
}

0 commit comments

Comments
 (0)