Skip to content

Commit

Permalink
remove local copies of subscription option.
Browse files Browse the repository at this point in the history
Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Co-authored-by: Tully Foote <tfoote@osrfoundation.org>
  • Loading branch information
fujitatomoya and tfoote committed May 9, 2022
1 parent 246d709 commit 0e7121e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions tf2_ros/include/tf2_ros/transform_listener.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,11 @@ class TransformListener
// Create new callback group for message_subscription of tf and tf_static
callback_group_ = node_base_interface_->create_callback_group(
rclcpp::CallbackGroupType::MutuallyExclusive, false);
// Duplicate to modify option of subscription
rclcpp::SubscriptionOptionsWithAllocator<AllocatorT> tf_options = options;
rclcpp::SubscriptionOptionsWithAllocator<AllocatorT> tf_static_options = static_options;

message_subscription_tf_ = rclcpp::create_subscription<tf2_msgs::msg::TFMessage>(
node, "/tf", qos, std::move(cb), tf_options, callback_group_);
node, "/tf", qos, std::move(cb), options, callback_group_);
message_subscription_tf_static_ = rclcpp::create_subscription<tf2_msgs::msg::TFMessage>(
node, "/tf_static", static_qos, std::move(static_cb), tf_static_options,
node, "/tf_static", static_qos, std::move(static_cb), static_options,
callback_group_);

// Create executor with dedicated thread to spin.
Expand Down

0 comments on commit 0e7121e

Please sign in to comment.