From 37f1f1875c66cd388e2fdcdca1e8ef81f71b6827 Mon Sep 17 00:00:00 2001 From: TetsuKawa Date: Wed, 19 Jun 2024 02:22:24 +0900 Subject: [PATCH 1/9] feat: add ElectionStatus.msg Signed-off-by: TetsuKawa --- tier4_system_msgs/CMakeLists.txt | 1 + tier4_system_msgs/msg/ElectionStatus.msg | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 tier4_system_msgs/msg/ElectionStatus.msg diff --git a/tier4_system_msgs/CMakeLists.txt b/tier4_system_msgs/CMakeLists.txt index 1979212..4b3c696 100644 --- a/tier4_system_msgs/CMakeLists.txt +++ b/tier4_system_msgs/CMakeLists.txt @@ -20,6 +20,7 @@ rosidl_generate_interfaces(${PROJECT_NAME} "msg/DiagnosticLink.msg" "msg/DiagnosticNode.msg" "msg/OperationModeAvailability.msg" + "msg/ElectionStatus.msg" "msg/EmergencyGoalsClearCommand.msg" "msg/EmergencyGoalsStamped.msg" "msg/EmergencyState.msg" diff --git a/tier4_system_msgs/msg/ElectionStatus.msg b/tier4_system_msgs/msg/ElectionStatus.msg new file mode 100644 index 0000000..438aca2 --- /dev/null +++ b/tier4_system_msgs/msg/ElectionStatus.msg @@ -0,0 +1,11 @@ +# leader_id +uint8 MAIN_ECU = 0 +uint8 SUB_ECU = 1 +uint8 MAIN_VCU = 2 +uint8 SUB_VCU = 3 + +builtin_interfaces/Time stamp +uint8 leader_id +uint8 path_info +uint8 tier4_system_msgs/MrmBehavior behavior +uint8 election_count \ No newline at end of file From df4137c4f5550265534aa7a62accdb3560206a65 Mon Sep 17 00:00:00 2001 From: TetsuKawa Date: Wed, 19 Jun 2024 02:29:39 +0900 Subject: [PATCH 2/9] modify: fix a type error Signed-off-by: TetsuKawa --- tier4_system_msgs/msg/ElectionStatus.msg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tier4_system_msgs/msg/ElectionStatus.msg b/tier4_system_msgs/msg/ElectionStatus.msg index 438aca2..51d0612 100644 --- a/tier4_system_msgs/msg/ElectionStatus.msg +++ b/tier4_system_msgs/msg/ElectionStatus.msg @@ -7,5 +7,5 @@ uint8 SUB_VCU = 3 builtin_interfaces/Time stamp uint8 leader_id uint8 path_info -uint8 tier4_system_msgs/MrmBehavior behavior +tier4_system_msgs/MrmBehavior behavior uint8 election_count \ No newline at end of file From 21b5db5f9c91186f415944c2813362adefbaf982 Mon Sep 17 00:00:00 2001 From: TetsuKawa Date: Wed, 19 Jun 2024 02:52:05 +0900 Subject: [PATCH 3/9] modify: exchange mrm_behavior to mrm_state Signed-off-by: TetsuKawa --- tier4_system_msgs/msg/ElectionStatus.msg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tier4_system_msgs/msg/ElectionStatus.msg b/tier4_system_msgs/msg/ElectionStatus.msg index 51d0612..db875fb 100644 --- a/tier4_system_msgs/msg/ElectionStatus.msg +++ b/tier4_system_msgs/msg/ElectionStatus.msg @@ -7,5 +7,5 @@ uint8 SUB_VCU = 3 builtin_interfaces/Time stamp uint8 leader_id uint8 path_info -tier4_system_msgs/MrmBehavior behavior +tier4_system_msgs/MrmState mrm_state uint8 election_count \ No newline at end of file From e1b4819c2b88078bb7a7943f006e07a6e79c04d5 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 02:03:30 +0000 Subject: [PATCH 4/9] ci(pre-commit): autofix --- tier4_system_msgs/msg/ElectionStatus.msg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tier4_system_msgs/msg/ElectionStatus.msg b/tier4_system_msgs/msg/ElectionStatus.msg index db875fb..744234b 100644 --- a/tier4_system_msgs/msg/ElectionStatus.msg +++ b/tier4_system_msgs/msg/ElectionStatus.msg @@ -8,4 +8,4 @@ builtin_interfaces/Time stamp uint8 leader_id uint8 path_info tier4_system_msgs/MrmState mrm_state -uint8 election_count \ No newline at end of file +uint8 election_count From fd780d845a0e6649a14471bc1014d4e143efdf9e Mon Sep 17 00:00:00 2001 From: TetsuKawa Date: Mon, 24 Jun 2024 18:38:23 +0900 Subject: [PATCH 5/9] feat: add election status info Signed-off-by: TetsuKawa --- tier4_system_msgs/msg/ElectionStatus.msg | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tier4_system_msgs/msg/ElectionStatus.msg b/tier4_system_msgs/msg/ElectionStatus.msg index 744234b..a32d0cd 100644 --- a/tier4_system_msgs/msg/ElectionStatus.msg +++ b/tier4_system_msgs/msg/ElectionStatus.msg @@ -8,4 +8,9 @@ builtin_interfaces/Time stamp uint8 leader_id uint8 path_info tier4_system_msgs/MrmState mrm_state -uint8 election_count +uint8 election_start_count +bool in_election +bool is_received_availability +bool is_sub_ecu_connected +bool is_main_vcu_connected +bool is_sub_vcu_connected \ No newline at end of file From e1d341f1ab5afb080ec35caf1167ce0d7139c4ff Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 24 Jun 2024 11:00:45 +0000 Subject: [PATCH 6/9] ci(pre-commit): autofix --- tier4_system_msgs/msg/ElectionStatus.msg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tier4_system_msgs/msg/ElectionStatus.msg b/tier4_system_msgs/msg/ElectionStatus.msg index a32d0cd..6aef9c9 100644 --- a/tier4_system_msgs/msg/ElectionStatus.msg +++ b/tier4_system_msgs/msg/ElectionStatus.msg @@ -13,4 +13,4 @@ bool in_election bool is_received_availability bool is_sub_ecu_connected bool is_main_vcu_connected -bool is_sub_vcu_connected \ No newline at end of file +bool is_sub_vcu_connected From da919f92f079008b86e02dd1c3d5750644ed6146 Mon Sep 17 00:00:00 2001 From: TetsuKawa <70682030+TetsuKawa@users.noreply.github.com> Date: Mon, 24 Jun 2024 20:03:22 +0900 Subject: [PATCH 7/9] feat: add election status info --- tier4_system_msgs/msg/ElectionStatus.msg | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tier4_system_msgs/msg/ElectionStatus.msg b/tier4_system_msgs/msg/ElectionStatus.msg index 6aef9c9..512ae32 100644 --- a/tier4_system_msgs/msg/ElectionStatus.msg +++ b/tier4_system_msgs/msg/ElectionStatus.msg @@ -11,6 +11,9 @@ tier4_system_msgs/MrmState mrm_state uint8 election_start_count bool in_election bool is_received_availability +bool is_received_mrm_state +bool is_autoware_emergency +bool is_main_ecu_connected bool is_sub_ecu_connected bool is_main_vcu_connected bool is_sub_vcu_connected From 69001df63759e16a4eb4b499862b1d1d1e224901 Mon Sep 17 00:00:00 2001 From: TetsuKawa Date: Thu, 27 Jun 2024 15:38:40 +0900 Subject: [PATCH 8/9] feat: add comment out Signed-off-by: TetsuKawa --- tier4_system_msgs/msg/ElectionStatus.msg | 31 +++++++++++++++--------- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/tier4_system_msgs/msg/ElectionStatus.msg b/tier4_system_msgs/msg/ElectionStatus.msg index 512ae32..033323c 100644 --- a/tier4_system_msgs/msg/ElectionStatus.msg +++ b/tier4_system_msgs/msg/ElectionStatus.msg @@ -4,16 +4,23 @@ uint8 SUB_ECU = 1 uint8 MAIN_VCU = 2 uint8 SUB_VCU = 3 +# path_info +# The path_info is a 4-bit data which represents the selected path, +# The bits represent the state of the Main ECU, Sub ECU, Main VCU, and Sub VCU in order from the leading bit. +# For example: +# If path_info=0x1010, +# the path selects the Main ECU and Main VCU. + builtin_interfaces/Time stamp -uint8 leader_id -uint8 path_info -tier4_system_msgs/MrmState mrm_state -uint8 election_start_count -bool in_election -bool is_received_availability -bool is_received_mrm_state -bool is_autoware_emergency -bool is_main_ecu_connected -bool is_sub_ecu_connected -bool is_main_vcu_connected -bool is_sub_vcu_connected +uint8 leader_id # leader of all nodes +uint8 path_info # The path used for driving +tier4_system_msgs/MrmState mrm_state # The mrm behavior determined for the entire system and its state +uint8 election_start_count # means the number of times a failure has occurred. +bool in_election # whether an election is in progress +bool has_received_availability # If false, it means that the Availability UDP packet from Autoware has not been received or has timed out. +bool has_received_mrm_state # If false, it means that the MrmState UDP packet from Autoware has not been received or has timed out. +bool is_autoware_emergency # whether Autoware is in a normal state +bool is_main_ecu_connected # whether this node is able to communicate properly with the Main ECU +bool is_sub_ecu_connected # whether this node is able to communicate properly with the Sub ECU +bool is_main_vcu_connected # whether this node is able to communicate properly with the Main VCU +bool is_sub_vcu_connected # whether this node is able to communicate properly with the Sub VCU From 22016446f87cc5a0f7d7586830a0662448af5322 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 27 Jun 2024 06:38:56 +0000 Subject: [PATCH 9/9] ci(pre-commit): autofix --- tier4_system_msgs/msg/ElectionStatus.msg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tier4_system_msgs/msg/ElectionStatus.msg b/tier4_system_msgs/msg/ElectionStatus.msg index 033323c..037f296 100644 --- a/tier4_system_msgs/msg/ElectionStatus.msg +++ b/tier4_system_msgs/msg/ElectionStatus.msg @@ -5,7 +5,7 @@ uint8 MAIN_VCU = 2 uint8 SUB_VCU = 3 # path_info -# The path_info is a 4-bit data which represents the selected path, +# The path_info is a 4-bit data which represents the selected path, # The bits represent the state of the Main ECU, Sub ECU, Main VCU, and Sub VCU in order from the leading bit. # For example: # If path_info=0x1010,