Pause move_base instead of Cancel

I’ve noticed that when object_found is true in tutorial 9 (https://github.com/husarion/tutorial_pkg/blob/master/src/search_manager_node.cpp),

if (object_found)
{
    ROS_INFO("Object detected during exploration, stop exploration task");
    cancel_exploration_action();
    cancel_move_base_action();
    node.shutdown();
    return 0;
}

It cancels exploration and move_base.

I assume that cancel_exploration_action doesn’t have anything to do with stopping the robot’s movement, but rather its mapping/navigation system. So, I wanted to ask if it was possible to PAUSE “move_base_action” instead of CANCEL it? Could you provide the code for this? Thanks.

Hello geasrmotion789,

I assume that you want move_base node to preform further path planning after exploration is finished. To do it, you just need to send a new goal for ROSbot.

What cancel_move_base_action() function do, is sending an empty goal for path planner, this causes move_base to stop robot, but it can accept further goals.

Regards,
Łukasz