Navigation Stack: Obstacles detected by RGB-D Camera get cleared out when disappear from FOV
Hi there,
I am currently running the ROS Navigation Stack on my 4 wheeled indoor robot which is equipped with ad lidar (RPLidar) and a Rbg-D (Astra Pro) camera. I am running it on ROS Melodic and the OS is Ubuntu 18.04.
I am using both the lidar and the rgb-d camera to create the costmap and my global costmap depends on a OccupancyGrid map created with gmapping. The navigation task works fine. However, I am experiencing the issue that objects which can only be detected by the rgb-d camera (because the lidar looks over them) at first get registered into the local costmap once they appear in the FOV of the camera but they get cleared out as soon as they disappear from the FOV of the camera. This is undesirable because at times the robot then gets confused.
First, I thought that the problem might be that the lidar clears out the object as soon as the depth cam does not see it anymore. However, as far as my understanding goes, objects are first transformed into the 3DVoxellayer before being projected onto the 2D costmap. So the lidar should not be able to clear out anything that is not on its height. Just to make sure, I have tried setting the "clearing" parameter of the lidar laser scan source to false without any positive effect.
Does anyone know what the source of this behaviour could be? Has anyone experienced the same issue or knows how to tweak the parameters to get it to work the way I want?
Below I provide my costmap_common_params.yaml:
max_obstacle_height: 0.16
obstacle_range: 8.0 #5.0 2.5
raytrace_range: 12.0 #3.0
footprint: [[-0.17, 0.16], [0.17, 0.16], [0.17, -0.16], [-0.17, -0.16]]
robot_radius: ir_of_robot
inflation_radius: 0.4
cost_scaling_factor: 5.0
observation_sources: laser_scan_sensor point_cloud_sensor
laser_scan_sensor: {sensor_frame: laser, data_type: LaserScan, topic: scan, marking: true, clearing: true, inf_is_valid: true}
point_cloud_sensor: {data_type: PointCloud2, topic: /pointcloud_filtered, marking: true, clearing: true}
tack_unknown_space: true
My local_costmap_params.yaml:
local_costmap:
global_frame: odom #map
robot_base_frame: base_link
update_frequency: 5.0
publish_frequency: 2.0
static_map: false
rolling_window: true
width: 4.0 #6.0
height: 4.0 #6.0
resolution: 0.05
My global_costmap_params.yaml:
global_costmap:
global_frame: map
robot_base_frame: base_link
update_frequency: 5.0
static_map: true
And my move_base.launch for running the navigation stack:
<launch>
<master auto="start"/>
<!-- Run the map server -->
<node name="map_server" pkg="map_server" type="map_server" args="$(find helmoro_2dnav)/helmoro_maps/mymap.yaml"/>
<!--- Run AMCL -->
<include file="$(find amcl)/examples/amcl_omni.launch" />
<!-- Topic -->
<arg name="move_base_topic" default="/move_base_cmd" />
<node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
<rosparam file="$(find helmoro_2dnav)/costmap_common_params.yaml" command="load" ns="global_costmap" />
<rosparam file="$(find helmoro_2dnav)/costmap_common_params.yaml" command="load" ns="local_costmap" />
<rosparam file="$(find helmoro_2dnav)/local_costmap_params.yaml" command="load" />
<rosparam file="$(find helmoro_2dnav)/global_costmap_params.yaml" command="load" />
<rosparam file="$(find helmoro_2dnav)/base_local_planner_params.yaml" command="load" />
<rosparam file="$(find helmoro_2dnav)/global_planner_params ...