Closed tomcreutz closed 6 months ago
The problem was resolved by using the RegisterRosNode(factory_, loader.getOSName(p), params);
function from plugins.hpp instead of factory_.registerFromPlugin(loader.getOSName(p));
as it is done in the behavior tree engine of the nav2_behavior_tree package. Leaving this issue here to be closed in case someone faces the same issue.
Hi all,
I'm facing an issue using my own created ROS2 Action BT Plugin.
I'm basically using the same header and cpp file as the sample sleep_action in the
btcpp_ros2_samples
package. I register the Action Server using the macroCreateRosNodePlugin(ros_behavior_tree::DummySleepAction, "DummySleepAction");
frombehaviortree_ros2/plugins.hpp
in the cpp file of the plugin.Opposing to https://github.com/BehaviorTree/BehaviorTree.CPP/issues/300 , I'm also adding the compile definitions
BT_EXPORT_PLUGIN
in my CMakeLists.txt:The plugin is being loaded using the
BT::SharedLibrary loader
withfactory_.registerFromPlugin(loader.getOSName(p));
(p
being"dummy_sleep_action_bt_node"
).Does anyone have an idea what the issue might be? Also please let me know if I can provide any more information.
Best regards, Tom
EDIT: In the meantime I found out, that naively "mixing" the provided functions by this package and functionalities that were part of the navigation2 behavior tree package could be the cause of the problem as I'm not registering the action plugins as described in the "sleep_client" sample of this package. Will update, but still happy for some feedback.