diff --git a/common/autoware_control_center/include/autoware_control_center/autoware_control_center.hpp b/common/autoware_control_center/include/autoware_control_center/autoware_control_center.hpp index ef018ee56f..ddb768caca 100644 --- a/common/autoware_control_center/include/autoware_control_center/autoware_control_center.hpp +++ b/common/autoware_control_center/include/autoware_control_center/autoware_control_center.hpp @@ -19,8 +19,8 @@ #include "autoware_control_center/visibility_control.hpp" #include "rclcpp_lifecycle/lifecycle_node.hpp" -#include "autoware_control_center_msgs/msg/heartbeat.hpp" #include "autoware_control_center_msgs/msg/autoware_node_reports.hpp" +#include "autoware_control_center_msgs/msg/heartbeat.hpp" #include "autoware_control_center_msgs/srv/autoware_node_deregister.hpp" #include "autoware_control_center_msgs/srv/autoware_node_register.hpp" @@ -45,7 +45,8 @@ class AutowareControlCenter : public rclcpp_lifecycle::LifecycleNode rclcpp::Service::SharedPtr srv_register_; rclcpp::Service::SharedPtr srv_deregister_; - rclcpp::Publisher::SharedPtr node_reports_pub_; + rclcpp::Publisher::SharedPtr + node_reports_pub_; NodeRegistry node_registry_; std::unordered_map< std::string, rclcpp::Subscription::SharedPtr> diff --git a/common/autoware_control_center/src/autoware_control_center.cpp b/common/autoware_control_center/src/autoware_control_center.cpp index b00f2f71d5..5ba9793998 100644 --- a/common/autoware_control_center/src/autoware_control_center.cpp +++ b/common/autoware_control_center/src/autoware_control_center.cpp @@ -18,8 +18,8 @@ #include -#include "autoware_control_center_msgs/msg/heartbeat.hpp" #include "autoware_control_center_msgs/msg/autoware_node_report.hpp" +#include "autoware_control_center_msgs/msg/heartbeat.hpp" #include "autoware_control_center_msgs/srv/autoware_control_center_deregister.hpp" #include @@ -58,10 +58,11 @@ AutowareControlCenter::AutowareControlCenter(const rclcpp::NodeOptions & options "~/srv/autoware_node_deregister", std::bind(&AutowareControlCenter::deregister_node, this, _1, _2), rmw_qos_profile_services_default, callback_group_mut_ex_); - + node_reports_pub_ = create_publisher( "~/autoware_node_reports", 1); - node_reports_timer_ = create_wall_timer(1000ms, std::bind(&AutowareControlCenter::node_reports_callback, this)); + node_reports_timer_ = + create_wall_timer(1000ms, std::bind(&AutowareControlCenter::node_reports_callback, this)); acc_uuid = tier4_autoware_utils::generateUUID(); countdown = 10; diff --git a/common/autoware_control_center_msgs/msg/AutowareNodeReport.msg b/common/autoware_control_center_msgs/msg/AutowareNodeReport.msg index 2f6df24409..b8bebbf691 100644 --- a/common/autoware_control_center_msgs/msg/AutowareNodeReport.msg +++ b/common/autoware_control_center_msgs/msg/AutowareNodeReport.msg @@ -1,5 +1,5 @@ -# NodeStatus message designed to provide current status of Autoware node registered to Autoware Control Center +# NodeStatus message designed to provide current status of Autoware node registered to Autoware Control Center string name_node -bool alive -builtin_interfaces/Duration last_heartbeat \ No newline at end of file +bool alive +builtin_interfaces/Duration last_heartbeat diff --git a/common/autoware_control_center_msgs/msg/AutowareNodeReports.msg b/common/autoware_control_center_msgs/msg/AutowareNodeReports.msg index f8a079985e..34a763de7c 100644 --- a/common/autoware_control_center_msgs/msg/AutowareNodeReports.msg +++ b/common/autoware_control_center_msgs/msg/AutowareNodeReports.msg @@ -1,4 +1,4 @@ -# NodeRegisterStatus message designed to provide the information about all nodes currently +# NodeRegisterStatus message designed to provide the information about all nodes currently builtin_interfaces/Time stamp -AutowareNodeReport[] nodes \ No newline at end of file +AutowareNodeReport[] nodes