File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
behaviortree_ros2/include/behaviortree_ros2 Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,25 @@ namespace BT
2525constexpr const char * ROS_PLUGIN_SYMBOL = " BT_RegisterRosNodeFromPlugin" ;
2626}
2727
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+
2847// Use this macro to generate a plugin for:
2948//
3049// - BT::RosActionNode
You can’t perform that action at this time.
0 commit comments