ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Navigation Stack: Obstacles detected by RGB-D Camera get cleared out when disappear from FOV

asked 2020-05-13 08:35:00 -0500

haj gravatar image

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 ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-05-13 13:54:02 -0500

David Lu gravatar image

I would try making two separate obstacle layers for your two different observation sources.

edit flag offensive delete link more

Comments

Thanks for your answer! I've been trying to implement two seperate obstacle layers for my Lidar and RGB-D cam. I tried defining two different plugins both of type costmap_2d::VoxelLayer by naming them differently. However, I realized that the layer only appears in the costmap if I name it "obstacle_layer" as the default name is. Why can't I give them two different names such as "rgbd_obstacle_layer" and "lidar_obstacle_layer"?

haj gravatar image haj  ( 2020-05-25 10:03:06 -0500 )edit

You definitely can have two different names. How does it fail if you give them separate names?

David Lu gravatar image David Lu  ( 2020-06-04 17:06:22 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2020-05-13 08:35:00 -0500

Seen: 945 times

Last updated: May 13 '20