Replaying ROS2 LiDAR Data with RTI Recording Service and DDS
;
<element>sensor_msgs::msg::dds_::PointCloud2_</element>
</registered_type_name>
<topics><element>rt/velodyne_points</element></topics>
</element>
<max_sequence>2147483647</max_sequence>
</type>
</element>
</file_group>
<path><element>.</element></path>
</xml>
</type_config>
<session name="A_Session">
<!-- Default values for <time_control> * -->
<replay_topic name="All_Topic">
<input>
<topic_name>*</topic_name>
<type_name>*</type_name>
<record_group_name>*</record_group_name>
<domain_name>*</domain_name>
</input>
</replay_topic>
</session>
</replay_database>
</replay_service>
</dds>
To replay the recorded data back into ROS2, execute:
rtireplay -cfgFile ros2_replay.xml -cfgName simple_example
Results
After recording a series of ROS2 LiDAR sessions, the data can be replayed on-demand. The following screenshot demonstrates the replayed point cloud within the ROS2 environment:

This approach eliminates the need for a dedicated automotive simulator or physical vehicle during testing. By tweaking the <time_control><rate> setting in the replay XML, you can accelerate playback—effectively simulating a high‑speed scenario in minutes.
For deeper insights into ROS2 and DDS integration, refer to our previous RTI Blog posts such as A Field Guide to Interoperability and When Ecosystems Merge.
Internet of Things Technology
- MQTT vs. DDS: Choosing the Right M2M Protocol for IoT
- Connext DDS in Industrial IoT: 5 Key Insights for Reliability, Security, and Scalability
- ROS 2 and DDS Interoperability: A Practical Guide for Seamless Integration
- ROS2 Bouncy Bolson Adds Free RTI Connext DDS: Boosting Connectivity & Diagnostics
- Connext DDS 5.3 Now Live: The First Connectivity Platform for Industrial IoT Systems of Systems
- Leverage Live IoT Data in MATLAB with RTI Connext DDS Integration
- Visualizing Sensor Data with RTI Connext DDS Micro and Admin Console
- Accelerate Time‑to‑Market with RTI Connext DDS Professional Tools
- Industrial‑Grade Connectivity Architecture for the IoT
- Connext DDS on Android: Empowering Industrial IoT with Reliable Publish/Subscribe