-
Notifications
You must be signed in to change notification settings - Fork 10
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 ability to set keys on the global blackboard #527
Conversation
The master plan can specify if its keys are meant for the global blackboard using the inherit_blackboard flag in the .plc file. If true, the keys are populated to the global blackboard & the master plan simply inherits the global blackboard as its own. If false, the behaviour remains unchanged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
partial review, will continue tomorrow
int64_t masterKeyInBehavior = 0; | ||
{ | ||
LockedBlackboardRW bb(*getBlackboard()); | ||
masterKeyInBehavior = bb.get<int64_t>("masterKey"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: std::int64_t
PR is looking good to me so far. It would be great to have tests with different types defined in the global blackboard and using default values when the type is std::any. |
we can't have default values for std::any because we won't be able to parse it without knowing the type Now that the frontend & backend work, I have setup a default key in testGlobalBlackbordMaster.pml & the unit test basically tests that global blackboard work as expected. I don't think we need a test for each type because the code is essentially the same as for value mapping & we already have many tests for that. |
Design doc: https://gajanrapyutarobotics-my.sharepoint.com/:w:/g/personal/veeraj_khokale_rapyuta-robotics_com/EfxYaETn7ItNr5jGGRg4zjIBnXgWhDRmn5XFEhSS6Zr4EA?e=vkbIfr