mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-03 16:27:46 +08:00
Calling move_base::cancelGoal() when rtabmap planning fails or /rtabmap/cancel_goal is called
This commit is contained in:
@@ -12,7 +12,7 @@ TrajectoryPlannerROS:
|
||||
max_vel_theta: 0.5
|
||||
min_vel_theta: -0.5
|
||||
min_in_place_vel_theta: 0.25
|
||||
holonomic_robot: false
|
||||
holonomic_robot: true
|
||||
|
||||
xy_goal_tolerance: 0.25
|
||||
yaw_goal_tolerance: 0.25
|
||||
|
||||
+8
-4
@@ -1258,6 +1258,10 @@ void CoreWrapper::process(
|
||||
else
|
||||
{
|
||||
ROS_WARN("Planning: Plan failed!");
|
||||
if(mbClient_.isServerConnected())
|
||||
{
|
||||
mbClient_.cancelGoal();
|
||||
}
|
||||
}
|
||||
if(goalReachedPub_.getNumSubscribers())
|
||||
{
|
||||
@@ -1919,10 +1923,6 @@ bool CoreWrapper::cancelGoalCallback(std_srvs::Empty::Request& req, std_srvs::Em
|
||||
rtabmap_.clearPath(0);
|
||||
currentMetricGoal_.setNull();
|
||||
latestNodeWasReached_ = false;
|
||||
if(mbClient_.isServerConnected())
|
||||
{
|
||||
mbClient_.cancelGoal();
|
||||
}
|
||||
if(goalReachedPub_.getNumSubscribers())
|
||||
{
|
||||
std_msgs::Bool result;
|
||||
@@ -1930,6 +1930,10 @@ bool CoreWrapper::cancelGoalCallback(std_srvs::Empty::Request& req, std_srvs::Em
|
||||
goalReachedPub_.publish(result);
|
||||
}
|
||||
}
|
||||
if(mbClient_.isServerConnected())
|
||||
{
|
||||
mbClient_.cancelGoal();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user