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

Allow BT factory to define clock source for TimerQueue/TimerNode #215

Merged
merged 3 commits into from
Sep 1, 2020

Conversation

fultoncjb
Copy link
Contributor

This pull request extends the utility of the TimeoutNode decorator node class to allow for the use of a custom clock. This is especially useful when someone is creating a simulated version of their code that uses a clock different from the system/steady_clock. Template parameters were added to both the TimeoutNode and TimerQueue classes so the caller may specify the clock source. Necessary changes were made in the bt_factory.cpp class to register the TimeoutNode with default template parameters. Template deduction and the associated syntax was improved in C++17, so the empty template argument list may be removed if this library is updated to C++17 in the future.

@facontidavide facontidavide merged commit 63d6fd4 into BehaviorTree:master Sep 1, 2020
@facontidavide
Copy link
Collaborator

Thanks a lot

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