Skip to content

Question: Type-safety of the blackboard values #569

Description

@MithunKinarullathil

Hi,

From the documentation I learned that the values in the blackboard are type-safe. Further reading I saw this section

BehaviorTree.CPP supports automatically converting strings into common types, such as int, long, double, bool, NodeStatus, etc. User-defined types can be supported easily as well.

My doubt this: are the values in the blackboard always stored as strings? If so, is there a way to guarantee type safety?

eg: Image a key:value pair with std:int type and value 3. In another action node, later on in the tree, would I be able to save an std:float into the same key?

Thank you for your time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions