ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Publish dynamic TF with this->get_node_topics_interface() works in foxy but not in humble. (passed non-default qos overriding options without providing a parameters interface)

asked 2023-04-08 01:57:03 -0500

BlueBird gravatar image

I have posted an issue on GitHub; however, no one responds to it. So I start to wonder if it is my own mistake. It begins from one day when I transform a piece of ROS foxy code into the Humble environment.

rclcpp::node_interfaces::NodeTopicsInterface::SharedPtr node_topics_handle = this->get_node_topics_interface();

std::unique_ptr<tf2_ros::TransformBroadcaster> tf_broadcaster_ = nullptr;

tf_broadcaster_ = std::make_unique<tf2_ros::TransformBroadcaster>(node_topics_handle);

It will give you an error. "passed non-default qos overriding options without providing a parameters interface."

image description

You may wonder why you want to write it like this. Why not use 'this' directly. It is because by using node_topics_handle, I can isolate different functions in different classes without passing the shared printer node everywhere.

Please, tell me how to publish dynamic TF with node_topics_handle.

Thanks.

Operating System: Ubuntu 22.04.2 LTS Installation type: binaries Version or commit hash: ROS humble DDS implementation: Fast-RTPS Client library (if applicable): rclcpp

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-04-14 22:33:36 -0500

BlueBird gravatar image

I got an answer from the Url. It should be written as

tf_broadcaster_ = std::make_unique<tf2_ros::transformbroadcaster>(node_topics_handle, tf2_ros::DynamicBroadcasterQoS(), rclcpp::PublisherOptions());

Any additions or suggestions are very welcome. Thanks, anyway.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2023-04-08 01:57:03 -0500

Seen: 79 times

Last updated: Apr 14 '23