-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simple LIDAR filter for self (vehicle) and outer area #2
- Loading branch information
Showing
11 changed files
with
1,340 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
cmake_minimum_required(VERSION 3.8) | ||
project(lidar_pre_filter) | ||
|
||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
add_compile_options(-Wall -Wextra -Wpedantic) | ||
endif() | ||
|
||
# find dependencies | ||
find_package(ament_cmake REQUIRED) | ||
find_package(rclcpp REQUIRED) | ||
find_package(sensor_msgs REQUIRED) | ||
find_package(pcl_ros REQUIRED) | ||
find_package(pcl_conversions REQUIRED) | ||
# uncomment the following section in order to fill in | ||
# further dependencies manually. | ||
# find_package(<dependency> REQUIRED) | ||
|
||
set(INCLUDE_DIRS | ||
include | ||
${ament_cmake_INCLUDE_DIRS} | ||
${rclcpp_INCLUDE_DIRS} | ||
${sensor_msgs_INCLUDE_DIRS} | ||
${pcl_ros_INCLUDE_DIRS} | ||
${pcl_conversions_INCLUDE_DIRS} | ||
) | ||
include_directories(${INCLUDE_DIRS}) | ||
|
||
set(ament_dependencies | ||
rclcpp | ||
sensor_msgs | ||
pcl_conversions | ||
PCL | ||
) | ||
|
||
add_executable(filter_vehicle src/filter_vehicle.cpp) | ||
target_link_libraries(filter_vehicle ${PCL_LIBRARIES}) | ||
ament_target_dependencies(filter_vehicle ${ament_dependencies} ) | ||
target_compile_features(filter_vehicle PUBLIC c_std_99 cxx_std_17) # Require C99 and C++17 | ||
|
||
install(DIRECTORY | ||
launch | ||
config | ||
DESTINATION share/${PROJECT_NAME}) | ||
|
||
install(TARGETS | ||
filter_vehicle | ||
DESTINATION lib/${PROJECT_NAME}) | ||
|
||
|
||
if(BUILD_TESTING) | ||
find_package(ament_lint_auto REQUIRED) | ||
# the following line skips the linter which checks for copyrights | ||
# comment the line when a copyright and license is added to all source files | ||
set(ament_cmake_copyright_FOUND TRUE) | ||
# the following line skips cpplint (only works in a git repo) | ||
# comment the line when this package is in a git repo and when | ||
# a copyright and license is added to all source files | ||
set(ament_cmake_cpplint_FOUND TRUE) | ||
ament_lint_auto_find_test_dependencies() | ||
endif() | ||
|
||
ament_package() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# `lidar_pre_filter` ROS 2 package | ||
|
||
[![Static Badge](https://img.shields.io/badge/ROS_2-Humble-34aec5)](https://docs.ros.org/en/humble/) | ||
|
||
## Parameters | ||
|
||
| Parameter | Value e.g. | Description | | ||
|--------------|-------|-------------| | ||
| `cloud_in_topic` | `/cloud` | Pointcloud to process | | ||
| `verbose1` | `true` | More log info | | ||
| `verbose2` | `true` | More log info | | ||
| `minX_over` | -220.0| Outer crop box minX_over | | ||
| `maxX_over` | 220.0 | Outer crop box maxX_over | | ||
| `minY_over` | -220.0| Outer crop box minY_over | | ||
| `maxY_over` | 220.0 | Outer crop box maxY_over | | ||
| `minZ_over` | -10.0 | Outer crop box minZ_over | | ||
| `maxZ_over` | -0.05 | Outer crop box maxZ_over | | ||
| `minX_vehicle` | -2.0 | Negative vehicle filter minX_vehicle | | ||
| `maxX_vehicle` | +2.0 | Negative vehicle filter maxX_vehicle | | ||
| `minY_vehicle` | -2.0 | Negative vehicle filter minY_vehicle | | ||
| `maxY_vehicle` | +2.0 | Negative vehicle filter maxY_vehicle | | ||
|
||
![Architecture](../img/filter01.png) | ||
|
||
|
||
## Run | ||
|
||
``` bash | ||
ros2 launch lidar_pre_filter filter_vehicle01.launch.py topic:=/lexus3/os_center/points | ||
``` |
Oops, something went wrong.