You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
int main (int argc, char **argv)
{
ros::init(argc, argv, "fakee");
std::cout<<"fakee"<<std::endl;
// create the action client
// true causes the client to spin its own thread
actionlib::SimpleActionClient<roadmap_global_planner_msgs::DoPatrolAction> ac("patrol_controller", true);
std::cout<<"fakee"<<std::endl;
while(!ac.waitForServer(ros::Duration(5.0))){
ROS_INFO("Waiting for the move_base action server to come up");
}
ROS_INFO("Action server started, sending goal.");
// send a goal to the action
roadmap_global_planner_msgs::DoPatrolGoal goal;
ac.sendGoal(goal);
//wait for the action to return
bool finished_before_timeout = ac.waitForResult(ros::Duration(1.0));
if (finished_before_timeout)
{
actionlib::SimpleClientGoalState state = ac.getState();
ROS_INFO("Action finished: %s",state.toString().c_str());
}
else
ROS_INFO("Action did not finish before the time out.");
//exit
return 0;
}`
The program freezes at actionlib::SimpleActionClient<roadmap_global_planner_msgs::DoPatrolAction> ac("patrol_controller", true);
Same case for whichever client i create.
How do i solve this problem?
The text was updated successfully, but these errors were encountered:
`#include <ros/ros.h>
#include <actionlib/client/simple_action_client.h>
#include <actionlib/client/terminal_state.h>
#include <roadmap_global_planner_msgs/DoPatrolAction.h>
int main (int argc, char **argv)
{
ros::init(argc, argv, "fakee");
std::cout<<"fakee"<<std::endl;
// create the action client
// true causes the client to spin its own thread
actionlib::SimpleActionClient<roadmap_global_planner_msgs::DoPatrolAction> ac("patrol_controller", true);
std::cout<<"fakee"<<std::endl;
while(!ac.waitForServer(ros::Duration(5.0))){
ROS_INFO("Waiting for the move_base action server to come up");
}
ROS_INFO("Action server started, sending goal.");
// send a goal to the action
roadmap_global_planner_msgs::DoPatrolGoal goal;
ac.sendGoal(goal);
//wait for the action to return
bool finished_before_timeout = ac.waitForResult(ros::Duration(1.0));
if (finished_before_timeout)
{
actionlib::SimpleClientGoalState state = ac.getState();
ROS_INFO("Action finished: %s",state.toString().c_str());
}
else
ROS_INFO("Action did not finish before the time out.");
//exit
return 0;
}`
The program freezes at actionlib::SimpleActionClient<roadmap_global_planner_msgs::DoPatrolAction> ac("patrol_controller", true);
Same case for whichever client i create.
How do i solve this problem?
The text was updated successfully, but these errors were encountered: