Skip to content

Commit d6b8138

Browse files
style(pre-commit): autofix
1 parent 72e29ff commit d6b8138

File tree

15 files changed

+64
-61
lines changed

15 files changed

+64
-61
lines changed

common/component_interface_utils/include/component_interface_utils/rclcpp.hpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,7 @@ class NodeAdaptor
9494
C & cli, S & srv, CallbackGroup group, std::optional<double> timeout = std::nullopt) const
9595
{
9696
init_cli(cli);
97-
init_srv(
98-
srv, [cli, timeout](auto req, auto res) { *res = *cli->call(req, timeout); }, group);
97+
init_srv(srv, [cli, timeout](auto req, auto res) { *res = *cli->call(req, timeout); }, group);
9998
}
10099

101100
/// Create a subscription wrapper.

common/motion_utils/test/src/trajectory/test_trajectory.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -5365,8 +5365,7 @@ TEST(Trajectory, removeFirstInvalidOrientationPoints)
53655365
auto traj = generateTestTrajectory<Trajectory>(10, 1.0, 1.0);
53665366

53675367
// no invalid points
5368-
testRemoveInvalidOrientationPoints(
5369-
traj, [](Trajectory &) {}, traj.points.size());
5368+
testRemoveInvalidOrientationPoints(traj, [](Trajectory &) {}, traj.points.size());
53705369

53715370
// invalid point at the end
53725371
testRemoveInvalidOrientationPoints(

control/smart_mpc_trajectory_follower/smart_mpc_trajectory_follower/scripts/drive_controller.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -560,12 +560,12 @@ def update_input_queue(
560560
np.array(time_stamp), np.array(steer_history)
561561
)
562562

563-
self.acc_input_queue[
564-
drive_functions.acc_ctrl_queue_size - acc_num :
565-
] = acc_interpolate(time_stamp_acc)
566-
self.steer_input_queue[
567-
drive_functions.steer_ctrl_queue_size - steer_num :
568-
] = steer_interpolate(time_stamp_steer)
563+
self.acc_input_queue[drive_functions.acc_ctrl_queue_size - acc_num :] = (
564+
acc_interpolate(time_stamp_acc)
565+
)
566+
self.steer_input_queue[drive_functions.steer_ctrl_queue_size - steer_num :] = (
567+
steer_interpolate(time_stamp_steer)
568+
)
569569

570570
if (
571571
acc_num == drive_functions.acc_ctrl_queue_size

evaluator/kinematic_evaluator/include/kinematic_evaluator/parameters.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace kinematic_diagnostics
2727
struct Parameters
2828
{
2929
std::array<bool, static_cast<size_t>(Metric::SIZE)> metrics{}; // default values to false
30-
}; // struct Parameters
30+
}; // struct Parameters
3131

3232
} // namespace kinematic_diagnostics
3333

evaluator/kinematic_evaluator/test/test_kinematic_evaluator_node.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,7 @@ class EvalTest : public ::testing::Test
6767
tf_broadcaster_ = std::make_unique<tf2_ros::TransformBroadcaster>(dummy_node);
6868
}
6969

70-
~EvalTest() override
71-
{ /*rclcpp::shutdown();*/
72-
}
70+
~EvalTest() override { /*rclcpp::shutdown();*/ }
7371

7472
void setTargetMetric(kinematic_diagnostics::Metric metric)
7573
{

evaluator/localization_evaluator/include/localization_evaluator/parameters.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace localization_diagnostics
2727
struct Parameters
2828
{
2929
std::array<bool, static_cast<size_t>(Metric::SIZE)> metrics{}; // default values to false
30-
}; // struct Parameters
30+
}; // struct Parameters
3131

3232
} // namespace localization_diagnostics
3333

launch/tier4_perception_launch/launch/obstacle_segmentation/ground_segmentation/ground_segmentation.launch.py

