You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, thanks for a very nice project. I really benefit from it.
Describe the bug
When a class inheriting from CondtionNode has additional custom arguments, asside from node name and NodeConfig, Factory.registerNodeType fails on compile with
error: static assertion failed: [registerNode]: since you have a static method providedPorts(),
you MUST add a constructor with signature:
(const std::string&, const NodeConfig&)
when one of the custom arguments are of the wrong type. I think this is misleading, and it took a while to debug.
where factory is a BehaviorTreeFactory object. node_ was accidentally of the wrong type, and the mentioned assertion error is yielded on compile time. Replacing node_ with an object of the correct type fixes the error.
It took a while to figure out, since the error was misleading. I believe a better error should be printed, as the issue was not due to the constructor being wrong.
Cheers
The text was updated successfully, but these errors were encountered:
First, thanks for a very nice project. I really benefit from it.
Describe the bug
When a class inheriting from CondtionNode has additional custom arguments, asside from node name and NodeConfig, Factory.registerNodeType fails on compile with
when one of the custom arguments are of the wrong type. I think this is misleading, and it took a while to debug.
How to Reproduce
I have a class:
With constructor
as well as providedPorts implemented.
I now register it with the factory:
where
factory
is a BehaviorTreeFactory object.node_
was accidentally of the wrong type, and the mentioned assertion error is yielded on compile time. Replacingnode_
with an object of the correct type fixes the error.It took a while to figure out, since the error was misleading. I believe a better error should be printed, as the issue was not due to the constructor being wrong.
Cheers
The text was updated successfully, but these errors were encountered: