File tree 1 file changed +19
-0
lines changed
behaviortree_ros2/include/behaviortree_ros2
1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,25 @@ namespace BT
25
25
constexpr const char * ROS_PLUGIN_SYMBOL = " BT_RegisterRosNodeFromPlugin" ;
26
26
}
27
27
28
+ /* Use this macro to automatically register one or more custom Nodes
29
+ * into a factory that require access to the BT::RosNodeParams.
30
+ * For instance:
31
+ *
32
+ * BT_REGISTER_ROS_NODES(factory, params)
33
+ * {
34
+ * factory.registerNodeType<SpecialNode>("SpecialNode", params);
35
+ * }
36
+ *
37
+ * IMPORTANT: this function MUST be declared in a cpp file, NOT a header file.
38
+ * You must add the definition [BT_PLUGIN_EXPORT] in CMakeLists.txt using:
39
+ *
40
+ * target_compile_definitions(my_plugin_target PRIVATE BT_PLUGIN_EXPORT )
41
+ */
42
+
43
+ #define BT_REGISTER_ROS_NODES (factory, params ) \
44
+ BTCPP_EXPORT void BT_RegisterRosNodeFromPlugin (BT::BehaviorTreeFactory& factory, \
45
+ const BT::RosNodeParams& params)
46
+
28
47
// Use this macro to generate a plugin for:
29
48
//
30
49
// - BT::RosActionNode
You can’t perform that action at this time.
0 commit comments