roboto.domain.topics.ros2_decoder#
Module Contents#
- roboto.domain.topics.ros2_decoder.make_ros2_decoder_factory()#
Build a ROS2 decoder factory with the Roboto perf patch applied.
The patch (see
roboto._mcap_ros2_perf_patch) caches the dynamically constructed message class per schema, which avoids rebuilding aSimpleNamespacesubclass and re-stringifying the schema definition on every message. Every consumer ofmcap_ros2.decoder.DecoderFactoryin this codebase should go through this helper so the patch is installed before the first decode.apply()is idempotent and cheap on subsequent calls (a single module-attribute check).- Return type:
mcap_ros2.decoder.DecoderFactory