How to update the navigation goal during the navigation?
I am developing a robot to perform pick and place tasks while navigation through a give map. For that I am searching for a way to update my navigation goals once the robot detect the objects.
As an example If my robot moves one waypoint to another waypoint in the map, If the robot detects an object during the navigation the robot should stop the current navigation task and it should navigate to the detected object.
How can I perform such a task using the ROS navigation stack?
Asked by IUE on 2020-11-01 10:55:25 UTC
Answers
What you need to do is that, once you detect a new object, call the global planner to get the global planner (make plan) according to current position and send the plan to the local planner (set_plan). That could errase the last goal (last path) and track the new goal(new path). move_base provides an action to complete navigation task. When you add a new action, the previouse one would be preemted and the robot would stop the old task. I used to achive this by add a update path service in move_base. By doning this , I can change the tracking path during navigation task runtime. It worked but I don't like this method. I suggest the move_base_flex stack (upgration version of move_base) to implement complex strategies by smacc or pt_tree.
Asked by Tider on 2020-11-03 20:21:48 UTC
Comments