Skip to content

Commit 5930e05

Browse files
committed
Ensures that the ActionNode callbackgroup is only added to the singlethreaded executor
1 parent 7a6ace6 commit 5930e05

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

behaviortree_ros2/include/behaviortree_ros2/bt_action_node.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ RosActionNode<T>::ActionClientInstance::ActionClientInstance(
244244
std::shared_ptr<rclcpp::Node> node, const std::string& action_name)
245245
{
246246
callback_group =
247-
node->create_callback_group(rclcpp::CallbackGroupType::MutuallyExclusive);
247+
node->create_callback_group(rclcpp::CallbackGroupType::MutuallyExclusive, false);
248248
callback_executor.add_callback_group(callback_group, node->get_node_base_interface());
249249
action_client = rclcpp_action::create_client<T>(node, action_name, callback_group);
250250
}
@@ -310,6 +310,9 @@ inline bool RosActionNode<T>::createClient(const std::string& action_name)
310310
{
311311
client_instance_ = std::make_shared<ActionClientInstance>(node, action_name);
312312
registry.insert({ action_client_key_, client_instance_ });
313+
314+
RCLCPP_INFO(logger(), "Node [%s] created action client [%s]", name().c_str(),
315+
action_name.c_str());
313316
}
314317
else
315318
{

0 commit comments

Comments
 (0)