ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

The service should be available all the time, it will just throw an error as long as the robot is navigating. That means you need to call it when the robot is not processing any goals. To check for that, you can subscribe to the action's status topic and check if none of the goals is in an active state, i.e. PENDING, RECALLING, ACTIVE or PREEMPTING.

An alternative would be to write a simple node that just loads the global planner plugin using pluginlib, instantiates it and provides the same service without the underlying move_base instance. This approach will surely be more flexible but requires some work since you also need to provide costmaps to the planner.