+13-9
Original file line numberDiff line numberDiff line change
@@ -501,9 +501,11 @@ def launch_setup(context, *args, **kwargs):
501501
components.extend(
502502
pipeline.create_single_frame_obstacle_segmentation_components(
503503
input_topic=LaunchConfiguration("input/pointcloud"),
504-
output_topic=pipeline.single_frame_obstacle_seg_output
505-
if pipeline.use_single_frame_filter or pipeline.use_time_series_filter
506-
else pipeline.output_topic,
504+
output_topic=(
505+
pipeline.single_frame_obstacle_seg_output
506+
if pipeline.use_single_frame_filter or pipeline.use_time_series_filter
507+
else pipeline.output_topic
508+
),
507509
)
508510
)
509511

@@ -512,18 +514,20 @@ def launch_setup(context, *args, **kwargs):
512514
components.extend(
513515
pipeline.create_single_frame_outlier_filter_components(
514516
input_topic=pipeline.single_frame_obstacle_seg_output,
515-
output_topic=relay_topic
516-
if pipeline.use_time_series_filter
517-
else pipeline.output_topic,
517+
output_topic=(
518+
relay_topic if pipeline.use_time_series_filter else pipeline.output_topic
519+
),
518520
context=context,
519521
)
520522
)
521523
if pipeline.use_time_series_filter:
522524
components.extend(
523525
pipeline.create_time_series_outlier_filter_components(
524-
input_topic=relay_topic
525-
if pipeline.use_single_frame_filter
526-
else pipeline.single_frame_obstacle_seg_output,
526+
input_topic=(
527+
relay_topic
528+
if pipeline.use_single_frame_filter
529+
else pipeline.single_frame_obstacle_seg_output
530+
),
527531
output_topic=pipeline.output_topic,
528532
)
529533
)

perception/image_projection_based_fusion/src/roi_pointcloud_fusion/node.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ RoiPointCloudFusionNode::RoiPointCloudFusionNode(const rclcpp::NodeOptions & opt
4242
cluster_debug_pub_ = this->create_publisher<sensor_msgs::msg::PointCloud2>("debug/clusters", 1);
4343
}
4444

45-
void RoiPointCloudFusionNode::preprocess(__attribute__((unused))
46-
sensor_msgs::msg::PointCloud2 & pointcloud_msg)
45+
void RoiPointCloudFusionNode::preprocess(
46+
__attribute__((unused)) sensor_msgs::msg::PointCloud2 & pointcloud_msg)
4747
{
4848
return;
4949
}
5050

51-
void RoiPointCloudFusionNode::postprocess(__attribute__((unused))
52-
sensor_msgs::msg::PointCloud2 & pointcloud_msg)
51+
void RoiPointCloudFusionNode::postprocess(
52+
__attribute__((unused)) sensor_msgs::msg::PointCloud2 & pointcloud_msg)
5353
{
5454
const auto objects_sub_count = pub_objects_ptr_->get_subscription_count() +
5555
pub_objects_ptr_->get_intra_process_subscription_count();

perception/probabilistic_occupancy_grid_map/launch/pointcloud_based_occupancy_grid_map.launch.py

+10-6
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,19 @@ def launch_setup(context, *args, **kwargs):
101101
remappings=[
102102
(
103103
"~/input/obstacle_pointcloud",
104-
LaunchConfiguration("input/obstacle_pointcloud")
105-
if not downsample_input_pointcloud
106-
else "obstacle/downsample/pointcloud",
104+
(
105+
LaunchConfiguration("input/obstacle_pointcloud")
106+
if not downsample_input_pointcloud
107+
else "obstacle/downsample/pointcloud"
108+
),
107109
),
108110
(
109111
"~/input/raw_pointcloud",
110-
LaunchConfiguration("input/raw_pointcloud")
111-
if not downsample_input_pointcloud
112-
else "raw/downsample/pointcloud",
112+
(
113+
LaunchConfiguration("input/raw_pointcloud")
114+
if not downsample_input_pointcloud
115+
else "raw/downsample/pointcloud"
116+
),
113117
),
114118
("~/output/occupancy_grid_map", LaunchConfiguration("output")),
115119
],

perception/tensorrt_yolox/src/tensorrt_yolox.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -956,7 +956,7 @@ void TrtYoloX::generateYoloxProposals(
956956
objects.push_back(obj);
957957
}
958958
} // class loop
959-
} // point anchor loop
959+
} // point anchor loop
960960
}
961961

