Ask Your Question
0

action server not starting

asked 2015-02-22 07:28:40 -0500

est_CEAR gravatar image

updated 2015-02-22 07:29:42 -0500

Hi,

I am trying turtlebot_arm_block_manipulation with ROS Hydro. I use action server but it doesn't start. I don't understand why. Here is my code :

  actionlib::SimpleActionServer<turtlebot_arm_block_manipulation::BlockDetectionAction> as_;
BlockDetectionServer(const std::string name) : 
    nh_("~"), as_(name, false), action_name_(name)
  {
    // Load parameters from the server.
    // Register the goal and feeback callbacks.
    as_.registerGoalCallback(boost::bind(&BlockDetectionServer::goalCB, this));
    as_.registerPreemptCallback(boost::bind(&BlockDetectionServer::preemptCB, this));

    std::cout<<"action server is active ? : "<<as_.isActive()<<std::endl;
    std::cout<<"Start action server"<<std::endl;
    as_.start();
    std::cout<<"action server is active ? : "<<as_.isActive()<<std::endl;

and I got :

action server is active ? : 0
Start action server
action server is active ? : 0

Why is the action server not starting? Thanks

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2015-02-23 15:40:39 -0500

tfoote gravatar image

updated 2015-02-23 15:40:57 -0500

isActive returns if a goal is active not if the ActionServer is running. See the API documentation

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-02-22 07:28:40 -0500

Seen: 666 times

Last updated: Feb 23 '15