ros2bagreader
Description
The ros2bagreader
object is an index of the messages within a ROS
2 bag file. You can use it to extract message data from a ROS 2 bag file or select messages
based on specific criteria.
Creation
Description
creates an indexable bagreader
= ros2bagreader(folderpath
)ros2bagreader
object,
bagreader
, that contains all the messages from the ROS 2 bag file at
the input path filepath
. The folderpath
input
sets the value of the FilePathproperty.
ROS 2 bag files are used for storing message data. Their primary use is in the logging of messages transmitted over a ROS 2 network. The resulting bag file can be used for offline analysis, visualization, and storage. MATLAB provides functionality for reading existing bag files.
Note
If the ROS 2 bag log file contains custom messages, create custom messages for
MATLAB using ros2genmsg
function before creating the ros2bagreader
object.
Properties
Object Functions
readMessages | Read messages from ros2bagreader object |
select | Select subset of messages in ros2bagreader |