Using ROS Toolbox to publish transforms between 2 frames on topic /tf_static but RVIZ doesn't recognize them.

4 views (last 30 days)
Hello there!
I'm using ROS Toolbox to publish the transform between two frames. This involves using the tf2_msgs/TFMessage message on the /tf_static topic, with the frame_id set to 'Mutter' and the child_frame_id set to 'Tchter', as shown in the picture:
Simulink publishes the transforms just fine and it's visible on my Virtual Machine
The problem is neither RVIZ nor tf_ros package recognize these frames, as shown below.

Answers (1)

Josh Chen
Josh Chen on 3 Jan 2025
Hi Abdulrahman,
Given that you are able to see the correct message in virtual machine, I believe the message modeling is correct.
One thing I did not see in the problem statement is the QoS setting on the Publish block mask.
Since you are publishing to "/tf_static", I believe at least the "Durability" should be set to "transient_local". If you haven't done so, you can try to:
  1. Double click to open "Publish" block mask
  2. Change "Durability" to "Transient local"
In addition, for "/tf_static", you just need to publish it once. Hence, one optimization is to put all your blocks into a "Initialize Function" block. This ensures it will only be published once instead of publishing in each time step during simulation.
Hope this helps,
Josh

Products


Release

R2024b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!