I am simulating a quadrotor with a depth camera on Gazebo and I am trying to see the data published by the simulation on RViz2.
The problem is that when I tried to visualize the point cloud of the camera from the fixed frame "map": I got the error message
Message Filter dropping message: frame 'camera_link' at time 1675148130.527 for reason 'Unknown'
As far as I understood, this error message is associated with the inability of RViz to find the transformation from the static frame "map" to the frame "camera_link". So, I started playing a bit around, trying to understand what was happening.
I was publishing 3 transformations through a ROS2 node:
- "map" to "odom" (static tf)
- "odom" to "drone" (dynamic tf)
- "drone" to "camera_link" (static tf) All of them were being published simultaneously at the same timestamps.
I was able to see all the transformations correctly published on the topics /tf_static and /tf through the command
ros2 topic echo <topic_name>
Moreover, I was able to visualize them in RViz2 using the TF tool, all of them connected in the three as reported in the above list. So RViz2 can correctly read them, and I was able to select each of the 4 four frames as the fixed frame. So I started changing the fixed frame to see if anything happened.
When I selected either "drone" or "camera_link" as the fixed frame, I was able to visualize the point cloud of the camera. When I selected either "map" or "odom" I got the error message.
My conclusion, for now, is that there could be some problems I am not aware of when using dynamic tf in RViz or when mixing static and dynamic tf.
I was not able to find a solution looking on the web, so I hoped some of you could help me in debugging this issue.