962962
void TrtYoloX::qsortDescentInplace(ObjectArray & face_objects, int left, int right) const

planning/sampling_based_planner/path_sampler/src/node.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -423,8 +423,7 @@ std::vector<sampler_common::Path> PathSampler::generateCandidatesFromPreviousPat
423423
size_t reuse_idx = 0;
424424
for (reuse_idx = 0; reuse_idx + 1 < prev_path_->lengths.size() &&
425425
prev_path_->lengths[reuse_idx] < reuse_length;
426-
++reuse_idx)
427-
;
426+
++reuse_idx);
428427
if (reuse_idx == 0UL) continue;
429428
const auto reused_path = *prev_path_->subset(0UL, reuse_idx);
430429
reuse_state.curvature = reused_path.curvatures.back();

sensing/pointcloud_preprocessor/src/passthrough_filter/passthrough_uint16.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ void pcl::PassThroughUInt16<pcl::PCLPointCloud2>::applyFilter(PCLPointCloud2 & o
242242
nr_p++;
243243
}
244244
output.width = nr_p;
245-
} // !keep_organized_
245+
} // !keep_organized_
246246
} else { // No distance filtering, process all data.
247247
// No need to check for is_organized here as we did it above
248248
for (int cp = 0; cp < nr_points; ++cp, xyz_offset += input_->point_step) {

sensing/tier4_pcl_extensions/include/tier4_pcl_extensions/voxel_grid_nearest_centroid_impl.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ void pcl::VoxelGridNearestCentroid<PointT>::applyFilter(PointCloud & output)
221221
&rgb, reinterpret_cast<const char *>(&input_->points[cp]) + rgba_index, sizeof(int));
222222
centroid[centroid_size - 3] = static_cast<float>((rgb >> 16) & 0x0000ff);
223223
centroid[centroid_size - 2] = static_cast<float>((rgb >> 8) & 0x0000ff);
224-
centroid[centroid_size - 1] = static_cast<float>((rgb)&0x0000ff);
224+
centroid[centroid_size - 1] = static_cast<float>((rgb) & 0x0000ff);
225225
}
226226
pcl::for_each_type<FieldList>(
227227
NdCopyPointEigenFunctor<PointT>(input_->points[cp], centroid));
@@ -272,7 +272,7 @@ void pcl::VoxelGridNearestCentroid<PointT>::applyFilter(PointCloud & output)
272272
&rgb, reinterpret_cast<const char *>(&input_->points[cp]) + rgba_index, sizeof(int));
273273
centroid[centroid_size - 3] = static_cast<float>((rgb >> 16) & 0x0000ff);
274274
centroid[centroid_size - 2] = static_cast<float>((rgb >> 8) & 0x0000ff);
275-
centroid[centroid_size - 1] = static_cast<float>((rgb)&0x0000ff);
275+
centroid[centroid_size - 1] = static_cast<float>((rgb) & 0x0000ff);
276276
}
277277
pcl::for_each_type<FieldList>(
278278
NdCopyPointEigenFunctor<PointT>(input_->points[cp], centroid));

system/system_monitor/include/system_monitor/cpu_monitor/raspi_cpu_monitor.hpp

+10-10
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,16 @@
3535

3636
#define raspiThermalThrottlingMask (raspiCurrentlyThrottled | raspiSoftTemperatureLimitActive)
3737

