open-rmf / rmf_traffic

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

Make sure the planner will not use a negative- or zero-value speed limit #80

Closed mxgrey closed 2 years ago

mxgrey commented 2 years ago

When a negative or zero value is given for the speed limit on a lane, the planner will now print a warning and override the value with 1/1000 of the agent's normal speed. I expect in most cases setting the speed limit to such a small value is likely to achieve what the user wanted, but it is still strongly recommended to use the lane blocking feature in cases where a "zero speed limit" is really wanted.

This PR has been updated so that when a negative- or zero-value speed limit is given for a lane, the lane will be treated as if it is closed, but a warning will be printed out about the unhygienic speed limit value.

codecov[bot] commented 2 years ago

Codecov Report

Merging #80 (c0836a4) into main (42edcfe) will increase coverage by 0.00%. The diff coverage is 40.00%.

@@           Coverage Diff           @@
##             main      #80   +/-   ##
=======================================
  Coverage   23.16%   23.16%           
=======================================
  Files         370      370           
  Lines       30597    30602    +5     
  Branches    14265    14267    +2     
=======================================
+ Hits         7088     7090    +2     
- Misses      14075    14077    +2     
- Partials     9434     9435    +1     
Flag Coverage Δ
tests 23.03% <40.00%> (+<0.01%) :arrow_up:

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

Impacted Files Coverage Δ
...raffic/src/rmf_traffic/agv/planning/Supergraph.cpp 54.40% <40.00%> (-0.20%) :arrow_down: