Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Sensor Data

Collect and analyze sensor data utilizing ROS messages

Robotics System Toolbox™ enables you to communicate over ROS networks with ROS messages. You can publish or subscribe to specific ROS message topics, access transformations, or set server parameter information. To send and receive messages, see Exchange Data with ROS Publishers and Subscribers.

Specific sensors, including laser scans and point clouds, have ROS messages that can be converted to MATLAB® data types for analysis. See Work with Specialized ROS Messages for an overview of specific sensor message types.

Functions

rosinitConnect to ROS network
rostopicRetrieve information about ROS topics
rosmsgRetrieve information about ROS messages and message types
rosmessageCreate ROS messages
rospublisher Publish message on a topic
rossubscriber Subscribe to messages on a topic
rosparamAccess ROS parameter server values
rosrateExecute loop at fixed frequency
rosmessageCreate ROS messages
readMessagesRead messages from rosbag
receiveWait for new ROS message
sendPublish ROS message to topic
showdetailsDisplay all ROS message contents
selectSelect subset of messages in rosbag
transformTransform message entities into target coordinate frame
waitForTransformWait until a transformation is available
getTransformRetrieve the transformation between two coordinate frames
sendTransformSend transformation to ROS network
rostfReceive, send, and apply ROS transformations
applyTransform message entities into target frame
readBinaryOccupancyGridRead binary occupancy grid
writeBinaryOccupancyGridWrite values from grid to ROS message
readImageConvert ROS image data into MATLAB image
writeImageWrite MATLAB image to ROS image message
lidarScanCreat object for storing 2-D lidar scan
plotDisplay laser or lidar scan readings
removeInvalidDataRemove invalid range and angle data
readCartesianRead laser scan ranges in Cartesian coordinates
readScanAnglesReturn scan angles for laser scan range readings
transformScanTransform laser scan based on relative pose
readXYZExtract XYZ coordinates from point cloud data
readRGBExtract RGB values from point cloud data
readAllFieldNamesGet all available field names from ROS point cloud
readFieldRead point cloud data based on field name
scatter3Display point cloud in scatter plot
robotics.RateExecute loop at fixed frequency
rosrateExecute loop at fixed frequency

Blocks

Blank MessageCreate blank message using specified message type
Get ParameterGet values from ROS parameter server
PublishSend messages to ROS network
Set ParameterSet values on ROS parameter server
SubscribeReceive messages from ROS network

Using Objects

CompressedImageCreate compressed image message
ImageCreate image message
LaserScanCreate laser scan message
lidarScanCreat object for storing 2-D lidar scan
OccupancyGridCreate occupancy grid message
PointCloud2Access point cloud messages

Topics

Exchange Data with ROS Publishers and Subscribers

The primary mechanism for ROS nodes to exchange data is to send and receive messages.

Work with Basic ROS Messages

Messages are the primary container for exchanging data in ROS.

Built-In Message Support

List of supported message types in MATLAB ROS.

Work with Specialized ROS Messages

Some commonly used ROS messages store data in a format that requires some transformation before it can be used for further processing.

Transform Laser Scan Data From A ROS Network

Transform laser scan data using a ROS transformation tree.

Execute Code at a Fixed-Rate

Using the robotics.Rate object or the rosrate function allows you to time iterations of your robotics applications.

ROS Log Files (rosbags)

Summary of the structure of rosbags and the workflow for selecting subsets of messages in a rosbag.

Work with rosbag Logfiles

A rosbag or bag is a file format in ROS for storing message data.

Was this topic helpful?