Go2Py_SIM/deploy/ros2_nodes/lidar_node/launch/start.py

24 lines
713 B
Python
Raw Normal View History

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
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-05-21 06:45:59 +08:00
return LaunchDescription(
[
Node(
namespace='hesai_ros_driver',
package='hesai_ros_driver',
executable='hesai_ros_driver_node',
output='screen'),
Node(
namespace='rviz2',
package='rviz2',
executable='rviz2',
arguments=[
'-d',
rviz_config])])