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

chore: sync upstream #979

Merged
merged 109 commits into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
671cc96
feat(intersection): find stop line from footprint intersection with a…
soblin Oct 11, 2023
9fe7626
fix(intersection): collision check considering object width (#5265)
takayuki5168 Oct 11, 2023
dc8cc07
feat(kalman_filter): add gtest (#4799)
cyn-liu Oct 11, 2023
84995ec
feat(intersection): not detect stuck vehicle when turning left (#5268)
takayuki5168 Oct 11, 2023
6b58314
refactor(motion_velocity_smoother): align processing time topic name …
satoshi-ota Oct 12, 2023
7e0ee1e
feat(lane_change): keep distance against avoidable stationary objects…
kosuke55 Oct 12, 2023
e58eb32
feat(lane_change): sampling all possible longitudinal acceleration wh…
TakaHoribe Oct 12, 2023
29279a0
feat(planning_validator): output processing time (#5276)
satoshi-ota Oct 12, 2023
79e64d8
feat(obstacle_stop_planner): output processing time (#5279)
satoshi-ota Oct 12, 2023
10bb43c
refactor(path_smoother, obstacle_avoidance_planner): output processin…
satoshi-ota Oct 12, 2023
021d540
fix(avoidance): align execution request condition (#5266)
satoshi-ota Oct 12, 2023
bc1d6c7
refactor(behavior_path_planner): align processing time topic name (#5…
satoshi-ota Oct 12, 2023
a220a96
fix(avoidance): expand detection area to prevent chattering (#5267)
satoshi-ota Oct 12, 2023
bc60bbf
refactor(obstacle_cruise_planner): align processing time topic name (…
satoshi-ota Oct 12, 2023
f872838
chore(intersection): parameterize stuck vehicle detection turn_direct…
soblin Oct 12, 2023
02eb843
fix(lane_change): fixed debug visualization bug (#5284)
zulfaqar-azmi-t4 Oct 12, 2023
75debf0
feat(avoidance): check if the avoidance path is in drivable area (#5032)
satoshi-ota Oct 12, 2023
3cf0481
fix(intersection): fix unsigned subtraction (#5280)
soblin Oct 12, 2023
d5709ab
fix(lane_change): update target lane if valid path not found (#5287)
rej55 Oct 12, 2023
4ba8923
feat(tier4_system_rviz_plugin): improve visualization results and log…
Owen-Liuyuxuan Oct 12, 2023
744d48d
refactor(behavior_path_planner): remove planner data unused variable …
zulfaqar-azmi-t4 Oct 12, 2023
d8f285b
fix(goal_planner): disable freespace pull over after arriving modifie…
kosuke55 Oct 12, 2023
e566988
feat(tracking_object_merger): merge tracked object. especially for fa…
YoshiRi Oct 13, 2023
7e0031e
fix(euclidean cluster): update the broken link (#5292)
sezan92 Oct 13, 2023
bcfae36
docs(behavior_path_planner): update doc of safety check feature fot s…
kyoichi-sugahara Oct 13, 2023
21acc28
feat(ndt_scan_matcher): implement tpe sampler in ndt_align_srv (#5078)
SakodaShintaro Oct 13, 2023
69560ad
fix(lane_change): fix force path not appear (#5288)
zulfaqar-azmi-t4 Oct 13, 2023
df83621
fix(lane_change): prevent node from dying for trimmed shifted path (#…
zulfaqar-azmi-t4 Oct 13, 2023
f1cf22b
fix(lane_change): add visualization for passParkedObject (#5291)
zulfaqar-azmi-t4 Oct 13, 2023
61c7e32
refactor(map_packages): remove unused depend in pakcages.xml files (#…
YamatoAndo Oct 13, 2023
910f30b
fix(behavior_path_planner): fix calcMinimumLongitudinalLength args (#…
kosuke55 Oct 13, 2023
d9abd59
fix(lane_change): update target lane obj block condition (#5296)
TakaHoribe Oct 13, 2023
c03b5ac
fix(tier4_autoware_utils): fix `-Werror=float-conversion` (#5301)
satoshi-ota Oct 13, 2023
def9ffc
feat(simple_planning_sim): publish lateral acceleration (#5307)
TakaHoribe Oct 13, 2023
8b1f3c0
feat(intersection): new feature of yield stuck detection (#5270)
takayuki5168 Oct 13, 2023
4383d6b
feat(duplicated_node_checker): add packages to check duplication of n…
Owen-Liuyuxuan Oct 13, 2023
d1a77d5
feat(intersection): ignore decelerating vehicle on amber traffic ligh…
soblin Oct 15, 2023
1c5ca20
feat(lane_change): add rss paramas for stuck (#5300)
kosuke55 Oct 15, 2023
b266f47
fix(lane_change): fix chattering for stopped objects (#5302)
kosuke55 Oct 15, 2023
5d6449d
fix(lane_change): add margin in stuck detection distance (#5306)
TakaHoribe Oct 15, 2023
95e8f21
refactor(lane_change): add debug log (#5308)
TakaHoribe Oct 16, 2023
5725c2d
chore(ground_segmentation): update docs (#4806)
badai-nguyen Oct 16, 2023
35cf82e
fix(lane_change): change logger level in isVehicleStuckByObstacle (#5…
zulfaqar-azmi-t4 Oct 16, 2023
dbc6de6
feat(behavior_path_planner): curvature based drivable area expansion …
maxime-clem Oct 16, 2023
78d4d82
fix(lane_change): fix filtering objects (#5317)
kosuke55 Oct 16, 2023
dad4722
fix(lane_change): do not use reference values of polygon outer (#5318)
rej55 Oct 16, 2023
fb35f62
feat(tier4_perception_launch): add radar far object integration in tr…
YoshiRi Oct 16, 2023
738c376
fix(lane_change): filter out objects out of lane to fix stopping marg…
kosuke55 Oct 17, 2023
99cb322
feat(avoidance): add another envelope polygon update logic (#5323)
satoshi-ota Oct 17, 2023
3f2230f
fix(tier4_simulator_launch): add lacked param path (#5326)
satoshi-ota Oct 17, 2023
6825200
fix(drivable_area_expansion): correct bound limit check (#5325)
maxime-clem Oct 17, 2023
3a1d480
feat(imu_corrector): changed GyroBiasEstimator to use ndt pose instea…
SakodaShintaro Oct 17, 2023
0c7ef98
feat(ndt_scan_matcher): add initial_to_result_relative_pose (#5319)
SakodaShintaro Oct 17, 2023
d38beae
fix(tracking_object_merger): fix unintended error in radar tracking m…
YoshiRi Oct 17, 2023
08f6b8d
chore(autonmous_emergency_braking): add maintainer (#5331)
tkimura4 Oct 17, 2023
076319b
chore: update CODEOWNERS (#5184)
awf-autoware-bot[bot] Oct 17, 2023
8453525
fix(AEB): failure due to an empty path (#5329)
TakaHoribe Oct 17, 2023
b71b04e
feat(avoidance): make detection area dynamically (#5303)
satoshi-ota Oct 17, 2023
86a5954
fix(drivable_area_expansion): fix max_arc_length parameter and extra_…
maxime-clem Oct 17, 2023
c65bccd
refactor(map_based_prediction): to improve readability. Possibly (unl…
danielsanchezaran Oct 17, 2023
b3bdedc
fix(obstacle_avoidance_planner): fix lateral calculations (#4292)
beyzanurkaya Oct 17, 2023
5c22022
fix(lane_change): detect stuck in current lane termianl (#5337)
kosuke55 Oct 18, 2023
16217e8
fix(intersection): fix misuse of original path index to interpolated …
soblin Oct 18, 2023
f0ea398
fix(intersection): fix infinite loop in tsort (#5332)
soblin Oct 18, 2023
22a5ced
feat(behavior_path_planner): add postProcess() in scene module interf…
kyoichi-sugahara Oct 18, 2023
a39b20d
fix(detected_object_validation): consider shoulder lanelet in object …
shmpwk Oct 18, 2023
264accb
fix(gnss_poser): fix_transform_direction_problem (#5033)
meliketanrikulu Oct 18, 2023
5d17501
feat(system_diagnostic_graph): change config file format (#5340)
isamu-takagi Oct 18, 2023
992584b
chore(traffic_light_fine_detector): update onnx link in readme (#5339)
miursh Oct 18, 2023
9a7fac5
fix(perception_reproducer): publish objects even if out of recorded t…
kosuke55 Oct 18, 2023
a92b251
perf(perception_reproducer): improve ego pose extraction (#5344)
kosuke55 Oct 18, 2023
c6278ce
fix(lane_change): fix debug marker (#5346)
kosuke55 Oct 18, 2023
8530b6b
feat(pid_longitudinal_controller): transit to STOPPED even if the sig…
takayuki5168 Oct 18, 2023
89db335
feat(lane_change): disable cancel when ego is out of current lanes (#…
kosuke55 Oct 18, 2023
2ad1d81
perf(drivable area expansion): use faster lateral offset and nearest …
maxime-clem Oct 18, 2023
b019643
fix(goal_planner): mutex lock for all getter and setter of status (#5…
kosuke55 Oct 19, 2023
eaf9f68
test(ndt_scan_matcher): add test_ndt_scan_matcher_launch.py (#5347)
SakodaShintaro Oct 19, 2023
e67bada
refactor(ndt_scan_matcher): rename `align_using_monte_carlo` , etc. (…
SakodaShintaro Oct 19, 2023
64d8080
refactor(behavior_path_planner): remove unused headers (#5341)
zulfaqar-azmi-t4 Oct 19, 2023
45b0503
perf(pointcloud_preprocessor): move print out of hot loop (#5283)
VRichardJP Oct 19, 2023
48568b7
fix(ndt_scan_matcher): fix `validate_num_iteration` (#5354)
SakodaShintaro Oct 19, 2023
0d0a22c
feat(planner_manager): limit iteration number by parameter (#5352)
satoshi-ota Oct 19, 2023
c75d581
feat(tier4_perception_launch): add parameter to control detection_by_…
YoshiRi Oct 19, 2023
a57671d
feat(map_based_prediction): remove crossing fence path (#5356)
kyoichi-sugahara Oct 19, 2023
55e0dea
fix(route_handler): fix getting next lane logic to prevent from unexp…
satoshi-ota Oct 20, 2023
d36be55
feat(map_based_prediction): enable to control lateral path convergenc…
YoshiRi Oct 20, 2023
915d47d
fix(obstacle_stop_planner, dynamic avoidance): fix coordinate transfo…
yuki-takagi-66 Oct 20, 2023
e519c4b
chore(behavior_velocity_crosswalk_module): add maintainer (#5363)
kyoichi-sugahara Oct 20, 2023
33bc810
feat(intersection): timeout static occlusion with traffic light (#5353)
soblin Oct 20, 2023
89ae3bb
fix(route_handler): filter out start lanelets wrt start checkpoint or…
mehmetdogru Oct 20, 2023
98c24b8
perf(motion_utils): faster removeOverlapPoints (#5360)
takayuki5168 Oct 21, 2023
1502e66
feat(intersection): use own max acc/jerk param (#5370)
soblin Oct 23, 2023
6832af0
fix(start_planner): fix invalid lane id access (#5372)
kosuke55 Oct 23, 2023
eca2d25
fix(behavior_path_planner): fix iteration num initial value (#5369)
kminoda Oct 23, 2023
911a272
feat(processing_time_checker): add a script to display processing tim…
TakaHoribe Oct 23, 2023
fdbe64a
refactor(start_planner): guard for invalid lane id (#5376)
kosuke55 Oct 23, 2023
69813cb
feat(duplicated_node_checker): add duplicated node names to msg (#5382)
kyoichi-sugahara Oct 23, 2023
20c0d15
fix(goal_planner): fixed goal memory leak (#5381)
kosuke55 Oct 23, 2023
3d2a7f6
refactor(goal_planner): rebuild state transition (#5371)
kosuke55 Oct 23, 2023
0938f5b
fix(goal_planner): use recursive mutex instead of transaction (#5379)
kosuke55 Oct 23, 2023
8a66cba
fix(crosswalk): fix duplicated crosswalk launch (#5383)
takayuki5168 Oct 24, 2023
7c3bde1
docs(mpc_lateral_controller): update parameter description (#5309)
kyoichi-sugahara Oct 24, 2023
763a9b8
feat(behavior_velocity_run_out): ignore momentary detection caused by…
TomohitoAndo Oct 24, 2023
0f9eb8a
feat(imu_corrector): changed input topic of GyroBiasEstimator from nd…
SakodaShintaro Oct 24, 2023
91481da
chore(processing_time_checker): update for windows size and rich disp…
TakaHoribe Oct 24, 2023
189438e
refactor(topic_state_monitor): add state log message (#5378)
TakaHoribe Oct 24, 2023
cc0b202
refactor(localization): add localization_util package (#5377)
SakodaShintaro Oct 24, 2023
db27686
fix(intersection): wrong argument order (#5386)
takayuki5168 Oct 24, 2023
f400b91
fix(utils): remove sharp angle bound (#5384)
satoshi-ota Oct 24, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ common/traffic_light_recognition_marker_publisher/** shumpei.wakabayashi@tier4.j
common/traffic_light_utils/** mingyu.li@tier4.jp shunsuke.miura@tier4.jp
common/trtexec_vendor/** daisuke.nishimatsu@tier4.jp yusuke.muramatsu@tier4.jp
common/tvm_utility/** ambroise.vincent@arm.com xinyu.wang@tier4.jp
control/autonomous_emergency_braking/** takamasa.horibe@tier4.jp yutaka.shimizu@tier4.jp
control/autonomous_emergency_braking/** takamasa.horibe@tier4.jp tomoya.kimura@tier4.jp yutaka.shimizu@tier4.jp
control/control_performance_analysis/** berkay@leodrive.ai 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
control/control_validator/** kyoichi.sugahara@tier4.jp makoto.kurihara@tier4.jp takamasa.horibe@tier4.jp
control/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
Expand All @@ -66,6 +66,7 @@ control/mpc_lateral_controller/** takamasa.horibe@tier4.jp takayuki.murooka@tier
control/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
control/operation_mode_transition_manager/** takamasa.horibe@tier4.jp tomoya.kimura@tier4.jp
control/pid_longitudinal_controller/** takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp
control/predicted_path_checker/** berkay@leodrive.ai
control/pure_pursuit/** takamasa.horibe@tier4.jp
control/shift_decider/** takamasa.horibe@tier4.jp
control/trajectory_follower_base/** takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp
Expand Down Expand Up @@ -140,6 +141,7 @@ perception/simple_object_merger/** satoshi.tanaka@tier4.jp shunsuke.miura@tier4.
perception/tensorrt_classifier/** mingyu.li@tier4.jp
perception/tensorrt_yolo/** daisuke.nishimatsu@tier4.jp
perception/tensorrt_yolox/** daisuke.nishimatsu@tier4.jp dan.umeda@tier4.jp manato.hirabayashi@tier4.jp
perception/tracking_object_merger/** yoshi.ri@tier4.jp yukihiro.saito@tier4.jp
perception/traffic_light_arbiter/** kenzo.lobos@tier4.jp shunsuke.miura@tier4.jp
perception/traffic_light_classifier/** shunsuke.miura@tier4.jp yukihiro.saito@tier4.jp
perception/traffic_light_fine_detector/** shunsuke.miura@tier4.jp tao.zhong@tier4.jp
Expand Down Expand Up @@ -181,7 +183,6 @@ planning/planning_debug_tools/** taiki.tanaka@tier4.jp takamasa.horibe@tier4.jp
planning/planning_test_utils/** kyoichi.sugahara@tier4.jp takamasa.horibe@tier4.jp
planning/planning_validator/** kosuke.takeuchi@tier4.jp takamasa.horibe@tier4.jp
planning/route_handler/** fumiya.watanabe@tier4.jp kosuke.takeuchi@tier4.jp mamoru.sobue@tier4.jp takayuki.murooka@tier4.jp yutaka.shimizu@tier4.jp zulfaqar.azmi@tier4.jp
planning/rtc_auto_mode_manager/** fumiya.watanabe@tier4.jp taiki.tanaka@tier4.jp
planning/rtc_interface/** fumiya.watanabe@tier4.jp taiki.tanaka@tier4.jp
planning/rtc_replayer/** fumiya.watanabe@tier4.jp taiki.tanaka@tier4.jp
planning/sampling_based_planner/bezier_sampler/** maxime.clement@tier4.jp
Expand Down Expand Up @@ -215,6 +216,7 @@ system/default_ad_api_helpers/ad_api_visualizers/** isamu.takagi@tier4.jp kahhoo
system/default_ad_api_helpers/automatic_pose_initializer/** isamu.takagi@tier4.jp kahhooi.tan@tier4.jp makoto.yabuta@tier4.jp ryohsuke.mitsudome@tier4.jp yukihiro.saito@tier4.jp
system/dummy_diag_publisher/** akihiro.sakurai@tier4.jp fumihito.ito@tier4.jp
system/dummy_infrastructure/** ryohsuke.mitsudome@tier4.jp
system/duplicated_node_checker/** shumpei.wakabayashi@tier4.jp uken.ryu@tier4.jp
system/emergency_handler/** makoto.kurihara@tier4.jp
system/mrm_comfortable_stop_operator/** makoto.kurihara@tier4.jp
system/mrm_emergency_stop_operator/** makoto.kurihara@tier4.jp
Expand Down
7 changes: 7 additions & 0 deletions common/kalman_filter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,11 @@ ament_auto_add_library(kalman_filter SHARED
include/kalman_filter/time_delay_kalman_filter.hpp
)

if(BUILD_TESTING)
file(GLOB_RECURSE test_files test/*.cpp)
ament_add_ros_isolated_gtest(test_kalman_filter ${test_files})

target_link_libraries(test_kalman_filter kalman_filter)
endif()

ament_auto_package()
2 changes: 2 additions & 0 deletions common/kalman_filter/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
<build_depend>eigen3_cmake_module</build_depend>

<test_depend>ament_cmake_cppcheck</test_depend>
<test_depend>ament_cmake_ros</test_depend>
<test_depend>ament_lint_auto</test_depend>
<test_depend>autoware_lint_common</test_depend>

<export>
<build_type>ament_cmake</build_type>
Expand Down
94 changes: 94 additions & 0 deletions common/kalman_filter/test/test_kalman_filter.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
// Copyright 2023 The Autoware Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#include "kalman_filter/kalman_filter.hpp"

#include <gtest/gtest.h>

TEST(kalman_filter, kf)
{
KalmanFilter kf_;

Eigen::MatrixXd x_t(2, 1);
x_t << 1, 2;

Eigen::MatrixXd P_t(2, 2);
P_t << 1, 0, 0, 1;

Eigen::MatrixXd Q_t(2, 2);
Q_t << 0.01, 0, 0, 0.01;

Eigen::MatrixXd R_t(2, 2);
R_t << 0.09, 0, 0, 0.09;

Eigen::MatrixXd C_t(2, 2);
C_t << 1, 0, 0, 1;

Eigen::MatrixXd A_t(2, 2);
A_t << 1, 0, 0, 1;

Eigen::MatrixXd B_t(2, 2);
B_t << 1, 0, 0, 1;

// Initialize the filter and check if initialization was successful
EXPECT_TRUE(kf_.init(x_t, A_t, B_t, C_t, Q_t, R_t, P_t));

// Perform prediction
Eigen::MatrixXd u_t(2, 1);
u_t << 0.1, 0.1;
EXPECT_TRUE(kf_.predict(u_t));

// Check the updated state and covariance matrix
Eigen::MatrixXd x_predict_expected = A_t * x_t + B_t * u_t;
Eigen::MatrixXd P_predict_expected = A_t * P_t * A_t.transpose() + Q_t;

Eigen::MatrixXd x_predict;
kf_.getX(x_predict);
Eigen::MatrixXd P_predict;
kf_.getP(P_predict);

EXPECT_NEAR(x_predict(0, 0), x_predict_expected(0, 0), 1e-5);
EXPECT_NEAR(x_predict(1, 0), x_predict_expected(1, 0), 1e-5);
EXPECT_NEAR(P_predict(0, 0), P_predict_expected(0, 0), 1e-5);
EXPECT_NEAR(P_predict(1, 1), P_predict_expected(1, 1), 1e-5);

// Perform update
Eigen::MatrixXd y_t(2, 1);
y_t << 1.05, 2.05;
EXPECT_TRUE(kf_.update(y_t));

// Check the updated state and covariance matrix
const Eigen::MatrixXd PCT_t = P_predict_expected * C_t.transpose();
const Eigen::MatrixXd K_t = PCT_t * ((R_t + C_t * PCT_t).inverse());
const Eigen::MatrixXd y_pred = C_t * x_predict_expected;
Eigen::MatrixXd x_update_expected = x_predict_expected + K_t * (y_t - y_pred);
Eigen::MatrixXd P_update_expected = P_predict_expected - K_t * (C_t * P_predict_expected);

Eigen::MatrixXd x_update;
kf_.getX(x_update);
Eigen::MatrixXd P_update;
kf_.getP(P_update);

EXPECT_NEAR(x_update(0, 0), x_update_expected(0, 0), 1e-5);
EXPECT_NEAR(x_update(1, 0), x_update_expected(1, 0), 1e-5);
EXPECT_NEAR(P_update(0, 0), P_update_expected(0, 0), 1e-5);
EXPECT_NEAR(P_update(1, 1), P_update_expected(1, 1), 1e-5);
}

int main(int argc, char * argv[])
{
testing::InitGoogleTest(&argc, argv);
bool result = RUN_ALL_TESTS();
return result;
}
121 changes: 121 additions & 0 deletions common/kalman_filter/test/test_time_delay_kalman_filter.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
// Copyright 2023 The Autoware Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#include "kalman_filter/time_delay_kalman_filter.hpp"

#include <gtest/gtest.h>

TEST(time_delay_kalman_filter, td_kf)
{
TimeDelayKalmanFilter td_kf_;

Eigen::MatrixXd x_t(3, 1);
x_t << 1.0, 2.0, 3.0;
Eigen::MatrixXd P_t(3, 3);
P_t << 0.1, 0.0, 0.0, 0.0, 0.2, 0.0, 0.0, 0.0, 0.3;
const int max_delay_step = 5;
const int dim_x = x_t.rows();
const int dim_x_ex = dim_x * max_delay_step;
// Initialize the filter
td_kf_.init(x_t, P_t, max_delay_step);

// Check if initialization was successful
Eigen::MatrixXd x_init = td_kf_.getLatestX();
Eigen::MatrixXd P_init = td_kf_.getLatestP();
Eigen::MatrixXd x_ex_t = Eigen::MatrixXd::Zero(dim_x_ex, 1);
Eigen::MatrixXd P_ex_t = Eigen::MatrixXd::Zero(dim_x_ex, dim_x_ex);
for (int i = 0; i < max_delay_step; ++i) {
x_ex_t.block(i * dim_x, 0, dim_x, 1) = x_t;
P_ex_t.block(i * dim_x, i * dim_x, dim_x, dim_x) = P_t;
}

EXPECT_EQ(x_init.rows(), 3);
EXPECT_EQ(x_init.cols(), 1);
EXPECT_EQ(P_init.rows(), 3);
EXPECT_EQ(P_init.cols(), 3);
EXPECT_NEAR(x_init(0, 0), x_t(0, 0), 1e-5);
EXPECT_NEAR(x_init(1, 0), x_t(1, 0), 1e-5);
EXPECT_NEAR(x_init(2, 0), x_t(2, 0), 1e-5);
EXPECT_NEAR(P_init(0, 0), P_t(0, 0), 1e-5);
EXPECT_NEAR(P_init(1, 1), P_t(1, 1), 1e-5);
EXPECT_NEAR(P_init(2, 2), P_t(2, 2), 1e-5);

// Define prediction parameters
Eigen::MatrixXd A_t(3, 3);
A_t << 2.0, 0.0, 0.0, 0.0, 2.0, 0.0, 0.0, 0.0, 2.0;
Eigen::MatrixXd Q_t(3, 3);
Q_t << 0.01, 0.0, 0.0, 0.0, 0.02, 0.0, 0.0, 0.0, 0.03;
Eigen::MatrixXd x_next(3, 1);
x_next << 2.0, 4.0, 6.0;

// Perform prediction
EXPECT_TRUE(td_kf_.predictWithDelay(x_next, A_t, Q_t));

// Check the prediction state and covariance matrix
Eigen::MatrixXd x_predict = td_kf_.getLatestX();
Eigen::MatrixXd P_predict = td_kf_.getLatestP();
Eigen::MatrixXd x_tmp = Eigen::MatrixXd::Zero(dim_x_ex, 1);
x_tmp.block(0, 0, dim_x, 1) = A_t * x_t;
x_tmp.block(dim_x, 0, dim_x_ex - dim_x, 1) = x_ex_t.block(0, 0, dim_x_ex - dim_x, 1);
x_ex_t = x_tmp;
Eigen::MatrixXd x_predict_expected = x_ex_t.block(0, 0, dim_x, 1);
Eigen::MatrixXd P_tmp = Eigen::MatrixXd::Zero(dim_x_ex, dim_x_ex);
P_tmp.block(0, 0, dim_x, dim_x) = A_t * P_ex_t.block(0, 0, dim_x, dim_x) * A_t.transpose() + Q_t;
P_tmp.block(0, dim_x, dim_x, dim_x_ex - dim_x) =
A_t * P_ex_t.block(0, 0, dim_x, dim_x_ex - dim_x);
P_tmp.block(dim_x, 0, dim_x_ex - dim_x, dim_x) =
P_ex_t.block(0, 0, dim_x_ex - dim_x, dim_x) * A_t.transpose();
P_tmp.block(dim_x, dim_x, dim_x_ex - dim_x, dim_x_ex - dim_x) =
P_ex_t.block(0, 0, dim_x_ex - dim_x, dim_x_ex - dim_x);
P_ex_t = P_tmp;
Eigen::MatrixXd P_predict_expected = P_ex_t.block(0, 0, dim_x, dim_x);
EXPECT_NEAR(x_predict(0, 0), x_predict_expected(0, 0), 1e-5);
EXPECT_NEAR(x_predict(1, 0), x_predict_expected(1, 0), 1e-5);
EXPECT_NEAR(x_predict(2, 0), x_predict_expected(2, 0), 1e-5);
EXPECT_NEAR(P_predict(0, 0), P_predict_expected(0, 0), 1e-5);
EXPECT_NEAR(P_predict(1, 1), P_predict_expected(1, 1), 1e-5);
EXPECT_NEAR(P_predict(2, 2), P_predict_expected(2, 2), 1e-5);

// Define update parameters
Eigen::MatrixXd C_t(3, 3);
C_t << 0.5, 0.0, 0.0, 0.0, 0.5, 0.0, 0.0, 0.0, 0.5;
Eigen::MatrixXd R_t(3, 3);
R_t << 0.001, 0.0, 0.0, 0.0, 0.002, 0.0, 0.0, 0.0, 0.003;
Eigen::MatrixXd y_t(3, 1);
y_t << 1.05, 2.05, 3.05;
const int delay_step = 2; // Choose an appropriate delay step
const int dim_y = y_t.rows();

// Perform update
EXPECT_TRUE(td_kf_.updateWithDelay(y_t, C_t, R_t, delay_step));

// Check the updated state and covariance matrix
Eigen::MatrixXd x_update = td_kf_.getLatestX();
Eigen::MatrixXd P_update = td_kf_.getLatestP();

Eigen::MatrixXd C_ex_t = Eigen::MatrixXd::Zero(dim_y, dim_x_ex);
const Eigen::MatrixXd PCT_t = P_ex_t * C_ex_t.transpose();
const Eigen::MatrixXd K_t = PCT_t * ((R_t + C_ex_t * PCT_t).inverse());
const Eigen::MatrixXd y_pred = C_ex_t * x_ex_t;
x_ex_t = x_ex_t + K_t * (y_t - y_pred);
P_ex_t = P_ex_t - K_t * (C_ex_t * P_ex_t);
Eigen::MatrixXd x_update_expected = x_ex_t.block(0, 0, dim_x, 1);
Eigen::MatrixXd P_update_expected = P_ex_t.block(0, 0, dim_x, dim_x);
EXPECT_NEAR(x_update(0, 0), x_update_expected(0, 0), 1e-5);
EXPECT_NEAR(x_update(1, 0), x_update_expected(1, 0), 1e-5);
EXPECT_NEAR(x_update(2, 0), x_update_expected(2, 0), 1e-5);
EXPECT_NEAR(P_update(0, 0), P_update_expected(0, 0), 1e-5);
EXPECT_NEAR(P_update(1, 1), P_update_expected(1, 1), 1e-5);
EXPECT_NEAR(P_update(2, 2), P_update_expected(2, 2), 1e-5);
}
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,7 @@ T removeOverlapPoints(const T & points, const size_t start_idx = 0)
for (size_t i = start_idx + 1; i < points.size(); ++i) {
const auto prev_p = tier4_autoware_utils::getPoint(dst.back());
const auto curr_p = tier4_autoware_utils::getPoint(points.at(i));
const double dist = tier4_autoware_utils::calcDistance2d(prev_p, curr_p);
if (dist < eps) {
if (std::abs(prev_p.x - curr_p.x) < eps && std::abs(prev_p.y - curr_p.y) < eps) {
continue;
}
dst.push_back(points.at(i));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,29 +261,29 @@ inline void setOrientation(const geometry_msgs::msg::Quaternion & orientation, T
}

template <class T>
void setLongitudinalVelocity([[maybe_unused]] const double velocity, [[maybe_unused]] T & p)
void setLongitudinalVelocity([[maybe_unused]] const float velocity, [[maybe_unused]] T & p)
{
static_assert(sizeof(T) == 0, "Only specializations of getLongitudinalVelocity can be used.");
throw std::logic_error("Only specializations of getLongitudinalVelocity can be used.");
}

template <>
inline void setLongitudinalVelocity(
const double velocity, autoware_auto_planning_msgs::msg::TrajectoryPoint & p)
const float velocity, autoware_auto_planning_msgs::msg::TrajectoryPoint & p)
{
p.longitudinal_velocity_mps = velocity;
}

template <>
inline void setLongitudinalVelocity(
const double velocity, autoware_auto_planning_msgs::msg::PathPoint & p)
const float velocity, autoware_auto_planning_msgs::msg::PathPoint & p)
{
p.longitudinal_velocity_mps = velocity;
}

template <>
inline void setLongitudinalVelocity(
const double velocity, autoware_auto_planning_msgs::msg::PathPointWithLaneId & p)
const float velocity, autoware_auto_planning_msgs::msg::PathPointWithLaneId & p)
{
p.point.longitudinal_velocity_mps = velocity;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ behavior_path_planner_avoidance:
- node_name: /planning/scenario_planning/lane_driving/behavior_planning/behavior_path_planner
logger_name: planning.scenario_planning.lane_driving.behavior_planning.behavior_path_planner.avoidance

behavior_path_planner_lane_change:
- node_name: /planning/scenario_planning/lane_driving/behavior_planning/behavior_path_planner
logger_name: lane_change

behavior_velocity_planner:
- node_name: /planning/scenario_planning/lane_driving/behavior_planning/behavior_velocity_planner
logger_name: planning.scenario_planning.lane_driving.behavior_planning.behavior_velocity_planner
Expand Down
10 changes: 10 additions & 0 deletions common/tier4_system_rviz_plugin/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
# tier4_system_rviz_plugin

## Purpose

This plugin display the Hazard information from Autoware; and output notices when emergencies are from initial localization and route setting.

## Input

| Name | Type | Description |
| --------------------------------- | ----------------------------------------------------- | ------------------------------------------------------------ |
| `/system/emergency/hazard_status` | `autoware_auto_system_msgs::msg::HazardStatusStamped` | The topic represents the emergency information from Autoware |
Loading