open-rmf / rmf_traffic

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

Add lanes_into API to AGV Graph #69

Closed luca-della-vedova closed 2 years ago

luca-della-vedova commented 2 years ago

New feature implementation

Implemented feature

This PR adds an API for lanes_into to rmf_traffic

Implementation description

Given a Graph::Waypoint there is a function to calculate lanes from it but while the data structure to containing lanes into the waypoint was existing, its content was not exposed to a user API.

This PR just adds the user API to return the lanes into a waypoint, as well as adding a few lines of test code to make sure it's behaving sensibly.

codecov[bot] commented 2 years ago

Codecov Report

Merging #69 (fa1dda5) into main (8be278d) will increase coverage by 0.00%. The diff coverage is 33.33%.

@@           Coverage Diff           @@
##             main      #69   +/-   ##
=======================================
  Coverage   22.15%   22.16%           
=======================================
  Files         359      359           
  Lines       29175    29181    +6     
  Branches    13302    13306    +4     
=======================================
+ Hits         6464     6468    +4     
+ Misses      13806    13804    -2     
- Partials     8905     8909    +4     
Flag Coverage Δ
tests 22.16% <33.33%> (+<0.01%) :arrow_up:

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

Impacted Files Coverage Δ
rmf_traffic/include/rmf_traffic/agv/Graph.hpp 18.18% <ø> (ø)
rmf_traffic/test/unit/agv/test_Graph.cpp 8.53% <0.00%> (-0.44%) :arrow_down:
rmf_traffic/src/rmf_traffic/agv/Graph.cpp 55.59% <100.00%> (+1.08%) :arrow_up: