16
16
17
17
import launch
18
18
from launch .actions import DeclareLaunchArgument
19
+ from launch .actions import IncludeLaunchDescription
19
20
from launch .actions import OpaqueFunction
20
21
from launch .actions import SetLaunchConfiguration
21
22
from launch .conditions import IfCondition
22
23
from launch .conditions import UnlessCondition
24
+ from launch .launch_description_sources import PythonLaunchDescriptionSource
23
25
from launch .substitutions import LaunchConfiguration
24
26
from launch_ros .actions import ComposableNodeContainer
25
27
from launch_ros .actions import LoadComposableNodes
26
28
from launch_ros .descriptions import ComposableNode
29
+ from launch_ros .substitutions import FindPackageShare
27
30
import yaml
28
31
29
32
@@ -121,7 +124,7 @@ def launch_setup(context, *args, **kwargs):
121
124
name = 'scan_ground_filter' ,
122
125
remappings = [
123
126
('input' , 'measurement_range_cropped/pointcloud' ),
124
- ('output' , 'no_ground/pointcloud' )
127
+ ('output' , 'no_ground/oneshot/ pointcloud' )
125
128
],
126
129
parameters = [{
127
130
'global_slope_max' : 10.0 ,
@@ -134,6 +137,37 @@ def launch_setup(context, *args, **kwargs):
134
137
}],
135
138
)
136
139
140
+ load_laserscan_to_occupancy_grid_map = IncludeLaunchDescription (
141
+ PythonLaunchDescriptionSource (
142
+ [
143
+ FindPackageShare ('laserscan_to_occupancy_grid_map' ),
144
+ '/launch/laserscan_to_occupancy_grid_map.launch.py'
145
+ ]
146
+ ),
147
+ launch_arguments = {
148
+ 'container' :
149
+ '/sensing/lidar/pointcloud_preprocessor/pointcloud_preprocessor_container' ,
150
+ 'input/obstacle_pointcloud' : 'no_ground/oneshot/pointcloud' ,
151
+ 'input/raw_pointcloud' : 'concatenated/pointcloud' ,
152
+ 'output' : 'occupancy_grid' ,
153
+ 'use_intra_process' : LaunchConfiguration ('use_intra_process' ),
154
+ }.items ()
155
+ )
156
+
157
+ occupancy_grid_map_outlier_component = ComposableNode (
158
+ package = pkg ,
159
+ plugin = 'pointcloud_preprocessor::OccupancyGridMapOutlierFilterComponent' ,
160
+ name = 'occupancy_grid_map_outlier_filter' ,
161
+ remappings = [
162
+ ('~/input/occupancy_grid_map' , 'occupancy_grid' ),
163
+ ('~/input/pointcloud' , 'no_ground/oneshot/pointcloud' ),
164
+ ('~/output/pointcloud' , 'no_ground/pointcloud' ),
165
+ ],
166
+ extra_arguments = [{
167
+ 'use_intra_process_comms' : LaunchConfiguration ('use_intra_process' )
168
+ }],
169
+ )
170
+
137
171
# set container to run all required components in the same process
138
172
container = ComposableNodeContainer (
139
173
name = 'pointcloud_preprocessor_container' ,
@@ -143,6 +177,7 @@ def launch_setup(context, *args, **kwargs):
143
177
composable_node_descriptions = [
144
178
cropbox_component ,
145
179
ground_component ,
180
+ occupancy_grid_map_outlier_component ,
146
181
],
147
182
output = 'screen' ,
148
183
)
@@ -160,7 +195,7 @@ def launch_setup(context, *args, **kwargs):
160
195
condition = UnlessCondition (LaunchConfiguration ('use_concat_filter' )),
161
196
)
162
197
163
- return [container , concat_loader , passthrough_loader ]
198
+ return [container , concat_loader , passthrough_loader , load_laserscan_to_occupancy_grid_map ]
164
199
165
200
166
201
def generate_launch_description ():
0 commit comments