Skip to content

Commit

Permalink
Merge branch 'main' into use_merge_radius
Browse files Browse the repository at this point in the history
  • Loading branch information
mxgrey authored Mar 10, 2025
2 parents cd52f83 + 5b88f75 commit 9ac0137
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions rmf_traffic/src/rmf_traffic/schedule/Database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1405,6 +1405,14 @@ auto Database::watch_dependency(

if (state.latest_plan_id == dep.on_plan)
{
if (state.storage.empty())
{
// This plan has already been cleared from the schedule, so any
// dependencies on it are deprecated.
shared->deprecate();
return subscription;
}

if (dep.on_route < state.progress.reached_checkpoints.size())
{
const auto latest_checkpoint =
Expand Down
8 changes: 8 additions & 0 deletions rmf_traffic/src/rmf_traffic/schedule/Mirror.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,14 @@ auto Mirror::watch_dependency(

if (state.current_plan_id == dep.on_plan)
{
if (state.storage.empty())
{
// This plan has already been cleared from the schedule, so any
// dependencies on it are deprecated.
shared->deprecate();
return subscription;
}

if (dep.on_route < state.progress.reached_checkpoints.size())
{
const auto latest_checkpoint =
Expand Down

0 comments on commit 9ac0137

Please sign in to comment.