You're reading the documentation for an older, but still supported, version of ROS 2. For information on the latest version, please have a look at Lyrical.
Migration Guides: Jazzy to Kilted
This list summarizes important changes between Jazzy (previous) and Kilted (current) releases, where changes to user code might be necessary.
RealtimeBox
RealtimePublisher
RealtimePublisheris updated with a newtry_publishAPI.RealtimePublisheris updated with a template constructor that creates the publisher internally, and the legacy constructor taking a pre-created publisher has been deprecated.Instead of creating a publisher first and passing it to the constructor, you can now pass the node (or node interface/pointer), topic name, QoS, and publisher options directly to
RealtimePublisher. (#573).