open-rmf / rmf_traffic

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

No exception for plan_id #76

Closed mxgrey closed 2 years ago

mxgrey commented 2 years ago

There have been some cases in the wild where the assumption that plan_id always increases have been violated. The cause of that violation is currently unclear, but the behavior of throwing an exception seems to be too aggressive. This PR instead returns a boolean to indicate that the function call was not accepted.

codecov[bot] commented 2 years ago

Codecov Report

Merging #76 (b8ed34c) into main (1aafa07) will increase coverage by 0.52%. The diff coverage is 71.42%.

@@            Coverage Diff             @@
##             main      #76      +/-   ##
==========================================
+ Coverage   22.62%   23.14%   +0.52%     
==========================================
  Files         364      370       +6     
  Lines       30020    30583     +563     
  Branches    13836    14262     +426     
==========================================
+ Hits         6792     7079     +287     
- Misses      13940    14103     +163     
- Partials     9288     9401     +113     
Flag Coverage Δ
tests 23.01% <71.42%> (+0.38%) :arrow_up:

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

Impacted Files Coverage Δ
...affic/include/rmf_traffic/schedule/Participant.hpp 0.00% <ø> (ø)
.../src/rmf_traffic/schedule/internal_Participant.hpp 100.00% <ø> (ø)
rmf_traffic/test/unit/agv/test_Rollout.cpp 18.26% <66.66%> (+0.62%) :arrow_up:
...f_traffic/src/rmf_traffic/schedule/Participant.cpp 58.28% <75.00%> (+2.03%) :arrow_up:
...include/rmf_traffic/agv/CentralizedNegotiation.hpp 66.66% <0.00%> (-33.34%) :arrow_down:
...mf_traffic/include/rmf_traffic/schedule/Change.hpp 50.00% <0.00%> (-16.67%) :arrow_down:
...traffic/src/rmf_traffic/geometry/ShapeInternal.hpp 52.94% <0.00%> (-11.35%) :arrow_down:
..._traffic/src/rmf_traffic/agv/internal_planning.cpp 40.00% <0.00%> (-10.00%) :arrow_down:
rmf_traffic/src/rmf_traffic/StaticMotion.cpp 57.14% <0.00%> (-9.53%) :arrow_down:
...traffic/include/rmf_traffic/agv/RouteValidator.hpp 33.33% <0.00%> (-6.67%) :arrow_down:
... and 123 more