move_arm gets hung up [closed]

asked 2011-11-30 03:05:52 -0500

seth_g gravatar image

When using the move_arm tutorial as well has using this segment of code in an action server callback:

if (nh.ok())
    bool finished_within_time = false;
    finished_within_time = move_arm.waitForResult(ros::Duration(200.0));
    if (!finished_within_time)
      ROS_INFO("Timed out achieving goal A");
      actionlib::SimpleClientGoalState state = move_arm.getState();
      bool success = (state == actionlib::SimpleClientGoalState::SUCCEEDED);
        ROS_INFO("Action finished: %s",state.toString().c_str());
        ROS_INFO("Action failed: %s",state.toString().c_str());

the callback seems to get hung up and will never go back to spinning and waiting for a new goal state. Even with the hang up, it will execute properly and report the result state. So when this is run once, it seems to be stuck forever, not even letting me ctl+c out. If I want to exit I have to explicitly throw an escape sequence in there.

Obviously if I have it in a callback and as part of an action server, I'd like to be able to send multiple goals and have it continue to run without the hang up and without having to exit and respawn the node.

Is there a good reason for the hang-up? Am I missing something here or can I add something that will let me continue with more goals?


edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2013-09-06 13:28:49