Pausing/resuming a navigation task using Nav2 Python Simple Commander
Hello,
I am using the ROS2 Galactic and Nav2 stack with Python Simple Commander in a Gazebo simulation (Ubuntu 20.04).
How can I pause (and later resume) the robot's movement while navigating?
E.g. TB3 is moving along a planned path through an intersection. I want to pause its movement using a kind of trigger, wait a few seconds, and then resume the previous navigating plan.
I checked Simple Commander API but I didn't find a similar command that could be used in a similar way that I would like.
I can try to work around this problem by saving the current position and the goal pose, then canceling the task with 'cancelTask()' + resuming the task with goToPose()
, but maybe there is a better solution? Could you help me with some hints?