We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 13682b4 commit bdb778aCopy full SHA for bdb778a
behaviortree_ros2/include/behaviortree_ros2/bt_topic_sub_node.hpp
@@ -296,14 +296,14 @@ template<class T> inline
296
std::string topic_name;
297
getInput("topic_name", topic_name);
298
299
- if(!sub_instance_)
+ if(!topic_name.empty() && topic_name != "__default__placeholder__" && topic_name != topic_name_)
300
{
301
- createSubscriber(topic_name);
+ sub_instance_.reset();
302
}
303
- else if(topic_name_ != topic_name)
+
304
+ if(!sub_instance_)
305
- sub_instance_.reset();
306
+ createSubscriber(topic_name);
307
308
309
auto CheckStatus = [](NodeStatus status)
0 commit comments