Autonomous navigation in unknown envrionment with moving obstacles
Long question short: how can i refresh global and local cost map for moving obstacles?
Long question:
I am trying to make a robot follow a human. (Gazebo simulation) Unknown environment = no occupancyGrid.yaml map available. I start slam and navigationstack in my launch file. I get the humans position and send i to move base. This works. Now i am moving the human and want the robot to follow him. BUT! The global and local costmap show not only the humans current postion but all the positions the human has been. Which makes it impossible for the robot to follow the human.
rosservice call /move_base/clear_costmaps "{}"
does not do anything.
Further more i don't know what these plugins do in the config files. But if i comment them out no costmaps are generated.
local_costmap_params.yaml:
local_costmap:
global_frame: map
robot_base_frame: chassis_link
update_frequency: 5.0
publish_frequency: 2.0
static_map: false
rolling_window: true
width: 30.0
height: 30.0
resolution: 0.05
plugins:
- {name: static, type: "costmap_2d::StaticLayer"}
- {name: obstacle, type: "costmap_2d::ObstacleLayer", track_unknown_space: true}
- {name: inflation, type: "costmap_2d::InflationLayer"}
global_costmap_params.yaml:
global_costmap:
global_frame: map
robot_base_frame: chassis_link
update_frequency: 5.0
publish_frequency: 2.0
static_map: false
resolution: 0.05
plugins:
- {name: static, type: "costmap_2d::StaticLayer"}
- {name: obstacle, type: "costmap_2d::ObstacleLayer", track_unknown_space: true}
- {name: inflation, type: "costmap_2d::InflationLayer"}
grateful for any help.
packages called in launch files:
<node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
<node pkg="gmapping" type="slam_gmapping" name="slam_gmapping" output="screen">
@Christian12 were you able to solve this? I am working on a similar problem