Range_sensor_layer marking not getting cleared by itself or laserscan?

asked 2015-10-15 11:58:27 -0600

miguel gravatar image

updated 2015-10-17 16:51:36 -0600

Hello, (Im running ROS-Indigo, Ubuntu 14.04 - with a laserscan being generated from a depth camera and an ultrasonic sensor)

I am having an issue with my costmap configuration, The range_sensor_layer firstly does not appear to be marking in the local costmap, and secondly, marks in the global map but does not get cleared. I have limited the ultrasonic sensor to 0.8m as it just provides a range for distances less than 80cm as my depth camera cannot measure range below that. As you can see in my configurations below, the clear_on_max_reading is set to true, so i would think once it is above 0.8 in the same place it would clear it as my laser scan does? why is this not the case?

and why does it not get marked in the local costmap?

Lastly could you make the laserscan supersede the range_sensor_layer in the sense that if the laserscan reads a range larger than the previously marked sonar range that it clears on behalf of it?

Common_costmap.yaml

 footprint: [[-0.230,-0.16],[-0.230, 0.16],[0.230,0.16],[0.23,-0.16]]
    footprint_padding: 0.01

    robot_base_frame: base_link
    update_frequency: 4.0
    publish_frequency: 1.0
    transform_tolerance: 0.5

    resolution: 0.05

    obstacle_range: 2.0
    raytrace_range: 1.5

    #layer definitions
    static:
        map_topic: /map
        subscribe_to_updates: true

    obstacles_laser:
        observation_sources: laser
        laser: {data_type: LaserScan, clearing: true, marking: true, topic: scan, inf_is_valid: true, expected_update_rate: 2.0 }

    inflation:
        inflation_radius: 0.05

local_costmap.yaml

global_frame: odom
rolling_window: true

plugins:
  - {name: obstacles_laser,           type: "costmap_2d::ObstacleLayer"}
  - {name: range_sensor_layer, type: "range_sensor_layer::RangeSensorLayer"}
  - {name: inflation,                 type: "costmap_2d::InflationLayer"}

range_sensor_layer:
 expected_update_rate: 0.5
 clear_on_max_reading: true
 topics: ["/ultrasound1"]

Global_costmap.yaml

global_frame: odom
rolling_window: true

plugins:
  - {name: obstacles_laser,           type: "costmap_2d::ObstacleLayer"}
  - {name: range_sensor_layer, type: "range_sensor_layer::RangeSensorLayer"}
  - {name: inflation,                 type: "costmap_2d::InflationLayer"}

range_sensor_layer:
 expected_update_rate: 0.5
 clear_on_max_reading: true
 topics: ["/ultrasound1"]

UPDATE: /ultrasound1 output

---
header: 
  seq: 85
  stamp: 
    secs: 1444990544
    nsecs: 488128984
  frame_id: /ultrasound1
radiation_type: 0
field_of_view: 0.10000000149
min_range: 0.10000000149
max_range: 2.0
range: 0.479999989271
---
edit retag flag offensive close merge delete

Comments

Interesting, I have the problem that my ir range sensors in the local costmap are not getting cleared. Can you paste the output of "rostopic echo -n 1 /ultrasound1"?

Humpelstilzchen gravatar image Humpelstilzchen  ( 2015-10-16 03:13:53 -0600 )edit

Please see update in Question. I hope we can resolve this together.

miguel gravatar image miguel  ( 2015-10-17 16:52:07 -0600 )edit

ok sorry for the late reply, somehow I missed the notification, anyway: Can you try the costmap with a wider field_of_view for ultrasound1, say 0.7 (40°)?

Humpelstilzchen gravatar image Humpelstilzchen  ( 2015-10-22 11:42:35 -0600 )edit

No problem, thanks for replying. Okay, I will try and update you with the results as soon as I can.

miguel gravatar image miguel  ( 2015-10-22 11:59:59 -0600 )edit

Btw for the latter question: Try to set combination_method of your obstacle layer to 0 (Overwrite). The option should be visible in Dynamic Reconfigure.

Humpelstilzchen gravatar image Humpelstilzchen  ( 2015-10-22 12:52:55 -0600 )edit

how do I do that im not sure if I understand what you saying?

miguel gravatar image miguel  ( 2015-10-22 13:46:31 -0600 )edit

Start rqt, load dynamics reconfigure plugin, go to move_base-><x>_costmap->obstacle_layer and select combination_method

Humpelstilzchen gravatar image Humpelstilzchen  ( 2015-10-22 14:16:56 -0600 )edit

Ok thank you, I will give it a try ASAP

miguel gravatar image miguel  ( 2015-10-22 14:54:32 -0600 )edit