Skip to content

Commit 2e18215

Browse files
style(pre-commit): autofix
1 parent c18f321 commit 2e18215

File tree

5 files changed

+76
-108
lines changed

5 files changed

+76
-108
lines changed

sensing/autoware_crop_box_filter/CMakeLists.txt

-2
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,3 @@ ament_auto_package(INSTALL_TO_SHARE
2626
launch
2727
config
2828
)
29-
30-

sensing/autoware_crop_box_filter/README.md

+22-23
Original file line numberDiff line numberDiff line change
@@ -12,41 +12,40 @@ The `autoware_crop_box_filter` is implemented as a autoware core node that subsc
1212

1313
### Input
1414

15-
| Name | Type | Description |
16-
| ----------------- | ------------------------------- | ----------------- |
17-
| `~/input/points` | `sensor_msgs::msg::PointCloud2` | reference points |
15+
| Name | Type | Description |
16+
| ---------------- | ------------------------------- | ---------------- |
17+
| `~/input/points` | `sensor_msgs::msg::PointCloud2` | reference points |
1818

1919
### Output
2020

21-
| Name | Type | Description |
22-
| ----------------- | ------------------------------- | --------------- |
23-
| `~/output/points` | `sensor_msgs::msg::PointCloud2` | filtered points |
21+
| Name | Type | Description |
22+
| -------------------- | ------------------------------------ | -------------------- |
23+
| `~/output/points` | `sensor_msgs::msg::PointCloud2` | filtered points |
2424
| `~/crop_box_polygon` | `geometry_msgs::msg::PolygonStamped` | bounding box polygon |
2525

2626
## Parameters
2727

2828
### Launch file Parameters
2929

30-
| Name | Type | Default Value | Description |
31-
| ------------------ | ------ | ------------- | ------------------------------------- |
32-
| `input_frame` | string | " " | the frame id in which filtering is performed |
33-
| `output_frame` | string | " " | output frame id of the filtered points |
34-
| `input_pointcloud_frame` | string | " " | frame id of input pointcloud |
35-
| `max_queue_size` | int | 5 | max buffer size of input/output topics |
36-
| `crop_box_filter_param_file` | string | " " | path to the parameter file for the node |
37-
30+
| Name | Type | Default Value | Description |
31+
| ---------------------------- | ------ | ------------- | -------------------------------------------- |
32+
| `input_frame` | string | " " | the frame id in which filtering is performed |
33+
| `output_frame` | string | " " | output frame id of the filtered points |
34+
| `input_pointcloud_frame` | string | " " | frame id of input pointcloud |
35+
| `max_queue_size` | int | 5 | max buffer size of input/output topics |
36+
| `crop_box_filter_param_file` | string | " " | path to the parameter file for the node |
3837

3938
### Node Parameters
4039

41-
| Name | Type | Default Value | Description |
42-
| ------------------ | ------ | ------------- | ------------------------------------- |
43-
| `min_x` | double | -5.0 | minimum x value of the crop box |
44-
| `min_y` | double | -5.0 | minimum y value of the crop box |
45-
| `min_z` | double | -5.0 | minimum z value of the crop box |
46-
| `max_x` | double | 5.0 | maximum x value of the crop box |
47-
| `max_y` | double | 5.0 | maximum y value of the crop box |
48-
| `max_z` | double | 5.0 | maximum z value of the crop box |
49-
| `negative` | bool | true | if true, points inside the box are removed, otherwise points outside the box are removed |
40+
| Name | Type | Default Value | Description |
41+
| ---------- | ------ | ------------- | ---------------------------------------------------------------------------------------- |
42+
| `min_x` | double | -5.0 | minimum x value of the crop box |
43+
| `min_y` | double | -5.0 | minimum y value of the crop box |
44+
| `min_z` | double | -5.0 | minimum z value of the crop box |
45+
| `max_x` | double | 5.0 | maximum x value of the crop box |
46+
| `max_y` | double | 5.0 | maximum y value of the crop box |
47+
| `max_z` | double | 5.0 | maximum z value of the crop box |
48+
| `negative` | bool | true | if true, points inside the box are removed, otherwise points outside the box are removed |
5049

5150
## Usage
5251

sensing/autoware_crop_box_filter/include/autoware/crop_box_filter/crop_box_filter_node.hpp

+16-20
Original file line numberDiff line numberDiff line change
@@ -55,36 +55,33 @@
5555
#ifndef AUTOWARE__CROP_BOX_FILTER__CROP_BOX_FILTER_NODE_HPP_
5656
#define AUTOWARE__CROP_BOX_FILTER__CROP_BOX_FILTER_NODE_HPP_
5757

58-
#include <geometry_msgs/msg/polygon_stamped.hpp>
59-
#include <sensor_msgs/msg/point_cloud2.hpp>
60-
#include <sensor_msgs/point_cloud2_iterator.hpp>
61-
58+
#include <autoware/point_types/types.hpp>
6259
#include <autoware_utils/ros/debug_publisher.hpp>
6360
#include <autoware_utils/ros/managed_transform_buffer.hpp>
6461
#include <autoware_utils/ros/published_time_publisher.hpp>
6562
#include <autoware_utils/system/stop_watch.hpp>
6663

