ros2/rosbag2

Do not warn for unknown types if they are not included in the topic list

Aposhian opened this issue · 3 comments

Description

If there is a topic with an unknown type on the ROS domain, ros2 bag record spams messages like

[WARN 1692051327.854323893] [ROSBAG2_TRANSPORT]: Topic '/performance_metrics' has unknown type 'gazebo_msgs/msg/PerformanceMetrics' . Only topics with known type are supported.

every single time a message is received, even if that topic wasn't even in the list of topics to record.

Related Issues

It should also probably be a separate enhancement to only log this message once for a particular topic, since logging on every message is a lot of logs, and doesn't add any information.

Completion Criteria

If a topic is not specified in the topic lists, do not warn about issues with it.

Implementation Notes / Suggestions

Could just filter by topic list right before this message.

Testing Notes / Suggestions

  • Closing as resolved in the #1018
    Now the warning about unknown topic types will appear only once per each topic during recording.

I tested these changes using Humble version implemented in #1434 and I'm still getting warning messages for the topics that I am not recording, but now only once per topic. So it looks like this issue isn't yet resolved?

@Jannkar Thanks for the heads up.
Indeed we do have a check if topics are not on the list but the checks are ordered such a way that we are checking for unknown types first.

I made a quick fix for that in #1466.
However it is in the draft yet, I am trying to figure out if will be possible to create unit tests for regression.