12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
+ import os
15
16
17
+ from ament_index_python .packages import get_package_share_directory
16
18
import launch
17
19
from launch .actions import DeclareLaunchArgument
18
20
from launch .actions import OpaqueFunction
22
24
from launch .substitutions import LaunchConfiguration
23
25
from launch_ros .actions import LoadComposableNodes
24
26
from launch_ros .descriptions import ComposableNode
25
-
27
+ from launch_ros . parameter_descriptions import ParameterFile
26
28
27
29
def launch_setup (context , * args , ** kwargs ):
30
+ # concatenate node parameters
31
+ concatenate_and_time_sync_node_param = ParameterFile (
32
+ param_file = LaunchConfiguration ("concatenate_and_time_sync_node_param_path" ).perform (
33
+ context
34
+ ),
35
+ allow_substs = True ,
36
+ )
28
37
# set concat filter as a component
29
38
concat_component = ComposableNode (
30
39
package = "autoware_pointcloud_preprocessor" ,
@@ -37,19 +46,7 @@ def launch_setup(context, *args, **kwargs):
37
46
),
38
47
("output" , "concatenated/pointcloud" ),
39
48
],
40
- parameters = [
41
- {
42
- "input_topics" : [
43
- "/sensing/lidar/top/pointcloud_before_sync" ,
44
- "/sensing/lidar/left/pointcloud_before_sync" ,
45
- "/sensing/lidar/right/pointcloud_before_sync" ,
46
- ],
47
- "output_frame" : LaunchConfiguration ("base_frame" ),
48
- "input_twist_topic_type" : "twist" ,
49
- "publish_synchronized_pointcloud" : True ,
50
- "timeout_sec" : 0.01 ,
51
- }
52
- ],
49
+ parameters = [concatenate_and_time_sync_node_param ],
53
50
extra_arguments = [
54
51
{"use_intra_process_comms" : LaunchConfiguration ("use_intra_process" )}
55
52
],
@@ -73,10 +70,18 @@ def add_launch_arg(name: str, default_value=None):
73
70
DeclareLaunchArgument (name , default_value = default_value )
74
71
)
75
72
76
- add_launch_arg ( "base_frame" , "base_link " )
73
+ awsim_sensor_kit_launch_share_dir = get_package_share_directory ( "awsim_sensor_kit_launch " )
77
74
add_launch_arg ("use_multithread" , "False" )
78
75
add_launch_arg ("use_intra_process" , "False" )
79
76
add_launch_arg ("pointcloud_container_name" , "pointcloud_container" )
77
+ add_launch_arg (
78
+ "concatenate_and_time_sync_node_param_path" ,
79
+ os .path .join (
80
+ awsim_sensor_kit_launch_share_dir ,
81
+ "config" ,
82
+ "concatenate_and_time_sync_node.param.yaml" ,
83
+ ),
84
+ )
80
85
81
86
set_container_executable = SetLaunchConfiguration (
82
87
"container_executable" ,
0 commit comments