67-
#include <autoware/point_types/types.hpp>
64+
#include <geometry_msgs/msg/polygon_stamped.hpp>
65+
#include <sensor_msgs/msg/point_cloud2.hpp>
66+
#include <sensor_msgs/point_cloud2_iterator.hpp>
6867

6968
#include <memory>
70-
#include <vector>
7169
#include <string>
7270
#include <utility>
71+
#include <vector>
7372

7473
namespace autoware::crop_box_filter
7574
{
7675
class CropBoxFilter : public rclcpp::Node
7776
{
77+
using PointCloud2 = sensor_msgs::msg::PointCloud2;
78+
using PointCloud2ConstPtr = sensor_msgs::msg::PointCloud2::ConstSharedPtr;
7879

79-
using PointCloud2 = sensor_msgs::msg::PointCloud2;
80-
using PointCloud2ConstPtr = sensor_msgs::msg::PointCloud2::ConstSharedPtr;
81-
82-
using PointCloud = pcl::PointCloud<pcl::PointXYZ>;
83-
using PointCloudPtr = PointCloud::Ptr;
84-
using PointCloudConstPtr = PointCloud::ConstPtr;
80+
using PointCloud = pcl::PointCloud<pcl::PointXYZ>;
81+
using PointCloudPtr = PointCloud::Ptr;
82+
using PointCloudConstPtr = PointCloud::ConstPtr;
8583

8684
private:
87-
8885
// member variable declaration & definitions *************************************
8986

9087
/** \brief The managed transform buffer. */
@@ -141,16 +138,16 @@ using PointCloudConstPtr = PointCloud::ConstPtr;
141138
std::unique_ptr<autoware_utils::PublishedTimePublisher> published_time_publisher_;
142139

143140
// function declaration *************************************
144-
141+
145142
void publish_crop_box_polygon();
146-
143+
147144
void pointcloud_callback(const PointCloud2ConstPtr cloud);
148145

149146
/** \brief Parameter service callback */
150147
rcl_interfaces::msg::SetParametersResult param_callback(const std::vector<rclcpp::Parameter> & p);
151148

152-
/** \brief Return whether the input PointCloud2 data has the same layout than PointXYZI. That is to
153-
* say whether you can memcpy from the PointCloud2 data buffer to a PointXYZI */
149+
/** \brief Return whether the input PointCloud2 data has the same layout than PointXYZI. That is
150+
* to say whether you can memcpy from the PointCloud2 data buffer to a PointXYZI */
154151
bool is_data_layout_compatible_with_point_xyzi(const PointCloud2 & input);
155152

156153
/** \brief Return whether the input PointCloud2 data has the same layout than PointXYZIRC. That is
@@ -161,8 +158,8 @@ using PointCloudConstPtr = PointCloud::ConstPtr;
161158
* is to say whether you can memcpy from the PointCloud2 data buffer to a PointXYZIRADRT */
162159
bool is_data_layout_compatible_with_point_xyziradrt(const PointCloud2 & input);
163160

164-
/** \brief Return whether the input PointCloud2 data has the same layout than PointXYZIRCAEDT. That
165-
* is to say whether you can memcpy from the PointCloud2 data buffer to a PointXYZIRCAEDT */
161+
/** \brief Return whether the input PointCloud2 data has the same layout than PointXYZIRCAEDT.
162+
* That is to say whether you can memcpy from the PointCloud2 data buffer to a PointXYZIRCAEDT */
166163
bool is_data_layout_compatible_with_point_xyzircaedt(const PointCloud2 & input);
167164

168165
bool is_valid(const PointCloud2ConstPtr & cloud);
@@ -180,7 +177,6 @@ using PointCloudConstPtr = PointCloud::ConstPtr;
180177
}
181178
return false;
182179
}
183-
184180

185181
public:
186182
PCL_MAKE_ALIGNED_OPERATOR_NEW

sensing/autoware_crop_box_filter/package.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
<maintainer email="lxg19892021@gmail.com">Xingang Liu</maintainer>
1818
<license>Apache License 2.0</license>
1919

20-
2120
<!-- Original authors -->
2221
<author>Open Perception</author>
2322
<author email="julius@kammerl.de">Julius Kammerl</author>
@@ -28,10 +27,10 @@
2827

2928
<depend>autoware_point_types</depend>
3029
<depend>autoware_utils</depend>
30+
<depend>geometry_msgs</depend>
3131
<depend>rclcpp</depend>
3232
<depend>rclcpp_components</depend>
3333
<depend>sensor_msgs</depend>
34-
<depend>geometry_msgs</depend>
3534

3635
<test_depend>ament_lint_auto</test_depend>
3736
<test_depend>autoware_lint_common</test_depend>

0 commit comments

Comments
 (0)