BehaviorTree/BehaviorTree.ROS2

Subscriber node is unable to register due to undefined symbol

Closed this issue · 1 comments

I have been trying to create some basic examples of each of the node types, all work fine apart from the subscriber.
You say to register the node using RegisterRosAction<DerivedClass>(factory, params); However nowhere in either the Behavortree.cpp or the Behavortree.ros2 does RegisterRosAction exist. I'm assuming this comment was taken from your Ros 1 implementation.
I have been using the below in order to register my plugins which has worked for actions, services and publishers however does not work for subscribers.
RegisterRosNode(factory, "install/bt_ros_tests/lib/liblistening_plugin.so", params);
It builds, however returns a runtime error terminate called after throwing an instance of 'BT::RuntimeError' what(): Could not load library: install/bt_ros_tests/lib/liblistening_plugin.so: undefined symbol: _ZN11ListenerSub6onTickERKSt10shared_ptrIN8std_msgs3msg7String_ISaIvEEEE
Any help as to why would be much appreciated, all my code is base very closely to your examples and am happy to share part if needed

Never mind I was just being dumb, missed linking the ontick to my class