Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish dynamic TF with this->get_node_topics_interface() works in foxy but not in humble. #596

Open
BlueBirdHouse opened this issue Apr 14, 2023 · 1 comment

Comments

@BlueBirdHouse
Copy link

Bug report

  • 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, tf2_ros, tf2, or geometry2

Steps to reproduce issue

Make a dynamic publisher as we always do in foxy.

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);

Expected behavior

The dynamic TF broadcaster object can be initialized.

Actual behavior

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

Additional information

image

I have posted an issue on there and there. I also asked my question there. A friend from ROS2 channel suggested I post my questions there. Please, I really would like to know how to work with tf2_ros::TransformBroadcaster, get_node_xxx_interface, other handles, or something else. I don't want to use 'this' directly. By using node_xxx_handle, I can isolate different functions in different classes without passing the shared printer node everywhere.

@BlueBirdHouse
Copy link
Author

I got an answer from ros2/ros2#1407.
But, can I find some detailed explanation that why we should write the code like this?
Why the code works in old Foxy but will never work in Humble?
What is the mechanism behind these parameters?
There should be a professional channel that we finally find.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant