From ebc38ddcc50a80cef1d90ed266ed3ec6dd94f3c3 Mon Sep 17 00:00:00 2001 From: Zhe Shen Date: Thu, 28 Mar 2024 17:28:20 +0900 Subject: [PATCH] add the accelerate delay comparison Signed-off-by: Zhe Shen --- control_src/consistency_checker.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/control_src/consistency_checker.py b/control_src/consistency_checker.py index 12bce958..86ae318e 100644 --- a/control_src/consistency_checker.py +++ b/control_src/consistency_checker.py @@ -103,13 +103,20 @@ def read_yaml(file_path): -simulator_model_params["vel_rate_lim"], ) ), + ( + "[PID] accelerate_delay_difference: {}, (controller: {}, simulator: {})".format( + simulator_model_params["acc_time_delay"] - pid_params["delay_compensation_time"], + pid_params["delay_compensation_time"], + simulator_model_params["acc_time_delay"], + ) + ), ] for item in results: description = item.split(",")[0] value = float(description.split(":")[1].strip()) error_message = "" - if "steer_delay_difference" in item or "steer_time_constant_difference" in item: + if "steer_delay_difference" in item or "steer_time_constant_difference" in item or "accelerate_delay_difference" in item: if value != 0.0: error_message = ( "[ERROR] The parameters of the controller and simulator should be identical.\033[0m"