How to dynamically change waypoints and make the purepursuit algorithm follow the path in real time?

3 次查看(过去 30 天)
I am using purepursuit for path following. I have an offline genetic algorithm planner which starts off the robot on a path. When there is a dynamic obstacle around, I have designed a loop wherein each iteration gives a new position for the robot using artificial potential field. I am adding these 'new positions' as new waypoints in already composed list earlier. (They are ordered correctly as well.) But the robot just follows the original waypoints that were determined by GA. In the list of waypoints, I can see the new co-ordinates with each iteration, but the robot doesn't follow all those points, just the original GA points. Can anyone tell me why? Or help me a way around? NOTE: I have to release controller each time I update the waypoints, could it be that when I 'release', the controller isn't 'set' back again and doesn't care about the new updated list of waypoints to travel?
  1 个评论
Arun Adiththan
Arun Adiththan 2017-7-14
Hi Patel, were you able to find a solution to this problem? I'm looking into something similar and for now, working with the basic script given here: https://www.mathworks.com/help/robotics/examples/path-following-for-a-differential-drive-robot.html
I was able to update the waypoint by redefining the waypoints in a new path array and setting
controller.Waypoints = newPath
I have the "newPath" and the above assignment statement inside the while loop. This way of updating waypoints doesn't involve releasing the controller.
I have a quick question regarding your approach. How were you able to populate the new waypoints into your original list? Do these updates are done while the robot is in operation as per your original waypoints?

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Robotics 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by