|
38 | 38 | import os
|
39 | 39 |
|
40 | 40 | from ament_index_python.packages import get_package_share_directory
|
41 |
| -import as2_core.launch_param_utils as as2_utils |
| 41 | +from as2_core.declare_launch_arguments_from_config_file import DeclareLaunchArgumentsFromConfigFile |
| 42 | +from as2_core.launch_configuration_from_config_file import LaunchConfigurationFromConfigFile |
42 | 43 | import launch
|
43 | 44 | from launch import LaunchDescription
|
44 | 45 | from launch.actions import DeclareLaunchArgument, EmitEvent
|
@@ -79,13 +80,14 @@ def generate_launch_description() -> LaunchDescription:
|
79 | 80 | output='screen',
|
80 | 81 | emulate_tty=True,
|
81 | 82 | parameters=[
|
82 |
| - *as2_utils.launch_configuration('psdk_params_file', |
83 |
| - default_value=psdk_params_file), |
84 | 83 | {
|
85 | 84 | 'link_config_file_path': LaunchConfiguration('link_config_file_path'),
|
86 | 85 | 'hms_return_codes_path': LaunchConfiguration('hms_return_codes_path'),
|
87 | 86 | },
|
88 | 87 | LaunchConfiguration('psdk_authentication_params_file'),
|
| 88 | + LaunchConfigurationFromConfigFile( |
| 89 | + 'psdk_params_file', |
| 90 | + default_file=psdk_params_file), |
89 | 91 | ],
|
90 | 92 | remappings=[
|
91 | 93 | ('psdk_ros2/gps_position_fused', 'sensor_measurements/gps'),
|
@@ -126,9 +128,9 @@ def generate_launch_description() -> LaunchDescription:
|
126 | 128 | DeclareLaunchArgument('hms_return_codes_path',
|
127 | 129 | default_value=hms_return_codes_file,
|
128 | 130 | description='Path to JSON file with known DJI return codes'),
|
129 |
| - *as2_utils.declare_launch_arguments( |
130 |
| - 'psdk_params_file', |
131 |
| - default_value=psdk_params_file, |
| 131 | + DeclareLaunchArgumentsFromConfigFile( |
| 132 | + name='psdk_params_file', |
| 133 | + source_file=psdk_params_file, |
132 | 134 | description='Paremeters for DJI PSDK authentication'),
|
133 | 135 | ])
|
134 | 136 |
|
|
0 commit comments