问题
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