Skip to content
Snippets Groups Projects
Commit ffb771c1 authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

Solved a bug when the state is LOST: the result pointer is not valid and...

Solved a bug when the state is LOST: the result pointer is not valid and generated a segmentation fault.
parent 12621453
No related branches found
No related tags found
No related merge requests found
......@@ -223,24 +223,32 @@ class CModuleAction
{
ROS_ERROR_STREAM("CModuleAction::action_done: goal on server " << this->name << " aborted");
this->status=ACTION_ABORTED;
this->action_result_msg=*result;
}
if(state==actionlib::SimpleClientGoalState::REJECTED)
{
ROS_ERROR_STREAM("CModuleAction::action_done: goal on server " << this->name << " rejected");
this->status=ACTION_REJECTED;
this->action_result_msg=*result;
}
else if(state==actionlib::SimpleClientGoalState::PREEMPTED)
{
ROS_WARN_STREAM("CModuleAction::action_done: goal on server " << this->name << " preempted");
this->status=ACTION_PREEMPTED;
this->action_result_msg=*result;
}
else if(state==actionlib::SimpleClientGoalState::SUCCEEDED)
{
ROS_INFO_STREAM("CModuleAction::action_done: goal on server " << this->name << " successfull");
this->status=ACTION_SUCCESS;
this->action_result_msg=*result;
}
else if(state==actionlib::SimpleClientGoalState::LOST)
{
ROS_INFO_STREAM("CModuleAction::action_done: goal on server " << this->name << " lost");
this->status=ACTION_SUCCESS;
}
}
this->action_result_msg=*result;
this->action_feedback_msg=Feedback();
this->action_timeout.stop();
this->action_access.exit();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment