Main Content

vision.labeler.loading.RosbagSource Class

Namespace: vision.labeler.loading
Superclasses: vision.labeler.loading.MultiSignalSource

Load signals from rosbag sources into Ground Truth Labeler app

Since R2020a

Description

The vision.labeler.loading.RosbagSource class creates an interface for loading signals from rosbag files into the Ground Truth Labeler app. In the Add/Remove Signal dialog box of the app, when Source Type is set to Rosbag, this class controls the parameters in that dialog box.

Add/Remove Signal dialog box with Source Type set to Rosbag

To access this dialog box, in the app, select Import > Add Signals.

The default implementation of this class loads signals from these ROS message types:

  • sensor_msgs/Image

  • sensor_msgs/CompressedImage

  • sensor_msgs/PointCloud2

Note

This class requires ROS Toolbox.

The vision.labeler.loading.RosbagSource class is a handle class.

Creation

When you export labels from a Ground Truth Labeler app session that contains rosbag sources, the exported groundTruthMultisignal object stores instances of this class in its DataSource property.

To create a RosbagSource object programmatically, such as when programmatically creating a groundTruthMultisignal object, use the vision.labeler.loading.RosbagSource function (described here).

Description

rosbagSource = vision.labeler.loading.RosbagSource creates a RosbagSource object for loading signals from rosbag data sources. To specify the data source and the parameters required to load the source, use the loadSource method.

Properties

expand all

Name of the type of source that this class loads, specified as a string scalar.

Attributes:

GetAccess
public
Constant
true
NonCopyable
true

Description of the functionality that this class provides, specified as a string scalar.

Attributes:

GetAccess
public
Constant
true
NonCopyable
true

Name of the data source, specified as a string scalar. Typically, SourceName is the name of the file from which the signal is loaded.

Attributes:

GetAccess
public
SetAccess
protected

Parameters for loading signals from a rosbag data source, specified as an empty structure. When you load image or lidar signals from a rosbag, do not specify the signal timestamps or any other parameters. The loadSource method reads these parameters from the rosbag.

Attributes:

GetAccess
public
SetAccess
protected

Names of the signals that can be loaded from the data source, specified as a string vector.

Attributes:

GetAccess
public
SetAccess
protected

Types of the signals that can be loaded from the data source, specified as a vector of vision.labeler.loading.SignalType enumerations. Each signal listed in the SignalName property is of the type in the corresponding position of SignalType.

Attributes:

GetAccess
public
SetAccess
protected

Timestamps of the signals that can be loaded from the data source, specified as a cell array of duration vectors. Each signal listed in the SignalName property has the timestamps in the corresponding position of Timestamp.

Attributes:

GetAccess
public
SetAccess
protected

Number of signals that can be read from the data source, specified as a nonnegative integer. NumSignals is equal to the number of signals in the SignalName property.

Attributes:

GetAccess
public
SetAccess
public
Dependent
true
NonCopyable
true

Methods

expand all

Tips

  • You can this class as a starting point for creating a custom data source loading class. To view the source code for this class, use this command:

    edit vision.labeler.loading.RosbagSource

Version History

Introduced in R2020a