|
| 1 | +#!/usr/bin/env python3 |
| 2 | + |
| 3 | +"""Launch psdk_wrapper node.""" |
| 4 | + |
1 | 5 | # Copyright 2023 Universidad Politécnica de Madrid
|
2 | 6 | #
|
3 | 7 | # Redistribution and use in source and binary forms, with or without
|
|
25 | 29 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
26 | 30 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
27 | 31 | # POSSIBILITY OF SUCH DAMAGE.
|
28 |
| -"""Launch psdk_wrapper node.""" |
29 |
| -from launch import LaunchDescription |
30 |
| -from launch_ros.substitutions import FindPackageShare |
31 |
| -from launch.actions import EmitEvent, DeclareLaunchArgument |
| 32 | + |
| 33 | +__authors__ = "Rafael Pérez Seguí" |
| 34 | +__copyright__ = "Copyright (c) 2022 Universidad Politécnica de Madrid" |
| 35 | +__license__ = "BSD-3-Clause" |
| 36 | +__version__ = "0.1.0" |
| 37 | + |
| 38 | +import lifecycle_msgs.msg |
32 | 39 | from launch_ros.actions import LifecycleNode
|
33 | 40 | from launch_ros.events.lifecycle import ChangeState
|
| 41 | +from launch_ros.substitutions import FindPackageShare |
| 42 | +from launch.actions import EmitEvent, DeclareLaunchArgument |
| 43 | +from launch import LaunchDescription |
34 | 44 | from launch.substitutions import LaunchConfiguration, EnvironmentVariable, PathJoinSubstitution
|
35 |
| -import lifecycle_msgs.msg |
36 | 45 | import launch
|
37 | 46 |
|
38 | 47 |
|
39 |
| -def generate_launch_description(): |
| 48 | +def generate_launch_description() -> LaunchDescription: |
| 49 | + """ |
| 50 | + Entry point for launch file. |
| 51 | +
|
| 52 | + :return: Launch description |
| 53 | + :rtype: LaunchDescription |
| 54 | + """ |
40 | 55 | # Declare the namespace launch argument
|
41 | 56 | psdk_params_file = PathJoinSubstitution([
|
42 | 57 | FindPackageShare('as2_platform_dji_psdk'),
|
@@ -72,7 +87,8 @@ def generate_launch_description():
|
72 | 87 | remappings=[
|
73 | 88 | ("psdk_ros2/gps_position_fused", "sensor_measurements/gps"),
|
74 | 89 | ("psdk_ros2/imu", "sensor_measurements/imu"),
|
75 |
| - ("psdk_ros2/main_camera_stream", "sensor_measurements/main_camera/image_raw"), |
| 90 | + ("psdk_ros2/main_camera_stream", |
| 91 | + "sensor_measurements/main_camera/image_raw"), |
76 | 92 | ]
|
77 | 93 | )
|
78 | 94 |
|
|
0 commit comments