|
2 | 2 | This file runs all required nodes to speak with the Ebox. |
3 | 3 | """ |
4 | 4 |
|
| 5 | +from ament_index_python.packages import get_package_share_directory |
5 | 6 | from launch import LaunchDescription |
6 | | -from launch.actions import OpaqueFunction |
| 7 | +from launch.actions import IncludeLaunchDescription |
| 8 | +from launch.launch_description_sources import PythonLaunchDescriptionSource |
| 9 | +from launch.substitutions import PathJoinSubstitution |
7 | 10 | from launch_ros.actions.node import Node |
8 | | -from rclpy.impl.rcutils_logger import RcutilsLogger |
9 | | -from rclpy.node import get_logger |
10 | 11 |
|
11 | 12 |
|
12 | 13 | def generate_launch_description() -> LaunchDescription: |
@@ -38,13 +39,38 @@ def generate_launch_description() -> LaunchDescription: |
38 | 39 | executable="sensors_node", |
39 | 40 | ) |
40 | 41 |
|
41 | | - # TODO: implement the camera launch files, then replace this! |
42 | | - camera_warning: OpaqueFunction = OpaqueFunction(function=_warn_about_camera_todos) |
43 | | - |
44 | | - return LaunchDescription([wheels_node, lights_node, sensors_node, camera_warning]) |
| 42 | + # Unitree L2 LiDAR bridge package. |
| 43 | + pkg_soro_lidar: str = get_package_share_directory("soro_lidar") |
| 44 | + lidar_launch: IncludeLaunchDescription = IncludeLaunchDescription( |
| 45 | + PythonLaunchDescriptionSource( |
| 46 | + [ |
| 47 | + PathJoinSubstitution( |
| 48 | + [ |
| 49 | + pkg_soro_lidar, |
| 50 | + "launch", |
| 51 | + "launch.py", |
| 52 | + ] |
| 53 | + ) |
| 54 | + ] |
| 55 | + ) |
| 56 | + ) |
45 | 57 |
|
| 58 | + # See3CAM color stream for ArUco marker detection. |
| 59 | + pkg_see3cam: str = get_package_share_directory("see3cam") |
| 60 | + see3cam_launch: IncludeLaunchDescription = IncludeLaunchDescription( |
| 61 | + PythonLaunchDescriptionSource( |
| 62 | + [ |
| 63 | + PathJoinSubstitution( |
| 64 | + [ |
| 65 | + pkg_see3cam, |
| 66 | + "launch", |
| 67 | + "see3cam.launch.py", |
| 68 | + ] |
| 69 | + ) |
| 70 | + ] |
| 71 | + ) |
| 72 | + ) |
46 | 73 |
|
47 | | -def _warn_about_camera_todos(_): |
48 | | - # we'll emit a diagnostic to remind ourselves lol |
49 | | - logger: RcutilsLogger = get_logger("ebox.launch.py") |
50 | | - _ = logger.error("TODO: implement cameras in launch file!") |
| 74 | + return LaunchDescription( |
| 75 | + [wheels_node, lights_node, sensors_node, lidar_launch, see3cam_launch] |
| 76 | + ) |
0 commit comments