Main Content

ROS Log Files and Specialized Messages

Analyze rosbags, ros2bags, and access messages from specialized sensors and inputs

ROS topics are stored in log files called rosbags. You can access and filter information from these rosbags in MATLAB®. For an example of working with rosbags, see Work with rosbag Logfiles.

Specialized message functions enable you to create and access sensors and data types using specific ROS and ROS 2 message types. You can use the same functions to work with specific ROS and ROS 2 specialized message types. For examples of accessing data from these sensors, see Work with Specialized ROS Messages.

Functions

expand all

rosbagOpen and parse rosbag log file
readMessagesRead messages from rosbag
rosbagreaderAccess rosbag log file information
rosbagwriterCreate and write logs to rosbag log file
writeWrite logs to rosbag log file
selectSelect subset of messages in rosbag
timeseriesCreate time series object for selected message properties
ros2bagreaderAccess ROS 2 bag log file information
readMessagesRead messages from ros2bagreader object
selectSelect subset of messages in ros2bagreader
ros2bagwriterCreate and write logs to ROS 2 bag log file
writeWrite logs to ROS 2 bag log file
deleteRemove ros2bagwriter object from memory
rosReadImageConvert ROS or ROS 2 image data into MATLAB image
rosWriteImageWrite MATLAB image to ROS or ROS 2 image message
rosWriteCameraInfoWrite monocular or stereo camera parameters to ROS or ROS 2 message structure
rosReadLidarScanDisplay lidar scan or point cloud from ROS or ROS 2 message structure
rosReadCartesianRead laser scan ranges in Cartesian coordinates from ROS or ROS 2 message structure
rosReadScanAnglesReturn scan angles from ROS or ROS 2 message structure
rosPlotDisplay lidar scan or point cloud from ROS or ROS 2 message structures
rosReadXYZExtract XYZ coordinates from ROS or ROS 2 point cloud message structure
rosReadRGBExtract RGB color values from ROS or ROS 2 point cloud message structure
rosReadAllFieldNamesGet all available field names from ROS or ROS 2 point cloud message structure
rosReadFieldRead point cloud data from ROS or ROS 2 message structure based on field name
rosPlotDisplay lidar scan or point cloud from ROS or ROS 2 message structures
rosReadQuaternionCreate MATLAB quaternion object from ROS or ROS 2 message structure
velodyneROSMessageReaderRead Velodyne ROS messages
hasFrameDetermine if another Velodyne point cloud is available in the ROS messages
readFrameRead point cloud frame from ROS message
resetReset CurrentTime property of velodyneROSMessageReader object to default value
rosReadBinaryOccupancyGridRead binary occupancy grid data from ROS or ROS 2 message structure
rosReadOccupancyGridRead occupancy grid data from ROS or ROS 2 message structure
rosReadOccupancyMap3DRead 3-D map from ROS or ROS 2 Octomap message structure
rosWriteBinaryOccupancyGridWrite values from binary occupancy grid to ROS or ROS 2 message structure
rosWriteOccupancyGridWrite values from occupancy grid to ROS or ROS 2 message structure

Objects

BagSelection Object for storing rosbag selection

Blocks

Read DataPlay back data from log file
Read ImageExtract image from ROS Image message
Read ScanExtract scan data from ROS or ROS 2 laser scan message
Read Point CloudExtract point cloud from ROS PointCloud2 message
Write ImageWrite image data to a ROS or ROS 2 message
Write Point CloudWrite point cloud data to a ROS or ROS 2 message

Topics