Hi all,
I have a robot with a ZED 2 camera. For the local costmap, I want to use the obstacles_detection nodelet. To reduce CPU strain, I want to apply a voxel filter in height (z) and depth (x). This all works fine. However, I'm dealing with a large environment. For this reason, sometimes the voxel filter returns an empty point cloud. When this happens, it throws the following warning repeatedly: "obstacles_detection: Input cloud is empty! (0 x 1, is_dense=1)"
It is true, an empty point cloud is received if no obstacles are present. Is there any way to avoid this warning, since most of the times no local/close obstacles are present? My launch file is as follows:
<node name="zed_wrapper" pkg="zed_wrapper" type="zed_wrapper_node" output="screen" required="true">
<rosparam file="$(find preprocessor)/launch/include/zed_config.yaml" command="load"/>
</node>
<!-- Run a VoxelGrid filter to clean NaNs and downsample the data -->
<node pkg="nodelet" type="nodelet" name="obstacle_manager" args="manager" output="screen"/>
<node pkg="nodelet" type="nodelet" name="voxel_grid_1" args="load pcl/VoxelGrid obstacle_manager" output="screen">
<remap from="~input" to="/zed_wrapper/point_cloud/cloud_registered"/>
<remap from="~output" to="/voxel_filter"/>
<rosparam>
filter_field_name: z
filter_limit_min: -0.1
filter_limit_max: 2.0
filter_limit_negative: False
leaf_size: 0.01
</rosparam>
</node>
<node pkg="nodelet" type="nodelet" name="voxel_grid_2" args="load pcl/VoxelGrid obstacle_manager" output="screen">
<remap from="~input" to="/voxel_filter"/>
<rosparam>
filter_field_name: x
filter_limit_min: 0
filter_limit_max: 3.0
filter_limit_negative: False
leaf_size: 0.01
</rosparam>
</node>
<node pkg="nodelet" type="nodelet" name="obstacles_detection" args="load rtabmap_ros/obstacles_detection obstacle_manager">
<remap from="cloud" to="/voxel_grid_2/output"/>
<param name="frame_id" type="string" value="base_link"/>
<param name="map_frame_id" type="string" value="map"/>
</node>