From c1733de5c73cee87ee30c2bbdb31e3907d4af808 Mon Sep 17 00:00:00 2001 From: TetsuKawa Date: Wed, 19 Jun 2024 02:13:23 +0900 Subject: [PATCH 01/14] feat: add ElectionCommunication.msg Signed-off-by: TetsuKawa --- tier4_system_msgs/CMakeLists.txt | 1 + .../msg/ElectionCommunication.msg | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 tier4_system_msgs/msg/ElectionCommunication.msg diff --git a/tier4_system_msgs/CMakeLists.txt b/tier4_system_msgs/CMakeLists.txt index 1979212..59485e0 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/ElectionCommunication.msg" "msg/EmergencyGoalsClearCommand.msg" "msg/EmergencyGoalsStamped.msg" "msg/EmergencyState.msg" diff --git a/tier4_system_msgs/msg/ElectionCommunication.msg b/tier4_system_msgs/msg/ElectionCommunication.msg new file mode 100644 index 0000000..76c13d7 --- /dev/null +++ b/tier4_system_msgs/msg/ElectionCommunication.msg @@ -0,0 +1,18 @@ +# node_id +uint8 MAIN_ECU = 0 +uint8 SUB_ECU = 1 +uint8 MAIN_VCU = 2 +uint8 SUB_VCU = 3 + +# type +uint8 HEARTBEAT_MSG = 0 +uint8 ELECTION_MSG = 1 +uint8 REPLY_MSG = 2 +uint8 LEADER_MSG = 3 + +builtin_interfaces/Time stamp +uint8 node_id +uint8 type +uint8 term +uint8 link +uint8 heartbeat From 1b3d6e7db51344118209bd7971b6bd9a89531f0b Mon Sep 17 00:00:00 2001 From: TetsuKawa Date: Mon, 24 Jun 2024 17:11:20 +0900 Subject: [PATCH 02/14] feat: add checksum info Signed-off-by: TetsuKawa --- tier4_system_msgs/msg/ElectionCommunication.msg | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tier4_system_msgs/msg/ElectionCommunication.msg b/tier4_system_msgs/msg/ElectionCommunication.msg index 76c13d7..4b42f44 100644 --- a/tier4_system_msgs/msg/ElectionCommunication.msg +++ b/tier4_system_msgs/msg/ElectionCommunication.msg @@ -16,3 +16,5 @@ uint8 type uint8 term uint8 link uint8 heartbeat +uint8 checksum + From d31d4a4747444caaf1c3a4c3ff17dc1c9e522450 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 08:11:37 +0000 Subject: [PATCH 03/14] ci(pre-commit): autofix --- tier4_system_msgs/msg/ElectionCommunication.msg | 1 - 1 file changed, 1 deletion(-) diff --git a/tier4_system_msgs/msg/ElectionCommunication.msg b/tier4_system_msgs/msg/ElectionCommunication.msg index 4b42f44..2daf17a 100644 --- a/tier4_system_msgs/msg/ElectionCommunication.msg +++ b/tier4_system_msgs/msg/ElectionCommunication.msg @@ -17,4 +17,3 @@ uint8 term uint8 link uint8 heartbeat uint8 checksum - From 37f1f1875c66cd388e2fdcdca1e8ef81f71b6827 Mon Sep 17 00:00:00 2001 From: TetsuKawa Date: Wed, 19 Jun 2024 02:22:24 +0900 Subject: [PATCH 04/14] 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 05/14] 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 06/14] 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 07/14] 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 08/14] 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 09/14] 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 10/14] 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 948c9fa6ec967a33a0891172f7b88bcc61639f1d Mon Sep 17 00:00:00 2001 From: TetsuKawa Date: Thu, 27 Jun 2024 15:02:58 +0900 Subject: [PATCH 11/14] feat: add comment out Signed-off-by: TetsuKawa --- .../msg/ElectionCommunication.msg | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/tier4_system_msgs/msg/ElectionCommunication.msg b/tier4_system_msgs/msg/ElectionCommunication.msg index 2daf17a..84b351e 100644 --- a/tier4_system_msgs/msg/ElectionCommunication.msg +++ b/tier4_system_msgs/msg/ElectionCommunication.msg @@ -10,10 +10,19 @@ uint8 ELECTION_MSG = 1 uint8 REPLY_MSG = 2 uint8 LEADER_MSG = 3 +# link +# The link is a 4-bit data. +# In the case of a leader message, it represents the selected path, +# and in the case of an election message or a replay message, it represents the connected status. +# 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 this message is a reply message with link=0x1010, +# the node that sent this message is connected only to the Main ECU and Main VCU. + builtin_interfaces/Time stamp -uint8 node_id -uint8 type -uint8 term -uint8 link -uint8 heartbeat -uint8 checksum +uint8 node_id # msg sender +uint8 type # msg type +uint8 term # term of election msg +uint8 link # For leader msg, the selected path; for election or reply msg, the connection status +uint8 heartbeat # heartbeat from 0 to 15 +uint8 checksum # checksum for CAN data \ No newline at end of file From 0040809d0626893385bccbe11e871e67b385e009 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:03:13 +0000 Subject: [PATCH 12/14] ci(pre-commit): autofix --- tier4_system_msgs/msg/ElectionCommunication.msg | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tier4_system_msgs/msg/ElectionCommunication.msg b/tier4_system_msgs/msg/ElectionCommunication.msg index 84b351e..e4ff46b 100644 --- a/tier4_system_msgs/msg/ElectionCommunication.msg +++ b/tier4_system_msgs/msg/ElectionCommunication.msg @@ -10,10 +10,10 @@ uint8 ELECTION_MSG = 1 uint8 REPLY_MSG = 2 uint8 LEADER_MSG = 3 -# link -# The link is a 4-bit data. -# In the case of a leader message, it represents the selected path, -# and in the case of an election message or a replay message, it represents the connected status. +# link +# The link is a 4-bit data. +# In the case of a leader message, it represents the selected path, +# and in the case of an election message or a replay message, it represents the connected status. # 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 this message is a reply message with link=0x1010, @@ -25,4 +25,4 @@ uint8 type # msg type uint8 term # term of election msg uint8 link # For leader msg, the selected path; for election or reply msg, the connection status uint8 heartbeat # heartbeat from 0 to 15 -uint8 checksum # checksum for CAN data \ No newline at end of file +uint8 checksum # checksum for CAN data From 69001df63759e16a4eb4b499862b1d1d1e224901 Mon Sep 17 00:00:00 2001 From: TetsuKawa Date: Thu, 27 Jun 2024 15:38:40 +0900 Subject: [PATCH 13/14] 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 14/14] 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,