rosbagwriter
Description
Use the rosbagwriter
object to create a rosbag log file and
write logs to the bag file. Each log contains a topic, its corresponding timestamp, and a ROS
message.
Note
The rosbagwriter
object locks the created bag file for use, it is
necessary to delete and clear the rosbagwriter
object in order to use the
bag file with a reader or perform other operations.
Creation
Description
creates a rosbag log file in the location specified by bagwriter
= rosbagwriter(filepath
)path
and
returns the corresponding rosbagwriter
object.
If you do not specify the name of the bag file in the filepath
,
the object assigns the current timestamp as the file name. If the folders you specify in
filepath
are not present in the directory, the object creates them
and places the bag file accordingly. The filepath
input argument sets
the FilePath
property.
sets the Compression and
ChunkSize
properties using name-value arguments. Use this syntax with the input argument in the
previous syntax.bagwriter
= rosbagwriter(___,Name,Value
)
Properties
Examples
Version History
Introduced in R2021b