Skip to content

Commit

Permalink
Wait for replanning_period also when starting a goal
Browse files Browse the repository at this point in the history
  • Loading branch information
corot committed Nov 21, 2023
1 parent c02460e commit e7df6d9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mbf_abstract_nav/src/move_base_action.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ bool MoveBaseAction::replanningActive() const
void MoveBaseAction::replanningThread()
{
ros::Duration update_period(0.005);
ros::Time last_replan_time(0.0);
ros::Time last_replan_time = ros::Time::now();

while (ros::ok() && !replanning_thread_shutdown_)
{
Expand Down Expand Up @@ -560,6 +560,7 @@ void MoveBaseAction::replanningThread()
}
else if (!replanningActive())
{
last_replan_time = ros::Time::now();
update_period.sleep();
}
else if (ros::Time::now() - last_replan_time >= replanning_period_)
Expand Down

0 comments on commit e7df6d9

Please sign in to comment.