Unable to traverse a turtle-bot 3 through narrow passages
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/1hGyk2w_kgxVvigV-o5kftwVZzt9wSZCe/view?usp=sharing)
Asked by rg-28 on 2019-09-27 04:34:39 UTC
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
Asked by Choco93 on 2019-09-27 06:55:35 UTC
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.
Asked by rg-28 on 2019-10-01 01:13:58 UTC
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.
Asked by Choco93 on 2019-10-01 02:35:47 UTC
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.
Asked by rg-28 on 2019-10-19 12:41:41 UTC
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
Asked by Choco93 on 2019-10-22 01:41:49 UTC
Okay Sir, I will try out the solution provided by you and start tweaking the various parameters. Thank you for the help.
Asked by rg-28 on 2019-10-22 07:16:00 UTC