Skip to content

Commit 13cc12d

Browse files
style(pre-commit): autofix
1 parent f7074f2 commit 13cc12d

File tree

5 files changed

+41
-35
lines changed

5 files changed

+41
-35
lines changed

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

+13-9
Original file line numberDiff line numberDiff line change
@@ -478,9 +478,11 @@ def launch_setup(context, *args, **kwargs):
478478
components.extend(
479479
pipeline.create_single_frame_obstacle_segmentation_components(
480480
input_topic=LaunchConfiguration("input/pointcloud"),
481-
output_topic=pipeline.single_frame_obstacle_seg_output
482-
if pipeline.use_single_frame_filter or pipeline.use_time_series_filter
483-
else pipeline.output_topic,
481+
output_topic=(
482+
pipeline.single_frame_obstacle_seg_output
483+
if pipeline.use_single_frame_filter or pipeline.use_time_series_filter
484+
else pipeline.output_topic
485+
),
484486
)
485487
)
486488

@@ -489,18 +491,20 @@ def launch_setup(context, *args, **kwargs):
489491
components.extend(
490492
pipeline.create_single_frame_outlier_filter_components(
491493
input_topic=pipeline.single_frame_obstacle_seg_output,
492-
output_topic=relay_topic
493-
if pipeline.use_time_series_filter
494-
else pipeline.output_topic,
494+
output_topic=(
495+
relay_topic if pipeline.use_time_series_filter else pipeline.output_topic
496+
),
495497
context=context,
496498
)
497499
)
498500
if pipeline.use_time_series_filter:
499501
components.extend(
500502
pipeline.create_time_series_outlier_filter_components(
501-
input_topic=relay_topic
502-
if pipeline.use_single_frame_filter
503-
else pipeline.single_frame_obstacle_seg_output,
503+
input_topic=(
504+
relay_topic
505+
if pipeline.use_single_frame_filter
506+
else pipeline.single_frame_obstacle_seg_output
507+
),
504508
output_topic=pipeline.output_topic,
505509
)
506510
)

planning/planning_debug_tools/scripts/perception_replayer/perception_replayer_common.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,11 @@ def load_rosbag(self, rosbag2_path: str):
112112
objects_topic = (
113113
"/perception/object_recognition/detection/objects"
114114
if self.args.detected_object
115-
else "/perception/object_recognition/tracking/objects"
116-
if self.args.tracked_object
117-
else "/perception/object_recognition/objects"
115+
else (
116+
"/perception/object_recognition/tracking/objects"
117+
if self.args.tracked_object
118+
else "/perception/object_recognition/objects"
119+
)
118120
)
119121
ego_odom_topic = "/localization/kinematic_state"
120122
traffic_signals_topic = "/perception/traffic_light_recognition/traffic_signals"

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)