0
$\begingroup$

Rosanswers logo

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?


Originally posted by ljaniec on ROS Answers with karma: 3064 on 2022-04-25

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

https://github.com/ros-planning/navigation2/issues/2926

I think we clearly went through this in the ticket. You could definitely write a wrapper on some functions for an application to save info like pose / goal and have that be used to send to the main navigator APIs. But that's mostly just shifting code around.


Originally posted by stevemacenski with karma: 8272 on 2022-04-26

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by ljaniec on 2022-04-26:
Yes, chronologically that question was there first, only later did I fill out the feature request.

TL;DR; cancelTask() + goToPose() to the same position is the way to go.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.