mirror of
https://github.com/bjoernellens1/cps_rmp220_support.git
synced 2024-11-23 15:45:08 +00:00
update: implement laser filter
This commit is contained in:
parent
224924ca64
commit
b58f81845b
15
config/box_filter.yaml
Normal file
15
config/box_filter.yaml
Normal file
@ -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.16
|
||||||
|
max_y: 0.16
|
||||||
|
max_z: 0.1
|
||||||
|
min_x: -0.41
|
||||||
|
min_y: -0.16
|
||||||
|
min_z: -0.2
|
||||||
|
|
||||||
|
invert: false # activate to remove all points outside of the box
|
@ -8,6 +8,7 @@ from launch.actions import DeclareLaunchArgument
|
|||||||
from launch.actions import LogInfo
|
from launch.actions import LogInfo
|
||||||
from launch.substitutions import LaunchConfiguration
|
from launch.substitutions import LaunchConfiguration
|
||||||
from launch_ros.actions import Node
|
from launch_ros.actions import Node
|
||||||
|
from launch.substitutions import ThisLaunchFileDir
|
||||||
|
|
||||||
def generate_launch_description():
|
def generate_launch_description():
|
||||||
channel_type = LaunchConfiguration('channel_type', default='serial')
|
channel_type = LaunchConfiguration('channel_type', default='serial')
|
||||||
@ -68,4 +69,9 @@ def generate_launch_description():
|
|||||||
}],
|
}],
|
||||||
#namespace = "/rmp"
|
#namespace = "/rmp"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
IncludeLaunchDescription(
|
||||||
|
PythonLaunchDescriptionSource([ThisLaunchFileDir(), 'robot_scan_filter.launch.py']),
|
||||||
|
#launch_arguments={'my_arg': 'new_value'}.items() # You can pass arguments here
|
||||||
|
),
|
||||||
])
|
])
|
||||||
|
18
launch/robot_scan_filter.launch.py
Normal file
18
launch/robot_scan_filter.launch.py
Normal file
@ -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_rmp220_support"),
|
||||||
|
"config", "box_filter.yaml",
|
||||||
|
])],
|
||||||
|
)
|
||||||
|
])
|
Loading…
Reference in New Issue
Block a user