Skip to content

Commit 06258d0

Browse files
committedMar 19, 2025
style(pre-commit): autofix
1 parent c7a9c84 commit 06258d0

File tree

2 files changed

+11
-9
lines changed
  • perception/autoware_lidar_centerpoint

2 files changed

+11
-9
lines changed
 

‎perception/autoware_lidar_centerpoint/include/autoware/lidar_centerpoint/node.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@
2424
#include <autoware_utils/ros/published_time_publisher.hpp>
2525
#include <autoware_utils/system/stop_watch.hpp>
2626
#include <rclcpp/rclcpp.hpp>
27-
#include <std_msgs/msg/header.hpp>
2827

2928
#include <autoware_perception_msgs/msg/detected_object_kinematics.hpp>
3029
#include <autoware_perception_msgs/msg/detected_objects.hpp>
3130
#include <autoware_perception_msgs/msg/object_classification.hpp>
3231
#include <autoware_perception_msgs/msg/shape.hpp>
3332
#include <sensor_msgs/msg/point_cloud2.hpp>
33+
#include <std_msgs/msg/header.hpp>
3434

3535
#include <memory>
3636
#include <string>

‎perception/autoware_lidar_centerpoint/src/node.cpp

+10-8
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,12 @@ LidarCenterPointNode::LidarCenterPointNode(const rclcpp::NodeOptions & node_opti
112112

113113
// diagnostics parameters
114114
max_allowed_processing_time_ = declare_parameter<float>("max_allowed_processing_time");
115-
max_acceptable_consecutive_delay_ms_ = declare_parameter<int>("max_acceptable_consecutive_delay_ms");
115+
max_acceptable_consecutive_delay_ms_ =
116+
declare_parameter<int>("max_acceptable_consecutive_delay_ms");
116117

117118
diagnostics_timer_ = this->create_wall_timer(
118-
std::chrono::milliseconds(100),
119-
std::bind(&LidarCenterPointNode::diagnosticTimerCallback, this));
119+
std::chrono::milliseconds(100),
120+
std::bind(&LidarCenterPointNode::diagnosticTimerCallback, this));
120121

121122
pointcloud_sub_ = this->create_subscription<sensor_msgs::msg::PointCloud2>(
122123
"~/input/pointcloud", rclcpp::SensorDataQoS{}.keep_last(1),
@@ -237,12 +238,13 @@ void LidarCenterPointNode::pointCloudCallback(
237238

238239
// Check the timestamp of the processing that has started consecutively delaying,
239240
// and if the node is delayed constantly, publish the error diagnostic message
240-
void LidarCenterPointNode::diagnosticTimerCallback() {
241+
void LidarCenterPointNode::diagnosticTimerCallback()
242+
{
241243
const double delayed_state_duration =
242-
std::chrono::duration<double, std::milli>(
243-
std::chrono::nanoseconds(
244-
(this->get_clock()->now() - started_delayed_timestamp_).nanoseconds()))
245-
.count();
244+
std::chrono::duration<double, std::milli>(
245+
std::chrono::nanoseconds(
246+
(this->get_clock()->now() - started_delayed_timestamp_).nanoseconds()))
247+
.count();
246248

247249
if (delayed_state_duration > max_acceptable_consecutive_delay_ms_) {
248250
diagnostics_interface_ptr_->add_key_value("is_processing_time_ms_in_expected_range", false);

0 commit comments

Comments
 (0)