Staging commit. Builds, deploys and wheels move.
Need to investigate lidar startup
This commit is contained in:
@@ -100,7 +100,7 @@ def generate_launch_description():
|
||||
lidar_launchs = [
|
||||
include_lidar('lslidar_driver', 'lsn10p_launch.py', enable_lidar, lidar_type, 'n10p'),
|
||||
include_lidar('agv_pro_bringup', 'MID360_launch.py',enable_lidar, lidar_type, 'mid360'),
|
||||
include_lidar('unitree_lidar_ros2', 'launch.py', enable_lidar, lidar_type, 'l2'),
|
||||
include_lidar('agv_pro_bringup', 'unitree_l2_launch.py', enable_lidar, lidar_type, 'l2'),
|
||||
]
|
||||
|
||||
return LaunchDescription(
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
import os
|
||||
|
||||
from launch.substitutions import LaunchConfiguration
|
||||
from launch import LaunchDescription
|
||||
from launch.actions import DeclareLaunchArgument
|
||||
from launch_ros.actions import Node
|
||||
from launch.conditions import IfCondition
|
||||
from ament_index_python.packages import get_package_share_directory
|
||||
|
||||
def generate_launch_description():
|
||||
|
||||
use_l2_rviz = LaunchConfiguration('use_rviz')
|
||||
|
||||
declare_rviz_arg = DeclareLaunchArgument(
|
||||
'use_l2_rviz',
|
||||
default_value='false',
|
||||
description='Whether to launch RViz for Unitree L2 LiDAR visualization'
|
||||
)
|
||||
|
||||
# The Unitree L2 node and its RViz config are provided by the (vanilla)
|
||||
# upstream unitree_lidar_ros2 package.
|
||||
pkg_share = get_package_share_directory('unitree_lidar_ros2')
|
||||
rviz_config_file = os.path.join(pkg_share,
|
||||
'rviz',
|
||||
'view.rviz')
|
||||
|
||||
# Run unitree lidar
|
||||
node1 = Node(
|
||||
package='unitree_lidar_ros2',
|
||||
executable='unitree_lidar_ros2_node',
|
||||
name='unitree_lidar_ros2_node',
|
||||
output='screen',
|
||||
parameters= [
|
||||
{'initialize_type': 1},
|
||||
{'work_mode': 8},
|
||||
{'use_system_timestamp': True},
|
||||
{'range_min': 0.0},
|
||||
{'range_max': 100.0},
|
||||
{'cloud_scan_num': 18},
|
||||
|
||||
{'serial_port': '/dev/ttyACM1'},
|
||||
{'baudrate': 4000000},
|
||||
|
||||
{'lidar_port': 6101},
|
||||
{'lidar_ip': '192.168.1.62'},
|
||||
{'local_port': 6201},
|
||||
{'local_ip': '192.168.1.2'},
|
||||
|
||||
{'cloud_frame': "unilidar_lidar"},
|
||||
{'cloud_topic': "unilidar/cloud"},
|
||||
{'imu_frame': "unilidar_imu"},
|
||||
{'imu_topic': "unilidar/imu"},
|
||||
]
|
||||
)
|
||||
|
||||
# Run Rviz
|
||||
rviz_node = Node(
|
||||
package='rviz2',
|
||||
executable='rviz2',
|
||||
name='rviz2',
|
||||
arguments=['-d', rviz_config_file],
|
||||
condition=IfCondition(use_l2_rviz),
|
||||
output='log'
|
||||
)
|
||||
return LaunchDescription(
|
||||
[
|
||||
declare_rviz_arg,
|
||||
node1,
|
||||
rviz_node,
|
||||
]
|
||||
)
|
||||
@@ -15,6 +15,8 @@
|
||||
<exec_depend>agv_pro_base</exec_depend>
|
||||
<exec_depend>cartographer_ros</exec_depend>
|
||||
<exec_depend>livox_ros_driver2</exec_depend>
|
||||
<exec_depend>unitree_lidar_ros2</exec_depend>
|
||||
<exec_depend>lslidar_driver</exec_depend>
|
||||
|
||||
<test_depend>ament_lint_auto</test_depend>
|
||||
<test_depend>ament_lint_common</test_depend>
|
||||
|
||||
Reference in New Issue
Block a user