From 7f305d64563fdbc602222ee7b608eadffd72f9ac Mon Sep 17 00:00:00 2001 From: bjoernellens1 <64093272+bjoernellens1@users.noreply.github.com> Date: Fri, 24 Nov 2023 09:37:22 +0100 Subject: [PATCH] update: inlcude scan filter node --- config/box_filter.yaml | 15 +++++++++++++++ launch/robot_scan_filter.launch.py | 18 ++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 config/box_filter.yaml create mode 100644 launch/robot_scan_filter.launch.py diff --git a/config/box_filter.yaml b/config/box_filter.yaml new file mode 100644 index 0000000..d4c184d --- /dev/null +++ b/config/box_filter.yaml @@ -0,0 +1,15 @@ +scan_to_scan_filter_chain: + ros__parameters: + filter1: + name: box_filter + type: laser_filters/LaserScanBoxFilter + params: + box_frame: laser_frame + max_x: 0.80 #was 0.16 + max_y: 0.18 #was 0.17 + max_z: 0.1 + min_x: -0.15 #was -0.41 + min_y: -0.18 # was -0.17 + min_z: -0.2 + + invert: false # activate to remove all points outside of the box \ No newline at end of file diff --git a/launch/robot_scan_filter.launch.py b/launch/robot_scan_filter.launch.py new file mode 100644 index 0000000..41dd487 --- /dev/null +++ b/launch/robot_scan_filter.launch.py @@ -0,0 +1,18 @@ +from launch import LaunchDescription +from launch.substitutions import PathJoinSubstitution +from launch_ros.actions import Node +from ament_index_python.packages import get_package_share_directory + + +def generate_launch_description(): + return LaunchDescription([ + Node( + package="laser_filters", + executable="scan_to_scan_filter_chain", + parameters=[ + PathJoinSubstitution([ + get_package_share_directory("cps_loki_bringup"), + "config", "box_filter.yaml", + ])], + ) + ]) \ No newline at end of file