making the robot stop while replanning for obstacle avoidance
Hi all,
I have a robot which is navigating around a room with a given map. I am using rotary encoders to get the odometry data. I am using amcl for localization, move_base for planning with default navfn (A*) as the global planner and TrajectoryPlannerROS as the local planner. It seems to be doing good except in some cases it goes very close to the obstacle (which are not in the map) before it is able to replan a new path and therefore it gets stuck. So, my question is How can I make sure the robot stops way before an obstacle (say 2m) (assuming the costmap is updated with the obstacle information) and then re-plans the new path and then starts following the new path instead of going very close to the obstacle? Like this, the robot won't get stuck close to the obstacle. What parameters can I change for this or do I have to dig into the code and change something?
Any help will be appreciated.
Thanks in advance.
Naman Kumar