Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Akwk v4.0.0 #1646

Closed
wants to merge 183 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
183 commits
Select commit Hold shift + click to select a range
06afbd5
fix(motion_velocity_planner): use the slowdown velocity (instead of 0…
maxime-clem Jul 4, 2024
421c1e5
docs(bpp_static_obstacle_avoidance): add documentation (#7554)
satoshi-ota Jun 19, 2024
b2cb815
docs(static_obstacle_avoidance): fix wrong flowchart (#7693)
satoshi-ota Jun 26, 2024
4e0522d
feat(static_obstacle_avoidance): keep object clipping even after the …
satoshi-ota Jun 20, 2024
e12cf5b
fix(static_obstacle_avoidance): fix json schema (#7692)
satoshi-ota Jun 26, 2024
dfd2815
refactor(static_obstacle_avoidance): organize params for drivable lan…
satoshi-ota Jun 27, 2024
79728ef
feat(safety_check): filter safety check targe objects by yaw deviatio…
satoshi-ota Jul 4, 2024
5602513
fix(static_obstacle_avoidance): fix issues in target object filtering…
satoshi-ota Jul 4, 2024
9029ac5
fix(static_obstacle_avoidance): ignore pedestrian/cyclist who is not …
satoshi-ota Jul 5, 2024
c8afe97
Merge pull request #1399 from tier4/hotfix/v0.29.0/static-obstacle-av…
shmpwk Jul 9, 2024
49d0c35
fix(multi_object_tracker): fix publish interval adjust timing (#1402)
technolojin Jul 9, 2024
e7b2795
fix(controller): revival of dry steering (#7903) (#1405)
takayuki5168 Jul 10, 2024
65e1d20
fix(multi_object_tracker): calculation of detection delay diagnostics…
saka1-s Jul 10, 2024
8fbaf16
fix(autoware_external_cmd_converter): fix check_topic_state (#7921)
shtokuda Jul 11, 2024
ae2e9b0
fix(system_diagnostic_monitor): fix local mode config (#7532)
isamu-takagi Jun 18, 2024
58ddfa8
Merge pull request #1408 from tier4/beta/v0.29.0+autoware_external_cmd
shmpwk Jul 11, 2024
898eb5a
feat(duplicated_node_checker): add duplicate nodes to ignore (#7959) …
tkimura4 Jul 11, 2024
7fc4394
fix(dummy_diag_publisher): not use diagnostic_updater and param callb…
saka1-s Jul 17, 2024
ef232f2
fix: resolve build error of dummy diag publisher (#1415)
saka1-s Jul 17, 2024
9bc020d
feat(autoware_universe_utils): add TimeKeeper to track function's pro…
takayuki5168 Jul 8, 2024
fbc6cc3
chore(autoware_universe_utils): update document (#7907)
yhisaki Jul 12, 2024
5023173
feat(autoware_behavior_path_planner_common,autoware_behavior_path_lan…
yhisaki Jul 12, 2024
2d9db5c
feat(velocity_smoother): add time_keeper (#8026)
takayuki5168 Jul 13, 2024
780f978
feat(static_obstacle_avoidance): integrate time keeper to major funct…
satoshi-ota Jul 16, 2024
b49bb5a
feat(autoware_behavior_velocity_planner_common,autoware_behavior_velo…
yhisaki Jul 17, 2024
843add6
resolve errors
yhisaki Jul 19, 2024
287b69c
Merge pull request #1417 from tier4/add-time_keeper-beta/0.29.0
shmpwk Jul 22, 2024
6ee3d27
feat(goal_planner): prioritize pull over path by curvature (#7791)
kosuke55 Jul 4, 2024
bd9038c
fix(start/goal_planner): fix addition of duplicate segments in calcBe…
kosuke55 Jul 9, 2024
e553faa
feat(start_planner): check current_pose and estimated_stop_pose for i…
kosuke55 Jul 21, 2024
69348a2
Merge pull request #1418 from tier4/fix/start_goal_v0.29.0
shmpwk Jul 22, 2024
a363f9e
fix(detected_object_validation): use search for searching intersected…
zusizusi Jul 22, 2024
664b2e1
fix(autoware_overlay_rviz_plugin): topic type of traffic light (#8098…
TomohitoAndo Jul 23, 2024
19af48e
feat(pid_long, vehicle_cmd_gate)!: quick pedal change (#1425)
yuki-takagi-66 Jul 25, 2024
94c336f
feat(map_based_prediction): add time_keeper (#8176) (#1426)
soblin Jul 25, 2024
ae7cbfe
perf(dynamic_obstacle_avoidance): decrease the computation time with …
takayuki5168 Jul 29, 2024
aad3869
fix(static_obstacle_avoidance): stop position is unstable (#7880)
satoshi-ota Jul 9, 2024
eb123de
fix(static_obstacle_avoidance): don't automatically avoid ambiguous v…
satoshi-ota Jul 10, 2024
32c41bc
feat(static_obstacle_avoidance): show markers when system requests op…
satoshi-ota Jul 16, 2024
ed97aff
fix(static_obstacle_avoidance): fix issues in target filtiering logic…
satoshi-ota Jul 16, 2024
433937f
fix(static_obstacle_avoidance): avoid object behind unavoidance objec…
satoshi-ota Jul 18, 2024
d8d9c19
fix(bpp, rtc_interface): fix state transition (#7743)
satoshi-ota Jul 19, 2024
f0b5d7d
feat(start_planner): add end_pose_curvature_threshold (#7901) (#1428)
kosuke55 Jul 30, 2024
622d6e3
feat(evalautor): rename evaluator diag topics (#1432)
shmpwk Jul 30, 2024
a1e97cb
perf(autoware_detected_object_validation): reduce lanelet_filter proc…
technolojin Jul 30, 2024
3f7060a
feat(static_obstacle_avoidance): integrate time keeper to major funct…
satoshi-ota Jul 16, 2024
c2fa038
fix(tier4_simulator_launch): update diag name (#1435)
shmpwk Jul 31, 2024
71484e2
Merge pull request #1434 from tier4/hotfix/v0.46.0/cherry-pick-avoidance
shmpwk Jul 31, 2024
73ed8b8
fix(autoware_multi_object_tracker): revert latency reduction logic an…
technolojin Jul 31, 2024
57279db
feat(out_of_lane): ignore objects coming from behind ego (#7891) (#1437)
maxime-clem Aug 1, 2024
0e539d1
feat(out_of_lane): also apply lat buffer between the lane and stop po…
maxime-clem Aug 1, 2024
34ea4a0
feat(motion_velocity_smoother)!: added force acceleration (#1329)
go-sakayori Jun 7, 2024
e3c1699
feat(motion_velocity_smoother): force slow driving (#1409)
go-sakayori Jul 11, 2024
def5cad
fix spelling mistake
go-sakayori Aug 7, 2024
bc61177
Merge pull request #1447 from tier4/hotfix/v0.29.0/force_acceleration…
shmpwk Aug 7, 2024
c43d7d4
fix(autoware_behavior_path_lane_change_module): avoid empty current l…
KYabuuchi Aug 7, 2024
0c040da
fix(traffic_light_classifier): fix zero size roi bug (#7608)
technolojin Aug 7, 2024
069d98c
feat(map_based_prediction): filter surrounding crosswalks for pedestr…
soblin Aug 7, 2024
55be286
feat(goal_planner): add time keeper (#8194)
kosuke55 Jul 29, 2024
38df365
feat(path_safety_checker): add rough collision check (#8193)
kosuke55 Jul 29, 2024
4099567
perf(goal_planner): reduce processing time (#8195)
kosuke55 Jul 30, 2024
913d199
fix(static_obstacle_avoidance): remove invalid small shift lines (#83…
satoshi-ota Aug 8, 2024
1a60db7
fix(autoware_mpc_lateral_controller): add timestamp and frame ID to p…
takayuki5168 Aug 8, 2024
fd6d098
fix(velocity_smoother, obstacle_cruise_planner ): float type of proce…
takayuki5168 Jul 23, 2024
a196826
refactor(qp_interface): clean up the code (#8029)
takayuki5168 Jul 13, 2024
8311f5a
perf(velocity_smoother): use ProxQP for faster optimization (#8028)
takayuki5168 Jul 30, 2024
c74c9ca
perf(velocity_smoother): not resample debug_trajectories is not used …
takayuki5168 Jul 30, 2024
ec3ad51
fix(tier4_perception_launch): radar_lanelet_filtering_range_param_pat…
saka1-s Aug 9, 2024
49231bc
fix(traffic_light_classifier): fix traffic light monitor warning (#84…
zusizusi Aug 9, 2024
91d0e85
fix(autoware_universe_utils): fix memory leak of time_keeper (#1456)
yhisaki Aug 9, 2024
f1f8029
refactor(lane_change): use lane change namespace for structs (#7508)
zulfaqar-azmi-t4 Jun 21, 2024
ccd4ffb
feat(route_handler): add unit test for lane change related functions …
zulfaqar-azmi-t4 Jun 24, 2024
1000fe0
refactor(lane_change): move struct to lane change namespace (#7841)
zulfaqar-azmi-t4 Jul 5, 2024
2cd6601
fix(autoware_behavior_path_lane_change_module): fix shadowVariable (#…
kobayu858 Jul 11, 2024
3e4d2d0
refactor(lane_change): update lanes and its polygons only when it's …
zulfaqar-azmi-t4 Jul 12, 2024
ab60a5b
fix(lane_change): delay lane change cancel (#8048)
zulfaqar-azmi-t4 Jul 23, 2024
6d38b7f
fix(lane_change): filtering object ahead of terminal (#8093)
zulfaqar-azmi-t4 Jul 25, 2024
a4563aa
perf(static_obstacle_avoidance): improve logic to reduce computationa…
satoshi-ota Aug 13, 2024
8a3411a
fix(autoware_behavior_path_lane_change_module): fix passedByValue (#8…
kobayu858 Jul 26, 2024
4a1864a
fix(lane_change): relax finish judge (#8133)
zulfaqar-azmi-t4 Aug 2, 2024
dde26ce
feat(lane_change): use different rss param to deal with parked vehicl…
zulfaqar-azmi-t4 Aug 2, 2024
70425d5
refactor(lane_change): check start point directly after getting start…
zulfaqar-azmi-t4 Aug 7, 2024
98c7b19
refactor(lane_change): refactor debug print when computing paths (#…
zulfaqar-azmi-t4 Aug 7, 2024
a1d4bfe
fix(lane_change): skip path computation if len exceed dist to termina…
zulfaqar-azmi-t4 Aug 7, 2024
2e4164c
fix(lane_change): skip generating path if lane changing path is too l…
zulfaqar-azmi-t4 Aug 9, 2024
b830618
fix(lane_change): skip generating path if longitudinal distance diffe…
zulfaqar-azmi-t4 Aug 13, 2024
ecb33b2
Merge pull request #1458 from tier4/hotfix/v0.29.0/cherry-pick-avoidance
Naophis Aug 13, 2024
8314f38
refactor(lane_change): separate leading and trailing objects (#8214)
zulfaqar-azmi-t4 Aug 13, 2024
6dbbbe6
Merge branch 'beta/v0.29.0' into cp-lane-change
Naophis Aug 13, 2024
72d5254
feat(static_obstacle_avoidance): enable force execution under unsafe …
go-sakayori Jul 19, 2024
5f8afec
fix(rtc_interface): fix build error (#8111)
go-sakayori Jul 19, 2024
275d6d4
feat(lane_change): enable force execution under unsafe conditions (#8…
go-sakayori Jul 22, 2024
e7d45e3
feat(rtc_inteface): add function to check force deactivate (#8221)
go-sakayori Jul 29, 2024
bbbeb38
feat(lane_change): force deactivation in prepare phase (#8235)
go-sakayori Jul 29, 2024
d6b8c9c
feat(static_obstacle_avoidance): force deactivation (#8288)
go-sakayori Jul 31, 2024
419f897
fix(ring_outlier_filter): remove unnecessary resize to prevent zero p…
YoshiRi Aug 9, 2024
769e091
fix(goal_planner): fix lane departure check not working correctly due…
kosuke55 Aug 13, 2024
60356be
fix(lane_departure_checker): fix uninitialized variables (#8451)
kosuke55 Aug 14, 2024
ec74077
perf(autoware_map_based_prediction autoware_universe_utils): improve …
technolojin Aug 15, 2024
398ab6e
chore(map_based_prediction): debug options (#1466)
technolojin Aug 15, 2024
83b3e4c
perf(autoware_map_based_prediction): enhance speed by removing unnece…
technolojin Aug 15, 2024
55e6408
fix(lane_change): fix invalid doesn't have stop point (#8470)
zulfaqar-azmi-t4 Aug 15, 2024
a05034f
fix(lane_change): do not cancel when approaching terminal start (#8381)
zulfaqar-azmi-t4 Aug 15, 2024
c98677d
fix(lane_change): moving object is filtered in the extended target la…
zulfaqar-azmi-t4 Aug 15, 2024
c39b160
Merge branch 'beta/v0.29.0' into cp-lane-change
Naophis Aug 15, 2024
7459a2c
Merge pull request #1463 from YoshiRi/fix/ring_outlier_filter_bugfix
YoshiRi Aug 15, 2024
d25170f
perf(autoware_map_based_prediction): removed duplicate findNearest ca…
technolojin Aug 16, 2024
a9f63ec
Merge branch 'beta/v0.29.0' into cp-lane-change
Naophis Aug 16, 2024
87cdb1e
Merge pull request #1441 from tier4/cp-lane-change
Naophis Aug 16, 2024
9969fe9
fix(turn_signal, lane_change, goal_planner): add optional to tackle l…
Owen-Liuyuxuan Aug 16, 2024
f55c26b
fix(start/goal_planner): align geometric parall parking start pose wi…
kosuke55 Aug 16, 2024
0fbb805
Merge pull request #1450 from tier4/feat/goal_planner_proccesing_time…
shmpwk Aug 16, 2024
c00012b
Merge pull request #1465 from tier4/fix/goal_planner_0.29
shmpwk Aug 16, 2024
6d0db53
perf(out_of_lane): use rtree to get stop lines and trajectory lanelet…
maxime-clem Aug 16, 2024
dc446be
fix(tensorrt_yolox): missing param file arg (#1462)
badai-nguyen Aug 16, 2024
7da383d
feat(lidar_transfusion): intensity as uint8 and tests (#7745)
amadeuszsz Jul 10, 2024
1f01a7c
feat(lidar_transfusion): update TransFusion-L model (#7890)
scepter914 Jul 10, 2024
ddcedbe
Merge pull request #1477 from tier4/feat/transfusion
shmpwk Aug 20, 2024
4a0a76a
Merge pull request #1453 from tier4/perf/velocity-smoother
shmpwk Aug 20, 2024
e3f5099
revert: "feat(lidar_transfusion): update TransFusion-L model" (#1478)
shmpwk Aug 20, 2024
d73a09a
feat(autoware_vehicle_cmd_gate): check the timestamp of input topics …
shtokuda Aug 9, 2024
60b733a
feat(autoware_vehicle_cmd_gate): accept same topic unless mode chang…
shtokuda Aug 16, 2024
30a9576
Merge pull request #1481 from tier4/feat/vehicle_cmd_gate_check_cmd_c…
shmpwk Aug 21, 2024
a4b4459
feat(intersection): fix topological sort for complicated intersection…
soblin Aug 20, 2024
dc032a1
fix(intersection): additional fix for 8520 (#8561)
soblin Aug 21, 2024
e7a489f
Merge pull request #1482 from tier4/cherry-pick/pr8561
shmpwk Aug 21, 2024
4035376
fix(goal_planner): remove time keeper in non main thread (#8610)
kosuke55 Aug 26, 2024
130ba6e
Merge pull request #1486 from tier4/fix/time_keeper_thread_0.29
kosuke55 Aug 26, 2024
83aa6bf
fix(static_obstacle_avoidance): target object sorting (#8545)
go-sakayori Aug 21, 2024
4de049b
feat(static_obstacle_avoidance): update envelope polygon creation met…
go-sakayori Aug 21, 2024
2106efd
fix(reaction_analyzer): fix include hierarchy of tf2_eigen (#8663)
SakodaShintaro Aug 29, 2024
d0348de
Merge pull request #1491 from tier4/fix/tf2_eigen_include
rej55 Aug 29, 2024
e7a9153
Merge pull request #1459 from tier4/feat/force_execution_cancel
shmpwk Aug 29, 2024
f30e55f
fix(static_obstacle_avoidance): change avoidance condition (#8433) (#…
satoshi-ota Aug 29, 2024
bab8174
Merge pull request #1490 from tier4/fix/beta/v0.29.0/static_obstacle_…
shmpwk Aug 29, 2024
cf3d631
feat(autoware_accel_brake_map_calibrator): conditional actuation data…
yuki-takagi-66 Aug 30, 2024
c9e78d6
feat(mrm_handler): input gear command (#8080) (#1498)
yuki-takagi-66 Aug 30, 2024
5d7305b
fix(static_obstacle_avoidance): target object sorting (#8545)
go-sakayori Aug 21, 2024
0710343
feat(static_obstacle_avoidance): update envelope polygon creation met…
go-sakayori Aug 21, 2024
9b7759f
fix(static_obstacle_avoidance): use wrong parameter (#8720)
satoshi-ota Sep 3, 2024
44fb380
Merge pull request #1501 from tier4/hotfix/v0.29.0/cherry-pick-avoidance
satoshi-ota Sep 3, 2024
a82c0ef
fix(bpp): use common steering factor interface for same scene modules…
satoshi-ota Sep 2, 2024
42c9a11
Merge pull request #1503 from tier4/hotfix/v0.29.0/cherry-pick-bpp
satoshi-ota Sep 3, 2024
6d9633e
fix(static_obstacle_avoidance): use wrong parameter (#8720) (#1502)
satoshi-ota Sep 3, 2024
847cb0e
fix(lane_change): modify lane change requested condition (#8510)
zulfaqar-azmi-t4 Aug 22, 2024
d3e1f88
Merge pull request #1500 from tier4/fix/beta/v0.29.0-1/lc_condition
kotaro-hihara Sep 3, 2024
fd5dda0
Merge pull request #1499 from tier4/fix/beta/v0.29.0-1/static_obstacl…
kotaro-hihara Sep 3, 2024
d2142b9
fix(bpp): use common steering factor interface for same scene modules…
satoshi-ota Sep 3, 2024
a891b8e
fix(lane_change): modify lane change requested condition (#8510) (#1504)
zulfaqar-azmi-t4 Sep 4, 2024
0322aab
feat(motion_velocity_planner,planning_evaluator): add stop, slow_dow…
xtk8532704 Aug 21, 2024
9538fea
feat(out_of_lane): redesign to improve accuracy and performance (#8453)
maxime-clem Aug 26, 2024
7f3b716
fix(out_of_lane): fix noConstructor cppcheck warning (#8636)
maxime-clem Aug 28, 2024
97b0949
fix(out_of_lane): fix a bug with the rtree reference deleted nodes (#…
maxime-clem Sep 2, 2024
02ce3a5
docs(out_of_lane): update documentation for the new design (#8692)
maxime-clem Sep 2, 2024
810bd4f
Merge pull request #1508 from maxime-clem/beta/v0.29.0+cherry-pick-ou…
shmpwk Sep 4, 2024
bb921b5
fix(static_obstacle_avoidance): ignore objects which has already been…
satoshi-ota Sep 4, 2024
da8b050
fix(pid_longitudinal_controller): fix the same point error (#8758) (#…
yuki-takagi-66 Sep 4, 2024
c0644c3
feat(out_of_lane): redesign (#1509)
maxime-clem Sep 5, 2024
c101185
fix(mission_planner): improve condition to check if the goal is withi…
maxime-clem Sep 5, 2024
a53dbea
fix(motion_velocity_planner): fix duplicated topic name (#1517)
Autumn60 Sep 5, 2024
c465062
fix(reaction_analyzer): fix include hierarchy of tf2_eigen (#8663)
SakodaShintaro Aug 29, 2024
169c736
Merge pull request #1518 from tier4/chore/patch-tf2-eigen
Naophis Sep 6, 2024
61ec77c
feat(pointcloud_preprocessor): runtime configurable output topic qos …
ralwing Jul 3, 2024
efc550c
feat(pointcloud_preprocessor): support for 3d distortion correction a…
vividf Jul 3, 2024
c7302af
fix(pointcloud_preprocessor): fix the bug where the geometry message …
vividf Jul 8, 2024
da1a042
feat(pointcloud_preprocessor): add unit test for distortion corrector…
vividf Jul 3, 2024
416609f
fix(pointcloud_preprocessor): temporarily remove distortion corrector…
vividf Jul 7, 2024
0c152ff
fix(pointcloud_preprocessor): fix distortion corrector unit test (#7833)
vividf Jul 9, 2024
9349097
feat: migrating pointcloud types (#6996)
knzo25 Jul 9, 2024
a71b2d5
Merge pull request #1535 from tier4/feat/cherry-pick-point-types-update
TomohitoAndo Sep 15, 2024
9b6db8c
fix(lidar_centerpoint, pointpainting): increase CAPACITY_POINT to avo…
TomohitoAndo Sep 20, 2024
afedb2f
chore(path_optimizer): add warn msg for exceptional behavior (#9033) …
yuki-takagi-66 Oct 7, 2024
151d5d7
chore(autoware_pointcloud_preprocessor): change unnecessary warning m…
h-ohta Oct 17, 2024
bad0007
chore(stop_filter): extract stop_filter.param.yaml to autoware_launch…
h-ohta Oct 23, 2024
fdd665d
fix: remove ScopedTimeTrack which causes goal planner crash (#1599)
XiaoyuWang0601 Oct 23, 2024
ab69381
Merge remote-tracking branch 'origin/beta/v0.29.0-1' into fix/cherry-…
TomohitoAndo Nov 3, 2024
8f03868
Merge pull request #1620 from tier4/fix/merge-fix-from-v0.29.0-1
TomohitoAndo Nov 5, 2024
787f215
fix: fix internal door interface qos (#9144)
isamu-takagi Oct 29, 2024
9db907a
Merge pull request #1628 from tier4/fix/fix-internal-door-interface-qos
mkuri Nov 8, 2024
3f2ba26
fix(goal_planner): fix zero velocity in middle of path (#8563)
kosuke55 Aug 27, 2024
2eba6ab
feat(goal_planner): extend pull over lanes inward to extract objects …
kosuke55 Sep 3, 2024
a82b1cb
feat(goal_planner): execute goal planner if previous module path term…
kosuke55 Sep 9, 2024
f716783
feat(goal_planner): use neighboring lane of pull over lane to check g…
kosuke55 Sep 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -991,34 +991,51 @@ calcCurvature<std::vector<autoware_planning_msgs::msg::TrajectoryPoint>>(
* curvature calculation
*/
template <class T>
std::vector<std::pair<double, double>> calcCurvatureAndArcLength(const T & points)
std::vector<std::pair<double, std::pair<double, double>>> calcCurvatureAndSegmentLength(
const T & points)
{
// Note that arclength is for the segment, not the sum.
std::vector<std::pair<double, double>> curvature_arc_length_vec;
curvature_arc_length_vec.emplace_back(0.0, 0.0);
// segment length is pair of segment length between {p1, p2} and {p2, p3}
std::vector<std::pair<double, std::pair<double, double>>> curvature_and_segment_length_vec;
curvature_and_segment_length_vec.reserve(points.size());
curvature_and_segment_length_vec.emplace_back(0.0, std::make_pair(0.0, 0.0));
for (size_t i = 1; i < points.size() - 1; ++i) {
const auto p1 = autoware::universe_utils::getPoint(points.at(i - 1));
const auto p2 = autoware::universe_utils::getPoint(points.at(i));
const auto p3 = autoware::universe_utils::getPoint(points.at(i + 1));
const double curvature = autoware::universe_utils::calcCurvature(p1, p2, p3);
const double arc_length =
autoware::universe_utils::calcDistance2d(points.at(i - 1), points.at(i)) +
autoware::universe_utils::calcDistance2d(points.at(i), points.at(i + 1));
curvature_arc_length_vec.emplace_back(curvature, arc_length);

// The first point has only the next point, so put the distance to that point.
// In other words, assign the first segment length at the second point to the
// second_segment_length at the first point.
if (i == 1) {
curvature_and_segment_length_vec.at(0).second.second =
autoware::universe_utils::calcDistance2d(p1, p2);
}

// The second_segment_length of the previous point and the first segment length of the current
// point are equal.
const std::pair<double, double> arc_length{
curvature_and_segment_length_vec.back().second.second,
autoware::universe_utils::calcDistance2d(p2, p3)};

curvature_and_segment_length_vec.emplace_back(curvature, arc_length);
}
curvature_arc_length_vec.emplace_back(0.0, 0.0);

return curvature_arc_length_vec;
// set to the last point
curvature_and_segment_length_vec.emplace_back(
0.0, std::make_pair(curvature_and_segment_length_vec.back().second.second, 0.0));

return curvature_and_segment_length_vec;
}

extern template std::vector<std::pair<double, double>>
calcCurvatureAndArcLength<std::vector<autoware_planning_msgs::msg::PathPoint>>(
extern template std::vector<std::pair<double, std::pair<double, double>>>
calcCurvatureAndSegmentLength<std::vector<autoware_planning_msgs::msg::PathPoint>>(
const std::vector<autoware_planning_msgs::msg::PathPoint> & points);
extern template std::vector<std::pair<double, double>>
calcCurvatureAndArcLength<std::vector<tier4_planning_msgs::msg::PathPointWithLaneId>>(
extern template std::vector<std::pair<double, std::pair<double, double>>>
calcCurvatureAndSegmentLength<std::vector<tier4_planning_msgs::msg::PathPointWithLaneId>>(
const std::vector<tier4_planning_msgs::msg::PathPointWithLaneId> & points);
extern template std::vector<std::pair<double, double>>
calcCurvatureAndArcLength<std::vector<autoware_planning_msgs::msg::TrajectoryPoint>>(
extern template std::vector<std::pair<double, std::pair<double, double>>>
calcCurvatureAndSegmentLength<std::vector<autoware_planning_msgs::msg::TrajectoryPoint>>(
const std::vector<autoware_planning_msgs::msg::TrajectoryPoint> & points);

/**
Expand Down Expand Up @@ -2487,6 +2504,15 @@ extern template bool isTargetPointFront<std::vector<autoware_planning_msgs::msg:
const geometry_msgs::msg::Point & base_point, const geometry_msgs::msg::Point & target_point,
const double threshold = 0.0);

/// @brief calculate the time_from_start fields of the given trajectory points
/// @details this function assumes constant longitudinal velocity between points
/// @param trajectory trajectory for which to calculate the time_from_start
/// @param current_ego_point current ego position
/// @param min_velocity minimum velocity used for a trajectory point
void calculate_time_from_start(
std::vector<autoware_planning_msgs::msg::TrajectoryPoint> & trajectory,
const geometry_msgs::msg::Point & current_ego_point, const float min_velocity = 1.0f);

} // namespace autoware::motion_utils

#endif // AUTOWARE__MOTION_UTILS__TRAJECTORY__TRAJECTORY_HPP_
35 changes: 29 additions & 6 deletions common/autoware_motion_utils/src/trajectory/trajectory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,14 +238,14 @@ calcCurvature<std::vector<autoware_planning_msgs::msg::TrajectoryPoint>>(
const std::vector<autoware_planning_msgs::msg::TrajectoryPoint> & points);

//
template std::vector<std::pair<double, double>>
calcCurvatureAndArcLength<std::vector<autoware_planning_msgs::msg::PathPoint>>(
template std::vector<std::pair<double, std::pair<double, double>>>
calcCurvatureAndSegmentLength<std::vector<autoware_planning_msgs::msg::PathPoint>>(
const std::vector<autoware_planning_msgs::msg::PathPoint> & points);
template std::vector<std::pair<double, double>>
calcCurvatureAndArcLength<std::vector<tier4_planning_msgs::msg::PathPointWithLaneId>>(
template std::vector<std::pair<double, std::pair<double, double>>>
calcCurvatureAndSegmentLength<std::vector<tier4_planning_msgs::msg::PathPointWithLaneId>>(
const std::vector<tier4_planning_msgs::msg::PathPointWithLaneId> & points);
template std::vector<std::pair<double, double>>
calcCurvatureAndArcLength<std::vector<autoware_planning_msgs::msg::TrajectoryPoint>>(
template std::vector<std::pair<double, std::pair<double, double>>>
calcCurvatureAndSegmentLength<std::vector<autoware_planning_msgs::msg::TrajectoryPoint>>(
const std::vector<autoware_planning_msgs::msg::TrajectoryPoint> & points);

//
Expand Down Expand Up @@ -599,4 +599,27 @@ template bool isTargetPointFront<std::vector<autoware_planning_msgs::msg::Trajec
const geometry_msgs::msg::Point & base_point, const geometry_msgs::msg::Point & target_point,
const double threshold);

void calculate_time_from_start(
std::vector<autoware_planning_msgs::msg::TrajectoryPoint> & trajectory,
const geometry_msgs::msg::Point & current_ego_point, const float min_velocity)
{
const auto nearest_segment_idx = findNearestSegmentIndex(trajectory, current_ego_point);
if (nearest_segment_idx + 1 == trajectory.size()) {
return;
}
for (auto & p : trajectory) {
p.time_from_start = rclcpp::Duration::from_seconds(0);
}
// TODO(Maxime): some points can have very low velocities which introduce huge time errors
// Temporary solution: use a minimum velocity
for (auto idx = nearest_segment_idx + 1; idx < trajectory.size(); ++idx) {
const auto & from = trajectory[idx - 1];
const auto velocity = std::max(min_velocity, from.longitudinal_velocity_mps);
if (velocity != 0.0) {
auto & to = trajectory[idx];
const auto t = universe_utils::calcDistance2d(from, to) / velocity;
to.time_from_start = rclcpp::Duration::from_seconds(t) + from.time_from_start;
}
}
}
} // namespace autoware::motion_utils
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ private Q_SLOTS:
turn_signals_sub_;
rclcpp::Subscription<autoware_vehicle_msgs::msg::HazardLightsReport>::SharedPtr
hazard_lights_sub_;
rclcpp::Subscription<autoware_perception_msgs::msg::TrafficLightGroupArray>::SharedPtr
traffic_sub_;
rclcpp::Subscription<autoware_perception_msgs::msg::TrafficLightGroup>::SharedPtr traffic_sub_;
rclcpp::Subscription<tier4_planning_msgs::msg::VelocityLimit>::SharedPtr speed_limit_sub_;

std::mutex property_mutex_;
Expand All @@ -117,7 +116,7 @@ private Q_SLOTS:
const autoware_vehicle_msgs::msg::HazardLightsReport::ConstSharedPtr & msg);
void updateSpeedLimitData(const tier4_planning_msgs::msg::VelocityLimit::ConstSharedPtr msg);
void updateTrafficLightData(
const autoware_perception_msgs::msg::TrafficLightGroupArray::ConstSharedPtr msg);
const autoware_perception_msgs::msg::TrafficLightGroup::ConstSharedPtr msg);
void drawWidget(QImage & hud);
};
} // namespace autoware_overlay_rviz_plugin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

#include <autoware_perception_msgs/msg/traffic_light_element.hpp>
#include <autoware_perception_msgs/msg/traffic_light_group.hpp>
#include <autoware_perception_msgs/msg/traffic_light_group_array.hpp>

#include <OgreColourValue.h>
#include <OgreMaterial.h>
Expand All @@ -40,8 +39,8 @@ class TrafficDisplay
TrafficDisplay();
void drawTrafficLightIndicator(QPainter & painter, const QRectF & backgroundRect);
void updateTrafficLightData(
const autoware_perception_msgs::msg::TrafficLightGroupArray::ConstSharedPtr & msg);
autoware_perception_msgs::msg::TrafficLightGroupArray current_traffic_;
const autoware_perception_msgs::msg::TrafficLightGroup::ConstSharedPtr & msg);
autoware_perception_msgs::msg::TrafficLightGroup current_traffic_;

private:
QImage traffic_light_image_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,10 @@ void SignalDisplay::onInitialize()
speed_limit_topic_property_->initialize(rviz_ros_node);

traffic_topic_property_ = std::make_unique<rviz_common::properties::RosTopicProperty>(
"Traffic Topic", "/perception/traffic_light_recognition/traffic_signals",
"autoware_perception_msgs/msgs/msg/TrafficLightGroupArray", "Topic for Traffic Light Data",
this, SLOT(topic_updated_traffic()));
"Traffic Topic",
"/planning/scenario_planning/lane_driving/behavior_planning/debug/traffic_signal",
"autoware_perception_msgs/msgs/msg/TrafficLightGroup", "Topic for Traffic Light Data", this,
SLOT(topic_updated_traffic()));
traffic_topic_property_->initialize(rviz_ros_node);
}

Expand Down Expand Up @@ -189,7 +190,7 @@ void SignalDisplay::onDisable()
}

void SignalDisplay::updateTrafficLightData(
const autoware_perception_msgs::msg::TrafficLightGroupArray::ConstSharedPtr msg)
const autoware_perception_msgs::msg::TrafficLightGroup::ConstSharedPtr msg)
{
std::lock_guard<std::mutex> lock(property_mutex_);

Expand Down Expand Up @@ -454,14 +455,13 @@ void SignalDisplay::topic_updated_traffic()
// resubscribe to the topic
traffic_sub_.reset();
auto rviz_ros_node = context_->getRosNodeAbstraction().lock();
traffic_sub_ =
rviz_ros_node->get_raw_node()
->create_subscription<autoware_perception_msgs::msg::TrafficLightGroupArray>(
traffic_topic_property_->getTopicStd(),
rclcpp::QoS(rclcpp::KeepLast(10)).durability_volatile().reliable(),
[this](const autoware_perception_msgs::msg::TrafficLightGroupArray::SharedPtr msg) {
updateTrafficLightData(msg);
});
traffic_sub_ = rviz_ros_node->get_raw_node()
->create_subscription<autoware_perception_msgs::msg::TrafficLightGroup>(
traffic_topic_property_->getTopicStd(),
rclcpp::QoS(rclcpp::KeepLast(10)).durability_volatile().reliable(),
[this](const autoware_perception_msgs::msg::TrafficLightGroup::SharedPtr msg) {
updateTrafficLightData(msg);
});
}

} // namespace autoware_overlay_rviz_plugin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ TrafficDisplay::TrafficDisplay()
}

void TrafficDisplay::updateTrafficLightData(
const autoware_perception_msgs::msg::TrafficLightGroupArray::ConstSharedPtr & msg)
const autoware_perception_msgs::msg::TrafficLightGroup::ConstSharedPtr & msg)
{
current_traffic_ = *msg;
}
Expand All @@ -68,8 +68,8 @@ void TrafficDisplay::drawTrafficLightIndicator(QPainter & painter, const QRectF
backgroundRect.top() + circleRect.height() / 2));
painter.drawEllipse(circleRect);

if (!current_traffic_.traffic_light_groups.empty()) {
switch (current_traffic_.traffic_light_groups[0].elements[0].color) {
if (!current_traffic_.elements.empty()) {
switch (current_traffic_.elements[0].color) {
case 1:
painter.setBrush(QBrush(tl_red_));
painter.drawEllipse(circleRect);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,23 @@ enum ReturnType : uint8_t {
DUAL_ONLY,
};

struct PointXYZIRC
{
float x{0.0F};
float y{0.0F};
float z{0.0F};
std::uint8_t intensity{0U};
std::uint8_t return_type{0U};
std::uint16_t channel{0U};

friend bool operator==(const PointXYZIRC & p1, const PointXYZIRC & p2) noexcept
{
return float_eq<float>(p1.x, p2.x) && float_eq<float>(p1.y, p2.y) &&
float_eq<float>(p1.z, p2.z) && p1.intensity == p2.intensity &&
p1.return_type == p2.return_type && p1.channel == p2.channel;
}
};

struct PointXYZIRADRT
{
float x{0.0F};
Expand All @@ -75,25 +92,97 @@ struct PointXYZIRADRT
}
};

enum class PointIndex { X, Y, Z, Intensity, Ring, Azimuth, Distance, ReturnType, TimeStamp };
struct PointXYZIRCAEDT
{
float x{0.0F};
float y{0.0F};
float z{0.0F};
std::uint8_t intensity{0U};
std::uint8_t return_type{0U};
std::uint16_t channel{0U};
float azimuth{0.0F};
float elevation{0.0F};
float distance{0.0F};
std::uint32_t time_stamp{0U};

friend bool operator==(const PointXYZIRCAEDT & p1, const PointXYZIRCAEDT & p2) noexcept
{
return float_eq<float>(p1.x, p2.x) && float_eq<float>(p1.y, p2.y) &&
float_eq<float>(p1.z, p2.z) && p1.intensity == p2.intensity &&
p1.return_type == p2.return_type && p1.channel == p2.channel &&
float_eq<float>(p1.azimuth, p2.azimuth) && float_eq<float>(p1.distance, p2.distance) &&
p1.time_stamp == p2.time_stamp;
}
};

enum class PointXYZIIndex { X, Y, Z, Intensity };
enum class PointXYZIRCIndex { X, Y, Z, Intensity, ReturnType, Channel };
enum class PointXYZIRADRTIndex {
X,
Y,
Z,
Intensity,
Ring,
Azimuth,
Distance,
ReturnType,
TimeStamp
};
enum class PointXYZIRCAEDTIndex {
X,
Y,
Z,
Intensity,
ReturnType,
Channel,
Azimuth,
Elevation,
Distance,
TimeStamp
};

LIDAR_UTILS__DEFINE_FIELD_GENERATOR_FOR_MEMBER(azimuth);
LIDAR_UTILS__DEFINE_FIELD_GENERATOR_FOR_MEMBER(elevation);
LIDAR_UTILS__DEFINE_FIELD_GENERATOR_FOR_MEMBER(distance);
LIDAR_UTILS__DEFINE_FIELD_GENERATOR_FOR_MEMBER(return_type);
LIDAR_UTILS__DEFINE_FIELD_GENERATOR_FOR_MEMBER(time_stamp);

LIDAR_UTILS__DEFINE_FIELD_GENERATOR_FOR_MEMBER(channel);

using PointXYZIRCGenerator = std::tuple<
point_cloud_msg_wrapper::field_x_generator, point_cloud_msg_wrapper::field_y_generator,
point_cloud_msg_wrapper::field_z_generator, point_cloud_msg_wrapper::field_intensity_generator,
field_return_type_generator, field_channel_generator>;

using PointXYZIRADRTGenerator = std::tuple<
point_cloud_msg_wrapper::field_x_generator, point_cloud_msg_wrapper::field_y_generator,
point_cloud_msg_wrapper::field_z_generator, point_cloud_msg_wrapper::field_intensity_generator,
point_cloud_msg_wrapper::field_ring_generator, field_azimuth_generator, field_distance_generator,
field_return_type_generator, field_time_stamp_generator>;

using PointXYZIRCAEDTGenerator = std::tuple<
point_cloud_msg_wrapper::field_x_generator, point_cloud_msg_wrapper::field_y_generator,
point_cloud_msg_wrapper::field_z_generator, point_cloud_msg_wrapper::field_intensity_generator,
field_return_type_generator, field_channel_generator, field_azimuth_generator,
field_elevation_generator, field_distance_generator, field_time_stamp_generator>;

} // namespace autoware_point_types

POINT_CLOUD_REGISTER_POINT_STRUCT(
autoware_point_types::PointXYZIRC,
(float, x, x)(float, y, y)(float, z, z)(std::uint8_t, intensity, intensity)(
std::uint8_t, return_type, return_type)(std::uint16_t, channel, channel))

POINT_CLOUD_REGISTER_POINT_STRUCT(
autoware_point_types::PointXYZIRADRT,
(float, x, x)(float, y, y)(float, z, z)(float, intensity, intensity)(std::uint16_t, ring, ring)(
float, azimuth, azimuth)(float, distance, distance)(std::uint8_t, return_type, return_type)(
double, time_stamp, time_stamp))

POINT_CLOUD_REGISTER_POINT_STRUCT(
autoware_point_types::PointXYZIRCAEDT,
(float, x, x)(float, y, y)(float, z, z)(std::uint8_t, intensity, intensity)(
std::uint8_t, return_type,
return_type)(std::uint16_t, channel, channel)(float, azimuth, azimuth)(
float, elevation, elevation)(float, distance, distance)(std::uint32_t, time_stamp, time_stamp))
#endif // AUTOWARE_POINT_TYPES__TYPES_HPP_
9 changes: 9 additions & 0 deletions common/autoware_point_types/test/test_point_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@ TEST(PointEquality, PointXYZIRADRT)
EXPECT_EQ(pt0, pt1);
}

TEST(PointEquality, PointXYZIRCAEDT)
{
using autoware_point_types::PointXYZIRCAEDT;

PointXYZIRCAEDT pt0{0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
PointXYZIRCAEDT pt1{0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
EXPECT_EQ(pt0, pt1);
}

TEST(PointEquality, FloatEq)
{
// test template
Expand Down
Loading
Loading