Planning: if use_action_for_goal is true, wait for move_base status before sending goal status. Updated patrol.py

This commit is contained in:
matlabbe
2019-01-15 18:12:11 -05:00
parent 19433f809f
commit ba5738354d
3 changed files with 16 additions and 10 deletions
+11 -7
View File
@@ -2033,15 +2033,19 @@ void CoreWrapper::process(
mbClient_->cancelGoal();
}
}
if(goalReachedPub_.getNumSubscribers())
// Don't send status yet, let move_base finish reaching the goal
if(mbClient_ == 0 || rtabmap_.getPathStatus() <= 0)
{
std_msgs::Bool result;
result.data = rtabmap_.getPathStatus() > 0;
goalReachedPub_.publish(result);
if(goalReachedPub_.getNumSubscribers())
{
std_msgs::Bool result;
result.data = rtabmap_.getPathStatus() > 0;
goalReachedPub_.publish(result);
}
currentMetricGoal_.setNull();
lastPublishedMetricGoal_.setNull();
latestNodeWasReached_ = false;
}
currentMetricGoal_.setNull();
lastPublishedMetricGoal_.setNull();
latestNodeWasReached_ = false;
}
else
{