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 support for docking in lanes that have entry events #226

Merged
merged 5 commits into from
Sep 15, 2022

Conversation

luca-della-vedova
Copy link
Member

New feature implementation

Implemented feature

This PR addresses a TODO where having a dock_name property in a waypoint that had an entry or exit event would make the fleet adapter throw an exception.

Implementation description

It turns out there is no issue with exit events, but an implementation has been added for entry events by inserting a waypoint manually, basically the following:

A (entry event) -----> B

becomes

A (entry event) --> D (docking event) --> B

A and D overlap with each other. This has the effect of triggering the entry event first, then the docking event on the way to B.

This behavior is useful in cases where a system integrator wants to use docking in cases where there are entry events. A typical case is having a docking waypoint inside a lift to execute a special behavior to enter it.

Signed-off-by: Luca Della Vedova <luca@openrobotics.org>
Signed-off-by: Luca Della Vedova <luca@openrobotics.org>
Signed-off-by: Luca Della Vedova <luca@openrobotics.org>
@mxgrey
Copy link
Contributor

mxgrey commented Sep 11, 2022

@luca-della-vedova the change looks good to me, but I'm curious whether this has been tested on a graph that has a docking+event combo?

@luca-della-vedova
Copy link
Member Author

@luca-della-vedova the change looks good to me, but I'm curious whether this has been tested on a graph that has a docking+event combo?

Yap! This is being tested with the TRL project to trigger docking when entering or exiting lifts, i.e. here to enter and here to exit. Without this PR it throws the exception, with the PR it triggers a docking when approaching the waypoints

mxgrey
mxgrey previously approved these changes Sep 13, 2022
Copy link
Contributor

@mxgrey mxgrey left a comment

Choose a reason for hiding this comment

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

Thanks for getting this to work! The exception was a dirty shortcut that I took a long time ago because I didn't have enough time to think about how best to do it, so I'm glad to see this situation becoming functional.

mxgrey and others added 2 commits September 13, 2022 17:05
Signed-off-by: Luca Della Vedova <luca@openrobotics.org>
@mxgrey mxgrey merged commit f391bce into main Sep 15, 2022
@mxgrey mxgrey deleted the luca/dock_entry_event branch September 15, 2022 08:32
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.

None yet

2 participants