mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-03 16:27:46 +08:00
Fixed goal reached topic not sent when move_base has finished
This commit is contained in:
+7
-1
@@ -1887,6 +1887,12 @@ bool CoreWrapper::cancelGoalCallback(std_srvs::Empty::Request& req, std_srvs::Em
|
||||
{
|
||||
mbClient_.cancelGoal();
|
||||
}
|
||||
if(goalReachedPub_.getNumSubscribers())
|
||||
{
|
||||
std_msgs::Bool result;
|
||||
result.data = false;
|
||||
goalReachedPub_.publish(result);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -2126,7 +2132,7 @@ void CoreWrapper::goalDoneCb(const actionlib::SimpleClientGoalState& state,
|
||||
ROS_ERROR("Planning: move_base failed for some reason. Aborting the plan...");
|
||||
}
|
||||
|
||||
if(!ignore && !goalReachedPub_.getNumSubscribers())
|
||||
if(!ignore && goalReachedPub_.getNumSubscribers())
|
||||
{
|
||||
std_msgs::Bool result;
|
||||
result.data = state == actionlib::SimpleClientGoalState::SUCCEEDED;
|
||||
|
||||
Reference in New Issue
Block a user