2024-02-04 08:18:52 +08:00
|
|
|
from launch import LaunchDescription
|
|
|
|
from launch_ros.actions import Node
|
|
|
|
from ament_index_python.packages import get_package_share_directory
|
2024-05-21 06:45:59 +08:00
|
|
|
|
|
|
|
|
2024-02-04 08:18:52 +08:00
|
|
|
def generate_launch_description():
|
2024-05-21 06:45:59 +08:00
|
|
|
rviz_config = get_package_share_directory('hesai_ros_driver') + '/rviz/rviz2.rviz'
|
2024-02-04 08:18:52 +08:00
|
|
|
return LaunchDescription([
|
|
|
|
Node(
|
|
|
|
package='hesai_ros_driver',
|
|
|
|
node_namespace='hesai_ros_driver',
|
|
|
|
node_name='hesai_ros_driver_node',
|
|
|
|
node_executable='hesai_ros_driver_node',
|
|
|
|
output='screen'
|
|
|
|
),
|
|
|
|
Node(
|
|
|
|
package='rviz2',
|
|
|
|
node_namespace='rviz2',
|
|
|
|
node_name='rviz2',
|
|
|
|
node_executable='rviz2',
|
2024-05-21 06:45:59 +08:00
|
|
|
arguments=['-d', rviz_config]
|
2024-02-04 08:18:52 +08:00
|
|
|
)
|
|
|
|
])
|