Ask Your Question

Revision history [back]

I am not sure whether its possible to do it using RVIZ (I might be wrong) but you can use actionlib to send multiple goals. Example Code:

typedef actionlib::SimpleActionClient<move_base_msgs::MoveBaseAction> MoveBaseClient;

// tell the action client that we want to spin a thread by default
MoveBaseClient ac("move_base",true);

std::vector<move_base_msgs::MoveBaseGoal> plan;

// Add multiple goals to plan of the type move_base_msgs::MoveBaseGoal
// Then, send it one by one:

for (int i = 0;i<plan.size();i++){
        ac.sendGoal(plan[i]); // Current Goal
        ac.waitForResult();

        if(ac.getState() == actionlib::SimpleClientGoalState::SUCCEEDED)
            ROS_INFO("Reached Goal successfully!");
        else
            ROS_INFO("Failed!");
    }

Hope it helps.