Commit f88bd47b authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

Removed the status check in the is_finished() and cancel() functions to be...

Removed the status check in the is_finished() and cancel() functions to be able to perform the desired operations when a timeout or watchdog error have been reported.
parent 49f741f8
......@@ -664,12 +664,9 @@ void CModuleAction<action_ros>::cancel(void)
{
actionlib::SimpleClientGoalState action_state(actionlib::SimpleClientGoalState::PENDING);
if(this->status==ACTION_RUNNING)
{
action_state=action_client->getState();
if(action_state==actionlib::SimpleClientGoalState::ACTIVE)
this->action_client->cancelGoal();
}
action_state=action_client->getState();
if(action_state==actionlib::SimpleClientGoalState::ACTIVE)
this->action_client->cancelGoal();
}
template<class action_ros>
......@@ -677,14 +674,9 @@ bool CModuleAction<action_ros>::is_finished(void)
{
actionlib::SimpleClientGoalState action_state(actionlib::SimpleClientGoalState::PENDING);
if(this->status==ACTION_RUNNING)
{
action_state=action_client->getState();
if(action_state==actionlib::SimpleClientGoalState::ACTIVE)
return false;
else
return true;
}
action_state=action_client->getState();
if(action_state==actionlib::SimpleClientGoalState::ACTIVE)
return false;
else
return true;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment