Added basic launch file for mg_lidar
This commit is contained in:
@ -46,12 +46,11 @@ install( TARGETS
|
||||
DESTINATION lib/${PROJECT_NAME}
|
||||
)
|
||||
|
||||
# install(DIRECTORY
|
||||
# mg_scanner
|
||||
# config
|
||||
# launch
|
||||
# DESTINATION share/${PROJECT_NAME}/
|
||||
# )
|
||||
install(DIRECTORY
|
||||
config
|
||||
launch
|
||||
DESTINATION share/${PROJECT_NAME}/
|
||||
)
|
||||
|
||||
target_compile_features(mg_scanner PUBLIC
|
||||
c_std_99
|
||||
|
||||
4
mg_lidar/config/lidar.yaml
Normal file
4
mg_lidar/config/lidar.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
rplidar_node:
|
||||
ros__parameters:
|
||||
scan_mode: "ppbig"
|
||||
topic_name: "base-link"
|
||||
28
mg_lidar/launch/launch.py
Normal file
28
mg_lidar/launch/launch.py
Normal file
@ -0,0 +1,28 @@
|
||||
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]
|
||||
),
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user