Obstacle showing up in global costmap and not inflating
Hey, I have setup costmap parameters using the tutorial and answers from the forum but I still can't get it to work right. The local cost map doesn't show the obstacle, the obstacle shows up in the global cost map but it is not inflated. I did try putting the inflation and obstacle layer in the local costmap with static and inflation layer in the global one but it didn't change much. Here are the params, how should I got about correcting this?
common params
robot_base_frame: dbot/base_link
max_obstacle_height: 4.0
robot_radius: 0.25
plugins:
- {name: static_layer, type: "costmap_2d::StaticLayer"}
- {name: obstacle_layer, type: "costmap_2d::ObstacleLayer"}
- {name: inflated_layer, type: "costmap_2d::InflationLayer"}
static_layer:
map_topic: /map
subscribe_to_updates: true
obstacle_layer:
observation_sources: laser depth
laser:
topic: /dbot/scan
sensor_frame: dbot/sensor_laser
observation_persistence: 10.0
expected_update_rate: 10.0
data_type: LaserScan
clearing: true
marking: true
max_obstacle_height: 3.0
min_obstacle_height: 0.05
obstacle_range: 4.0
raytrace_range: 6.0
depth:
topic: /dbot/kinect/depth/points
sensor_frame: dbot/kinect
observation_persistence: 10.0
expected_update_rate: 10.0
data_type: PointCloud2
clearing: true
marking: true
max_obstacle_height: 3.0
min_obstacle_height: 0.05
obstacle_range: 3.0
raytrace_range: 3.0
inflated_layer:
inflation_radius: 1.0
cost_scaling_factor: 10.0
global params
global_costmap:
global_frame: map
robot_base_frame: dbot/base_link
# update_frequency: 10.0 -> 5.0 # Changed
# publish_frequency: 10.0 -> 2.0 # Changed
transform_tolerance: 0.5
static_map: true
height: 50
widht: 50
local params
local_costmap:
global_frame: dbot/odom
robot_base_frame: dbot/base_link
# update_frequency: 10.0 -> 5.0 # Changed
# publish_frequency: 10.0 -> 2.0 # Changed
transform_tolerance: 0.5
static_map: false
rolling_window: true
width: 6
height: 6
resoultion: 0.05
Could you please try moving the
static_layer
andobstacle_layer
plugins from thecommon_params.yaml
file toglobal_params.yaml
andlocal_params.yaml
respectively. Also, addinflated_layer
plugins to both the files (global_params.yaml
andlocal_params.yaml
) and remove it fromcommon_params.yaml
file.Just so as to be clear, I am asking you to try removing this part from your
common_params.yaml
file -edit: I moved the plugins and reduced the sensor update rates and it seems to be working for now. I'll test a bit more tomorrow and let you know. Thanks.
I did try that before it didn't change much. Actually after restarting (and some minor changes) it is actually showing and inflation the obstacle but as soon as i give it a goal it freezes and fps drops to 0. I have a decent pc and don't think this should be happening. I'll update the post with the new parameters.
Did your changes successfully work? If so, can you post the solution on how you got it working? I'm having the same problem i.e, the local_costmap/obstacles and local_costmap/inflated_obstacles are not showing up for me in RViz
I posted the parameter files in the answer. Hope it helps.