Add the ability to control the depth and reliability of the /scan topic
This commit is contained in:
@@ -18,6 +18,8 @@ def generate_launch_description():
|
||||
inverted = LaunchConfiguration('inverted', default='false')
|
||||
angle_compensate = LaunchConfiguration('angle_compensate', default='true')
|
||||
scan_mode = LaunchConfiguration('scan_mode', default='Sensitivity')
|
||||
scan_qos_depth = LaunchConfiguration('scan_qos_depth', default='10')
|
||||
scan_qos_reliability = LaunchConfiguration('scan_qos_reliability', default='reliable')
|
||||
|
||||
return LaunchDescription([
|
||||
|
||||
@@ -55,17 +57,28 @@ def generate_launch_description():
|
||||
default_value=scan_mode,
|
||||
description='Specifying scan mode of lidar'),
|
||||
|
||||
DeclareLaunchArgument(
|
||||
'scan_qos_depth',
|
||||
default_value=scan_qos_depth,
|
||||
description='Queue depth for the /scan publisher'),
|
||||
|
||||
DeclareLaunchArgument(
|
||||
'scan_qos_reliability',
|
||||
default_value=scan_qos_reliability,
|
||||
description='Reliability policy for the /scan publisher: best_effort or reliable'),
|
||||
|
||||
Node(
|
||||
package='sllidar_ros2',
|
||||
executable='sllidar_node',
|
||||
name='sllidar_node',
|
||||
parameters=[{'channel_type':channel_type,
|
||||
'serial_port': serial_port,
|
||||
'serial_baudrate': serial_baudrate,
|
||||
parameters=[{'channel_type': channel_type,
|
||||
'serial_port': serial_port,
|
||||
'serial_baudrate': serial_baudrate,
|
||||
'frame_id': frame_id,
|
||||
'inverted': inverted,
|
||||
'angle_compensate': angle_compensate}],
|
||||
'inverted': inverted,
|
||||
'angle_compensate': angle_compensate,
|
||||
'scan_qos_depth': scan_qos_depth,
|
||||
'scan_qos_reliability': scan_qos_reliability}],
|
||||
output='screen'),
|
||||
])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user