[Pogamut-list] Path planning to a location

michal.bida pogamut-forum at diana.ms.mff.cuni.cz
Wed Nov 24 21:21:25 CET 2010


Re: Path planning to a location

Author: michal.bida

Well the movement is jerky, because you send new move command only when the bot velocity is zero. So he needs to do a full stop before next movement will be issued. There are two solutions to your problem:

1) Use pathExecutor from the tutorial. It really does not work with custom locations? That is suprising - Jakub, you here? Is it true? If yes, never mind. What you want to do is to find the nearest navigation point to your location, issue pathExecutor command to get the bot there. When you are there, you just issue move command to get you to your custom location.

2) Move command has this feature - you can support two consecutive locations in it. That way the movement will not be jerky.
{CODE()}
new Move().setFirstLocation(first).setSecondLocation(second);
{CODE}
Now in logic method, check when the bot already passed "first" location. If yes, send another movement command:

{CODE()}
new Move().setFirstLocation(second).setSecondLocation(third);
{CODE}

etc.

The logic method is called 4 times per second, so normally everything should be smooth.

Best,
Michal

-- 
Reply Link: <http://diana.ms.mff.cuni.cz/main/tiki-view_forum_thread.php?forumId=4&comments_reply_threadId=4&comments_parentId=420&post_reply=1#form>





More information about the Pogamut-list mailing list