idealGroundTruthSensor
Generate ground truth measurements as sensor detections or track reports from driving scenario or RoadRunner Scenario
Since R2025a
Description
The idealGroundTruthSensor
System object™ generates detections or track reports for ground-truth measurements of all the
targets in the field-of-view of the sensor. The sensor also generates ground-truth
measurements for lane boundaries in the scenario. You can mount the
idealGroundTruthSensor
on a vehicle and use it in a scenario containing other actors
and trajectories created using a drivingScenario
object.
You can also use the idealGroundTruthSensor
object with vehicle actors in RoadRunner Scenario simulation. First you must create a SensorSimulation
object to interface sensors with RoadRunner Scenario, and then register the sensor model using the addSensors
object function before simulation.
To generate ideal ground-truth detections:
Create the
idealGroundTruthSensor
object and set its properties.Call the object with arguments, as if it were a function.
To learn more about how System objects work, see What Are System Objects?
Creation
Description
creates an ideal ground truth sensor object with default property values.idealGTSensor
= idealGroundTruthSensor
sets properties using
one or more name-value pairs. For example,
idealGTSensor
= idealGroundTruthSensor(Name=Value
)idealGroundTruthSensor(DetectionCoordinates="Host
Coordinates",MaxRange=200)
creates an ideal ground truth sensor that reports
detections in the host vehicle coordinate system and has a maximum detection range of 200
meters.
Properties
Usage
Syntax
Description
Generate Detections
This syntax applies when you set the TargetReportFormat
property to 'Object Detections'
and
the DetectorOutput
property to 'Objects Only'
.
[
returns ground truth object detections dets
,numReports
,isValidTime
] = idealGTSensor()dets
for actors in field of
view, number of valid detections reported, numReports
, and a
logical value isValidTime
indicating whether
simTime
is a valid time for generating detections. If
simTime
is an integer multiple of the UpdateInterval
property value, then isValidTime
is
1
(true
).
Generate Tracks
This syntax applies when you set the TargetReportFormat
property to 'Tracks
and the DetectorOutput
property to 'Objects Only'
..
[
returns ground truth object tracks tracks
,numReports
,isValidTime
] = idealGTSensor()tracks
for actors in field of
view, number of valid tracks reported, numReports
, and a logical
value isValidTime
indicating whether simTime
is a valid time for generating detections. If simTime
is an integer
multiple of the UpdateInterval
property value, then isValidTime
is
1
(true
).
Generate Target Poses
This syntax applies when you set the TargetReportFormat
property to 'Target Poses'
and the
DetectorOutput
property to 'Objects Only'
.
[
returns ground truth target poses poses
,numReports
,isValidTime
] = idealGTSensor()poses
for actors in field of
view, number of valid poses reported, numReports
, and a logical
value isValidTime
indicating whether simTime
is a valid time for generating detections. If simTime
is an integer
multiple of the UpdateInterval
property value, then isValidTime
is
1
(true
).
Generate Lane Detections Along with Object Detections, Tracks or Target Poses
This syntax applies when you set the DetectorOutput
property to 'Objects and Lanes'
.
[___,
also returns ground truth lane detections numReports
,isValidTime
,laneDets
,numValidLaneDets
,isValidLaneTime
] = idealGTSensor()laneDets
along with
object detections, tracks or target poses using any of the previous syntaxes. This
syntax also returns the number of valid lane detections reported,
numValidLaneDets
, and a flag,
isValidLaneTime
, indicating whether the required simulation time
to generate lane detections has elapsed.
Output Arguments
Object Functions
To use an object function, specify the
System object as the first input argument. For
example, to release system resources of a System object named obj
, use
this syntax:
release(obj)
Examples
Extended Capabilities
Version History
Introduced in R2025a