Skip to content

Commit aa614ae

Browse files
style(pre-commit): autofix
1 parent 52e7511 commit aa614ae

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

localization/pose_instability_detector/include/autoware/pose_instability_detector/pose_instability_detector.hpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
#include <nav_msgs/msg/odometry.hpp>
2424

2525
#include <deque>
26-
#include <vector>
2726
#include <tuple>
27+
#include <vector>
2828

2929
class PoseInstabilityDetector : public rclcpp::Node
3030
{
@@ -39,15 +39,16 @@ class PoseInstabilityDetector : public rclcpp::Node
3939
using DiagnosticArray = diagnostic_msgs::msg::DiagnosticArray;
4040

4141
public:
42-
struct ThresholdValues {
42+
struct ThresholdValues
43+
{
4344
double position_x;
4445
double position_y;
4546
double position_z;
4647
double angle_x;
4748
double angle_y;
4849
double angle_z;
4950
};
50-
51+
5152
explicit PoseInstabilityDetector(const rclcpp::NodeOptions & options = rclcpp::NodeOptions());
5253
ThresholdValues calculate_threshold(double interval_sec);
5354
void dead_reckon(

localization/pose_instability_detector/src/pose_instability_detector.cpp

+5-3
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ void PoseInstabilityDetector::callback_timer()
136136
diff_pose_pub_->publish(diff_pose);
137137

138138
// publish diagnostics
139-
ThresholdValues threshold_values = calculate_threshold((latest_odometry_time - prev_odometry_time).seconds());
139+
ThresholdValues threshold_values =
140+
calculate_threshold((latest_odometry_time - prev_odometry_time).seconds());
140141

141142
const std::vector<double> thresholds = {threshold_values.position_x, threshold_values.position_y,
142143
threshold_values.position_z, threshold_values.angle_x,
@@ -176,7 +177,8 @@ void PoseInstabilityDetector::callback_timer()
176177
prev_odometry_ = latest_odometry_;
177178
}
178179

179-
PoseInstabilityDetector::ThresholdValues PoseInstabilityDetector::calculate_threshold(double interval_sec)
180+
PoseInstabilityDetector::ThresholdValues PoseInstabilityDetector::calculate_threshold(
181+
double interval_sec)
180182
{
181183
// Calculate maximum longitudinal difference
182184
const double longitudinal_difference =
@@ -323,7 +325,7 @@ PoseInstabilityDetector::clip_out_necessary_twist(
323325
// get iterator to the element that is right before start_time (if it does not exist, start_it =
324326
// twist_buffer.begin())
325327
auto start_it = twist_buffer.begin();
326-
328+
327329
for (auto it = twist_buffer.begin(); it != twist_buffer.end(); ++it) {
328330
if (rclcpp::Time(it->header.stamp) > start_time) {
329331
break;

0 commit comments

Comments
 (0)