-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. Re-implemented the data retrieving logic based on async fetching a…
…nd decoding mechanism to improve performance 2. RPLIDAR C1 support 3. merge PR#28O
- Loading branch information
Showing
56 changed files
with
5,028 additions
and
1,791 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
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
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,71 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import os | ||
|
||
from ament_index_python.packages import get_package_share_directory | ||
from launch import LaunchDescription | ||
from launch.actions import DeclareLaunchArgument | ||
from launch.actions import LogInfo | ||
from launch.substitutions import LaunchConfiguration | ||
from launch_ros.actions import Node | ||
|
||
|
||
def generate_launch_description(): | ||
channel_type = LaunchConfiguration('channel_type', default='serial') | ||
serial_port = LaunchConfiguration('serial_port', default='/dev/ttyUSB0') | ||
serial_baudrate = LaunchConfiguration('serial_baudrate', default='460800') | ||
frame_id = LaunchConfiguration('frame_id', default='laser') | ||
inverted = LaunchConfiguration('inverted', default='false') | ||
angle_compensate = LaunchConfiguration('angle_compensate', default='true') | ||
scan_mode = LaunchConfiguration('scan_mode', default='Standard') | ||
|
||
return LaunchDescription([ | ||
DeclareLaunchArgument( | ||
'channel_type', | ||
default_value=channel_type, | ||
description='Specifying channel type of lidar'), | ||
|
||
DeclareLaunchArgument( | ||
'serial_port', | ||
default_value=serial_port, | ||
description='Specifying usb port to connected lidar'), | ||
|
||
DeclareLaunchArgument( | ||
'serial_baudrate', | ||
default_value=serial_baudrate, | ||
description='Specifying usb port baudrate to connected lidar'), | ||
|
||
DeclareLaunchArgument( | ||
'frame_id', | ||
default_value=frame_id, | ||
description='Specifying frame_id of lidar'), | ||
|
||
DeclareLaunchArgument( | ||
'inverted', | ||
default_value=inverted, | ||
description='Specifying whether or not to invert scan data'), | ||
|
||
DeclareLaunchArgument( | ||
'angle_compensate', | ||
default_value=angle_compensate, | ||
description='Specifying whether or not to enable angle_compensate of scan data'), | ||
|
||
DeclareLaunchArgument( | ||
'scan_mode', | ||
default_value=scan_mode, | ||
description='Specifying scan mode of lidar'), | ||
|
||
Node( | ||
package='sllidar_ros2', | ||
executable='sllidar_node', | ||
name='sllidar_node', | ||
parameters=[{'channel_type':channel_type, | ||
'serial_port': serial_port, | ||
'serial_baudrate': serial_baudrate, | ||
'frame_id': frame_id, | ||
'inverted': inverted, | ||
'angle_compensate': angle_compensate, | ||
'scan_mode': scan_mode}], | ||
output='screen'), | ||
]) | ||
|
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
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
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,85 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import os | ||
|
||
from ament_index_python.packages import get_package_share_directory | ||
from launch import LaunchDescription | ||
from launch.actions import DeclareLaunchArgument | ||
from launch.actions import LogInfo | ||
from launch.substitutions import LaunchConfiguration | ||
from launch_ros.actions import Node | ||
|
||
|
||
def generate_launch_description(): | ||
channel_type = LaunchConfiguration('channel_type', default='serial') | ||
serial_port = LaunchConfiguration('serial_port', default='/dev/ttyUSB0') | ||
serial_baudrate = LaunchConfiguration('serial_baudrate', default='460800') | ||
frame_id = LaunchConfiguration('frame_id', default='laser') | ||
inverted = LaunchConfiguration('inverted', default='false') | ||
angle_compensate = LaunchConfiguration('angle_compensate', default='true') | ||
scan_mode = LaunchConfiguration('scan_mode', default='Standard') | ||
|
||
rviz_config_dir = os.path.join( | ||
get_package_share_directory('sllidar_ros2'), | ||
'rviz', | ||
'sllidar_ros2.rviz') | ||
|
||
|
||
return LaunchDescription([ | ||
DeclareLaunchArgument( | ||
'channel_type', | ||
default_value=channel_type, | ||
description='Specifying channel type of lidar'), | ||
|
||
DeclareLaunchArgument( | ||
'serial_port', | ||
default_value=serial_port, | ||
description='Specifying usb port to connected lidar'), | ||
|
||
DeclareLaunchArgument( | ||
'serial_baudrate', | ||
default_value=serial_baudrate, | ||
description='Specifying usb port baudrate to connected lidar'), | ||
|
||
DeclareLaunchArgument( | ||
'frame_id', | ||
default_value=frame_id, | ||
description='Specifying frame_id of lidar'), | ||
|
||
DeclareLaunchArgument( | ||
'inverted', | ||
default_value=inverted, | ||
description='Specifying whether or not to invert scan data'), | ||
|
||
DeclareLaunchArgument( | ||
'angle_compensate', | ||
default_value=angle_compensate, | ||
description='Specifying whether or not to enable angle_compensate of scan data'), | ||
|
||
DeclareLaunchArgument( | ||
'scan_mode', | ||
default_value=scan_mode, | ||
description='Specifying scan mode of lidar'), | ||
|
||
Node( | ||
package='sllidar_ros2', | ||
executable='sllidar_node', | ||
name='sllidar_node', | ||
parameters=[{'channel_type':channel_type, | ||
'serial_port': serial_port, | ||
'serial_baudrate': serial_baudrate, | ||
'frame_id': frame_id, | ||
'inverted': inverted, | ||
'angle_compensate': angle_compensate, | ||
'scan_mode': scan_mode | ||
}], | ||
output='screen'), | ||
|
||
Node( | ||
package='rviz2', | ||
executable='rviz2', | ||
name='rviz2', | ||
arguments=['-d', rviz_config_dir], | ||
output='screen'), | ||
]) | ||
|
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
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
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
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
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
Oops, something went wrong.