addData
Description
addData(
adds the specified lane information lanedata
,timestamps
,lbdata
)lbdata
to the laneData
object
lanedata
.
Examples
Create Empty Lane Data Object and Add Lane Information
Create an empty laneData
object.
ld = laneData
ld = laneData with properties: TimeStamp: [] LaneBoundaryData: [] LaneInformation: [] StartTime: [] EndTime: [] NumSamples: 0
Load recorded lane boundary data into the workspace.
data = load("laneBoundaryData.mat");
Extract the recorded timestamps and the lane boundary information from the data.
t = data.timestamps; % Extract timestamps lbdata = data.lbdata; % Extract lane boundary information
Add the first five rows of lane information to the laneData
object.
addData(ld,t(1:5),lbdata(1:5,:))
Display the details of the laneData
object.
disp(ld)
laneData with properties: TimeStamp: [5x1 double] LaneBoundaryData: {5x1 cell} LaneInformation: [] StartTime: 0 EndTime: 0.2000 NumSamples: 5
Input Arguments
lanedata
— Recorded lane data
laneData
object
Recorded lane data, specified as a laneData
object.
timestamps
— Timestamps of lane information to add
N-element numeric column vector
Timestamps of lane information to add, specified as an N-element numeric column vector. N is the number of timestamps. Units are in seconds.
When you add lane data, the laneData
object automatically arranges
timestamps in increasing order. If the input data contains multiple rows of data with
the same timestamp, the object merges that data into a single row.
Data Types: double
lbdata
— Lane boundary data to add
N-by-M matrix | N-by-1 cell array
Lane boundary data to add, specified as an N-by-M matrix or N-by-1 cell array. N is the number of timestamps.
If you have an equal number of recorded lane boundaries across all timestamps,
specify lbdata
as an N-by-M
array of parabolicLaneBoundary
objects, cubicLaneBoundary
objects, or clothoidLaneBoundary
objects. M is the uniform number of
detected lane boundaries for each sample.
If you have an unequal number of recorded lane boundaries across timestamps, specify
lbdata
as an N-by-1 cell
array. Each cell entry must contain an M-element row vector of
parabolicLaneBoundary
objects, cubicLaneBoundary
objects, or clothoidLaneBoundary
objects. M is the number of detected
lane boundaries at the timestamp.
The movements of the ego vehicle and non-ego actors must follow the vehicle coordinate system used by Automated Driving Toolbox™. For more information on the vehicle coordinate system, see Vehicle Coordinate System.
Note
You must specify all lane boundaries using the same type of object.
Version History
Introduced in R2023a
See Also
Open Example
You have a modified version of this example. Do you want to open this example with your edits?
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)