ros2_controllers icon indicating copy to clipboard operation
ros2_controllers copied to clipboard

Odd QOS for Diff Drive TF Publication

Open DLu opened this issue 1 year ago • 4 comments

Describe the bug Is there a particular reason why the TF is published directly using a publisher rather than TF Broadcaster? Publishing it with a custom publisher / custom QOS settings does not play nicely with other systems.

To Reproduce

  1. ros2 launch gazebo_ros2_control_demos diff_drive.launch.py
  2. Attempt to visualize TF in rviz2

Expected behavior Full transform from /odom to all other links.

Actual behavior Full transforms not published, most frequently failing to publish odom -> base_link/chassis (See https://github.com/ros-controls/gazebo_ros2_control/pull/224)

Environment (please complete the following information):

  • OS: Ubuntu 20.04
  • Version Foxy

DLu avatar Aug 14 '23 18:08 DLu

I believe when this was ported, the broadcaster wasn't a thing yet. Please feel free to submit a PR

bmagyar avatar Aug 22 '23 15:08 bmagyar

Okay, so the real issue is that raw publisher is passed to the realtime_tools::RealtimePublisher, and I don't think there's a RealtimeTFBroadcaster. Should the QOS just get fixed, or is there something else todo with realtime?

DLu avatar Nov 07 '23 03:11 DLu

Maybe it's worth it to implement a RealtimeTFBroadcaster based on the realtime_publisher?

christophfroehlich avatar Nov 07 '23 07:11 christophfroehlich

Afaik the broadcaster/listener are tfbuffer+publisher/subscriber. We could also just grab the publisher from inside the broadcaster class if that's a possibility in API

bmagyar avatar Nov 07 '23 07:11 bmagyar