Unable to traverse a turtle-bot 3 through narrow passages

asked 2019-09-27 04:34:39 -0500

updated 2019-10-01 01:12:21 -0500

I was implementing the navigation stack recently. I was facing some problem that when I tried to traverse the bot through narrow passages it was unable to do so because in the global costmap as we know that the inflation radius for the obstacle is kept high to avoid collisions but even if I decrease the inflation radius it does not have any effect on the global costmap. So can anyone tell whether I am tweaking with the right parameters or should I try anything else?

Here is the complete code that I have been using for the navigation stack: https://github.com/rg-28/ant!

This is the image of the global costmap that is created in rviz: (https://drive.google.com/file/d/1hGyk...)

edit retag flag offensive close merge delete

Comments

from what I can see you have pretty high value of inflation (13) set in your costmap_common_params.yaml file. Try reducing that, because planner will only plan through the narrow passage if it knows that footprint of robot will git in passage

Choco93 gravatar image Choco93  ( 2019-09-27 06:55:35 -0500 )edit

Sir I tried to do what you suggested but it is still showing the same costmap. For your reference I have added the link for the image of the map and costmaps created in rviz after decreasing the inflation radius.

rg-28 gravatar image rg-28  ( 2019-10-01 01:13:58 -0500 )edit

Any area that is shown as grey is considered non-traversable while planning. For such environment you are using, even inflation of 1 looks too high. Try setting zero, if there is enough space for robot to pass then it should traverse through passage.

Choco93 gravatar image Choco93  ( 2019-10-01 02:35:47 -0500 )edit

Sir when I tried to set the inflation radius to zero, it got reduced but then the bot was unable to traverse properly as it started colliding with the walls and objects and also sometimes before reaching the goal it starts rotating at a position and then keeps on rotating.

rg-28 gravatar image rg-28  ( 2019-10-19 12:41:41 -0500 )edit

That is a trade-off that you have to consider, because if the corridor is too narrow you will have this problem. Other thing you can do is reduce resolution of of your local costmap, it will slow down your overall process but I think it's the only other option. You can also add different inflation layers with different values of resolution and radius for both local and global costmaps to optimize it further

Choco93 gravatar image Choco93  ( 2019-10-22 01:41:49 -0500 )edit

Okay Sir, I will try out the solution provided by you and start tweaking the various parameters. Thank you for the help.

rg-28 gravatar image rg-28  ( 2019-10-22 07:16:00 -0500 )edit