|
| 1 | +# autoware_crop_box_filter |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +The `autoware_crop_box_filter` is a package that crops the input pointcloud to a specified bounding box. This is useful for reducing the computational load and improving the performance of the system. |
| 6 | + |
| 7 | +## Design |
| 8 | + |
| 9 | +The `autoware_crop_box_filter` is implemented as a autoware core node that subscribes to the input pointcloud, and publishes the filtered pointcloud. The bounding box is specified using the `min_point` and `max_point` parameters. |
| 10 | + |
| 11 | +## Inputs / Outputs |
| 12 | + |
| 13 | +### Input |
| 14 | + |
| 15 | +| Name | Type | Description | |
| 16 | +| ----------------- | ------------------------------- | ----------------- | |
| 17 | +| `~/input/points` | `sensor_msgs::msg::PointCloud2` | reference points | |
| 18 | + |
| 19 | +### Output |
| 20 | + |
| 21 | +| Name | Type | Description | |
| 22 | +| ----------------- | ------------------------------- | --------------- | |
| 23 | +| `~/output/points` | `sensor_msgs::msg::PointCloud2` | filtered points | |
| 24 | +| `~/crop_box_polygon` | `geometry_msgs::msg::PolygonStamped` | bounding box polygon | |
| 25 | + |
| 26 | +## Parameters |
| 27 | + |
| 28 | +### Launch file Parameters |
| 29 | + |
| 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 | + |
| 38 | + |
| 39 | +### Node Parameters |
| 40 | + |
| 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 | |
| 50 | + |
| 51 | +## Usage |
| 52 | + |
| 53 | +### 1.publish static tf from input pointcloud to target frame that is used for filtering |
| 54 | + |
| 55 | +```cpp |
| 56 | +ros2 run tf2_ros static_transform_publisher 2.0 3.2 1.3 0 0 0 1 velodyne_top_base_link base_link |
| 57 | +``` |
| 58 | + |
| 59 | +### 2.launch node |
| 60 | + |
| 61 | +```cpp |
| 62 | +ros2 launch autoware_crop_box_filter crop_box_filter_node.launch.xml |
| 63 | +``` |
| 64 | + |
| 65 | +### 3. launch rviz2 and AWSIM |
0 commit comments