Recovery behavior clears the obstacle layer

久未见 提交于 2020-04-30 06:29:23

问题


I am using RP-Lidar /scan topic together with move_base from navigation stack. Although the obstacle layer is parameterized to get the LaserScan type data from /scan topic, I am recieving the message that "Recover behavior will clear layer 'obstacles'". I would like to mention that the UniTest over /scan topic and /odom topic are working fine. Thus in my RVIZ, the obstacle are not shown neither the planner takes them into account to prevent a collision. For clarity here is my common config file:

footprint: [ [-0.15,-0.15], [0.15,-0.15], [0.15,0.15], [-0.15,0.15] ]
transform_tolerance: 0.5
map_type: costmap
obstacle_layer:
 enabled: true
 obstacle_range: 3.0
 raytrace_range: 3.5
 inflation_radius: 0.2
 track_unknown_space: false
 combination_method: 1
 observation_sources: laser_scan_sensor
 laser_scan_sensor: {sensor_frame: scanmatcher_frame, data_type: LaserScan, topic: /scan, marking: true, clearing: false}
inflation_layer:
  enabled:              true
  cost_scaling_factor:  1.0  
  inflation_radius:     0.2
obstacle_layer:
     enabled: true
     obstacle_range: 5.0
     raytrace_range: 1.0
     observation_sources: "/scan"
     observation_persistence: 0.0
     inf_is_valid: false
     scan:
       data_type: LaserScan
       topic: scan  

回答1:


Your observation_sources should be scan not "/scan".

As mentioned in the Obstacle Layer wiki:

A list of observation source names separated by spaces. This defines each of the namespaces defined below. Each source_name in observation_sources defines a namespace in which parameters can be set:

~//topic (string, default: source_name)

The topic on which sensor data comes in for this source. Defaults to the name of the source.



来源:https://stackoverflow.com/questions/61379723/recovery-behavior-clears-the-obstacle-layer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!