38-
#define throttledToString(X) \
39-
(((X)&raspiUnderVoltageDetected) ? "Under-voltage detected" \
40-
: ((X)&raspiArmFrequencyCapped) ? "Arm frequency capped" \
41-
: ((X)&raspiCurrentlyThrottled) ? "Currently throttled" \
42-
: ((X)&raspiSoftTemperatureLimitActive) ? "Soft temperature limit active" \
43-
: ((X)&raspiUnderVoltageHasOccurred) ? "Under-voltage has occurred" \
44-
: ((X)&raspiArmFrequencyCappedHasOccurred) ? "Arm frequency capped has occurred" \
45-
: ((X)&raspiThrottlingHasOccurred) ? "Throttling has occurred" \
46-
: ((X)&raspiSoftTemperatureLimitHasOccurred) ? "Soft temperature limit has occurred" \
47-
: "UNKNOWN")
38+
#define throttledToString(X) \
39+
(((X) & raspiUnderVoltageDetected) ? "Under-voltage detected" \
40+
: ((X) & raspiArmFrequencyCapped) ? "Arm frequency capped" \
41+
: ((X) & raspiCurrentlyThrottled) ? "Currently throttled" \
42+
: ((X) & raspiSoftTemperatureLimitActive) ? "Soft temperature limit active" \
43+
: ((X) & raspiUnderVoltageHasOccurred) ? "Under-voltage has occurred" \
44+
: ((X) & raspiArmFrequencyCappedHasOccurred) ? "Arm frequency capped has occurred" \
45+
: ((X) & raspiThrottlingHasOccurred) ? "Throttling has occurred" \
46+
: ((X) & raspiSoftTemperatureLimitHasOccurred) ? "Soft temperature limit has occurred" \
47+
: "UNKNOWN")
4848

4949
class CPUMonitor : public CPUMonitorBase
5050
{

system/system_monitor/include/system_monitor/gpu_monitor/nvml_gpu_monitor.hpp

+11-11
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,17 @@
2929
#include <string>
3030
#include <vector>
3131

32-
#define reasonToString(X) \
33-
(((X)&nvmlClocksThrottleReasonGpuIdle) ? "GpuIdle" \
34-
: ((X)&nvmlClocksThrottleReasonApplicationsClocksSetting) ? "ApplicationsClocksSetting" \
35-
: ((X)&nvmlClocksThrottleReasonSwPowerCap) ? "SwPowerCap" \
36-
: ((X)&nvmlClocksThrottleReasonHwSlowdown) ? "HwSlowdown" \
37-
: ((X)&nvmlClocksThrottleReasonSyncBoost) ? "SyncBoost" \
38-
: ((X)&nvmlClocksThrottleReasonSwThermalSlowdown) ? "SwThermalSlowdown" \
39-
: ((X)&nvmlClocksThrottleReasonHwThermalSlowdown) ? "HwThermalSlowdown" \
40-
: ((X)&nvmlClocksThrottleReasonHwPowerBrakeSlowdown) ? "HwPowerBrakeSlowdown" \
41-
: ((X)&nvmlClocksThrottleReasonDisplayClockSetting) ? "DisplayClockSetting" \
42-
: "UNKNOWN")
32+
#define reasonToString(X) \
33+
(((X) & nvmlClocksThrottleReasonGpuIdle) ? "GpuIdle" \
34+
: ((X) & nvmlClocksThrottleReasonApplicationsClocksSetting) ? "ApplicationsClocksSetting" \
35+
: ((X) & nvmlClocksThrottleReasonSwPowerCap) ? "SwPowerCap" \
36+
: ((X) & nvmlClocksThrottleReasonHwSlowdown) ? "HwSlowdown" \
37+
: ((X) & nvmlClocksThrottleReasonSyncBoost) ? "SyncBoost" \
38+
: ((X) & nvmlClocksThrottleReasonSwThermalSlowdown) ? "SwThermalSlowdown" \
39+
: ((X) & nvmlClocksThrottleReasonHwThermalSlowdown) ? "HwThermalSlowdown" \
40+
: ((X) & nvmlClocksThrottleReasonHwPowerBrakeSlowdown) ? "HwPowerBrakeSlowdown" \
41+
: ((X) & nvmlClocksThrottleReasonDisplayClockSetting) ? "DisplayClockSetting" \
42+
: "UNKNOWN")
4343

4444
/**
4545
* @brief GPU information

0 commit comments

Comments
 (0)