-
Notifications
You must be signed in to change notification settings - Fork 47
Description
Hi,
first of all thanks for creating and maintaining YASMIN.
While working with the editor and adding custom states, I noticed that a state currently only exposes its outcomes, but there is no standardized way to provide additional information like:
- a short description of the state
- which blackboard keys the state reads
- which blackboard keys the state writes
For Python states this could maybe be solved by reading the class docstring, so developers could document their states directly in code and the editor could display it.
Example:
class PlanPath(State):
"""
Plans a path from start to goal.
Reads:
goal
Writes:
path
"""For C++ states there is no equivalent mechanism at runtime (at least I’m not aware of one). One option could be to read the description from the plugin.xml, since plugins already contain metadata and it would avoid adding additional documentation directly in the code.
For the blackboard keys, another idea could be to extend the state constructor to optionally include the keys used by the state, for example something like:
State(
const std::vector<std::string>& outcomes,
const std::vector<std::string>& input_keys,
const std::vector<std::string>& output_keys
);This would allow tools like the editor to:
- show documentation for states
- visualize blackboard data flow
- potentially validate blackboard keys
Curious what your thoughts are on this and whether something like this would fit into YASMIN.
If there are no existing plans for something like this, I’d also be happy to try implementing it and open a PR.
Thanks!