Main Content

HighwayTruck

Target specification for truck driving on highway

Since R2024b

    Description

    A HighwayTruck object contains the target specification for a truck driving on the highway. You can use the HighwayTruck object as an input to multiSensorTargetTracker. The target specification defines the state convention for trackers initialized with it. For HighwayTruck, the output state convention is: [x;y;speed;theta;omega;z;vz;length;width;height], where:

    • x, y, and z represent the x-, y, and z-coordinates of the center of the bounding box in meters.

    • speed represents the velocity magnitude in meters/second.

    • theta represents the course direction in the xy-plane, counter-clockwise with respect to the x-axis, in degrees.

    • omega represents the turn-rate in degrees/second.

    • vz represents velocity component in the vertical plane in meters/second.

    • length, width, and height represent the bounding box dimensions in meters.

    Creation

    To create a HighwayTruck object, use the trackerTargetSpec function with the "automotive", "truck", and "highway-driving" input arguments. For example:

    spec = trackerTargetSpec("automotive","truck","highway-driving")

    Properties

    expand all

    Reference coordinate frame, specified as "ego" or "global".

    When you specify this property as

    "ego" — The origin of the coordinate system is fixed to an ego vehicle, and the position and orientation of the target are modeled with respect to this ego vehicle. To account for a moving ego vehicle, ego motion compensation is used. This ego motion information must be provided as an input to the tracker initialized with the HighwayTruck object. See the More About section for more information on the ego motion data format.

    "global" — The origin of the coordinate system is fixed to a stationary global reference frame, and the position and orientation of the target is modeled with respect to this stationary frame. See the dataFormat function for information on how to provide ego pose.

    Tip

    Choose "global" reference frame if either of the following is true.

    • All sensors are mounted on the same ego vehicle, and you know the position and orientation of that ego vehicle in some global reference frame. Additionally, you want the tracks described in that same global reference frame.

    • Sensors are mounted on different ego vehicles, which can be either stationary or moving.

    You may need to change the YawLimits property of your target specification to account for the yaw of the vehicle in global reference frame. For example,

    targetSpec.YawLimits = egoYaw + [-10 10];

    Note

    You must use the same ReferenceFrame on each target specification and sensor specification to initialize a tracker.

    Example: "global"

    Data Types: char | string

    Maximum longitudinal speed of the target, specified as a positive scalar. Units are in meters per second.

    Example: 35

    Data Types: single | double

    Maximum longitudinal acceleration of the target, specified as a positive scalar. Units are in meters per second squared.

    Example: 2.5

    Data Types: single | double

    Maximum yaw rate of the target, specified as a positive scalar. This value refers to the fastest rate at which the vehicle can change its direction. Units are in degrees per second.

    Example: 3.5

    Data Types: single | double

    Maximum yaw acceleration of the target, specified as a positive scalar. This value refers to the highest rate of change of the yaw rate, indicating how quickly the vehicle can initiate or alter its turning motion. Units are in degrees per second squared.

    Example: 15

    Data Types: single | double

    Minimum and maximum lengths of the target, specified as a positive scalar. Units are in meters.

    Example: [16 22]

    Minimum and maximum widths of the target, specified as a positive scalar. Units are in meters.

    Example: [2.1 2.8]

    Data Types: single | double

    Minimum and maximum heights of the target, specified as a positive scalar. Units are in meters.

    Example: [2.1 3.5]

    Data Types: single | double

    Object Functions

    dataFormatStructure for data format required by task-oriented tracker
    hasTrackerInputDetermine whether tracker needs additional input for target specification

    Examples

    collapse all

    Create a specification for trucks driving on the highway.

    truckSpec = trackerTargetSpec("automotive","truck","highway-driving")
    truckSpec = 
      HighwayTruck with properties:
    
            ReferenceFrame: 'ego'              
                  MaxSpeed: 40           m/s   
           MaxAcceleration: 3            m/s²  
                MaxYawRate: 4            deg/s 
        MaxYawAcceleration: 10           deg/s²
                 YawLimits: [-10 10]     deg   
              LengthLimits: [16 22]      m     
               WidthLimits: [2 2.6]      m     
              HeightLimits: [3.5 4.2]    m     
    
    

    Configure the truck specification based on your application. The trucks of interest have a maximum speed of 80 mph and a maximum turn-rate of 3.5 degrees per second.

    truckSpec.MaxSpeed = 80*0.44704; % m/s
    truckSpec.MaxYawRate = 3.5; % deg/s

    You can use the truck specification as an input to the multiSensorTargetTracker function along with your sensor specifications to create a JIPDAtracker that tracks trucks driving on the highway.

    cameraSpec = trackerSensorSpec("automotive","camera","bounding-boxes");
    cameraSpec.MountingLocation = [3.7920 0 1.1];
    tracker = multiSensorTargetTracker(truckSpec,cameraSpec,"jipda")
    tracker = 
      fusion.tracker.JIPDATracker with properties:
    
                    TargetSpecifications: {[1x1 HighwayTruck]}
                    SensorSpecifications: {[1x1 AutomotiveCameraBoxes]}
                  MaxMahalanobisDistance: 5
        ConfirmationExistenceProbability: 0.9000
            DeletionExistenceProbability: 0.1000
    
    

    More About

    expand all

    Version History

    Introduced in R2024b