Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lane speed limits to the graph and factor them into the planning #44

Merged
merged 2 commits into from
Sep 22, 2021

Conversation

mxgrey
Copy link
Contributor

@mxgrey mxgrey commented Sep 20, 2021

This PR introduces the ability to (optionally) set speed limits on nav graph lanes. These speed limits will be respected by the planner.

For the initial implementation if there are multiple speed limits along one continuous stretch (collinear lanes that have different speed limits), then the planner will use the lowest speed limit along the entire stretch (or possibly come to a stop at the point where the lanes change and then switch speeds, if that would be faster). This approach does not provide optimal trajectories. We should instead have the robot accelerate/decelerate at each lane intersection in compliance with the changes in speed limits, but that will take considerably more effort to work out, so we'll start with this and improve the implementation in a future PR.

Signed-off-by: Michael X. Grey <grey@openrobotics.org>
@@ -656,8 +686,7 @@ class Graph::Lane::Implementation

Node exit;

bool has_door;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that these fields were never being used anywhere, so I've decided to remove them. They can be added back in at any time without harming API or ABI.

Signed-off-by: Michael X. Grey <grey@openrobotics.org>
@codecov
Copy link

codecov bot commented Sep 20, 2021

Codecov Report

Merging #44 (c2ad1df) into main (f1432d8) will increase coverage by 0.00%.
The diff coverage is 23.52%.

@@           Coverage Diff           @@
##             main      #44   +/-   ##
=======================================
  Coverage   22.13%   22.13%           
=======================================
  Files         353      353           
  Lines       29140    29207   +67     
  Branches    13425    13475   +50     
=======================================
+ Hits         6449     6466   +17     
- Misses      13540    13543    +3     
- Partials     9151     9198   +47     
Flag Coverage Δ
tests 22.13% <23.52%> (+<0.01%) ⬆️

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_Planner.cpp 13.34% <4.16%> (-0.27%) ⬇️
...raffic/src/rmf_traffic/agv/planning/Supergraph.cpp 55.48% <44.44%> (-0.33%) ⬇️
rmf_traffic/src/rmf_traffic/agv/Graph.cpp 56.64% <90.90%> (+2.16%) ⬆️

Copy link
Member

@luca-della-vedova luca-della-vedova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great, thanks!

@mxgrey mxgrey merged commit 40023b0 into main Sep 22, 2021
@mxgrey mxgrey deleted the feature/speed_limits branch September 22, 2021 03:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants