open-rmf / rmf_traffic

Traffic management libraries for RMF
Apache License 2.0
28 stars 26 forks source link

Fix multi floor anomaly #97

Closed mxgrey closed 1 year ago

mxgrey commented 1 year ago

We've found that an edge case can happen in multi-floor traffic negotiations when a traffic dependency exists between floors.

This PR prevents the edge case from derailing the whole fleet adapter, but it does not perfectly fix the underlying problem. A better fix would push the traffic dependency back to the prior route in the plan, but the implementation of plans+routes in rmf_traffic do not currently have a rigorous way of expressing an execution order, so there isn't a clean way to push the dependency back.

Since map changes are only expected to happen in lifts, which are currently only single-robot-occupancy in RMF, this edge case should not effect anything. But in future versions of RMF we should redesign the plan+route semantics to handle this scenario correctly.

codecov[bot] commented 1 year ago

Codecov Report

Merging #97 (6af4550) into main (745b68c) will decrease coverage by 0.00%. The diff coverage is 25.00%.

@@            Coverage Diff             @@
##             main      #97      +/-   ##
==========================================
- Coverage   23.02%   23.02%   -0.01%     
==========================================
  Files         369      369              
  Lines       30761    30769       +8     
  Branches    14366    14371       +5     
==========================================
+ Hits         7084     7085       +1     
+ Misses      14230    14202      -28     
- Partials     9447     9482      +35     
Flag Coverage Δ
tests 22.89% <25.00%> (-0.01%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
..._traffic/agv/planning/DifferentialDrivePlanner.cpp 44.30% <25.00%> (-0.56%) :arrow_down:
rmf_traffic/src/rmf_traffic/agv/Planner.cpp 52.91% <0.00%> (ø)
rmf_traffic/test/unit/agv/test_Negotiator.cpp 10.83% <0.00%> (ø)
rmf_traffic/src/rmf_traffic/DetectConflict.cpp 50.00% <0.00%> (ø)
rmf_traffic/src/rmf_traffic/schedule/Mirror.cpp 41.79% <0.00%> (ø)
rmf_traffic/src/rmf_traffic/schedule/Database.cpp 49.23% <0.00%> (ø)
rmf_traffic/src/rmf_traffic/schedule/Timeline.hpp 46.34% <0.00%> (ø)
rmf_traffic/test/unit/schedule/utils_Database.hpp 17.85% <0.00%> (ø)
rmf_traffic/src/rmf_traffic/agv/RouteValidator.cpp 49.57% <0.00%> (ø)
... and 24 more