28 lines
737 B
Python
28 lines
737 B
Python
from launch import LaunchDescription
|
|
from launch.substitutions import PathJoinSubstitution
|
|
from launch_ros.actions import Node
|
|
from launch_ros.substitutions import FindPackageShare
|
|
|
|
from pathlib import Path
|
|
|
|
def generate_launch_description():
|
|
|
|
basedir = FindPackageShare("mg_lidar")
|
|
|
|
lidar_config = PathJoinSubstitution([basedir, "config/lidar.yaml"])
|
|
|
|
return LaunchDescription([
|
|
Node(
|
|
package='mg_lidar',
|
|
executable='mg_scanner',
|
|
output="screen",
|
|
parameters=[lidar_config]
|
|
),
|
|
Node(
|
|
package='rplidar_ros',
|
|
executable='rplidar_composition',
|
|
output="screen",
|
|
parameters=[lidar_config]
|
|
),
|
|
])
|
|
|