Main Content

sim3d.vehicle.ground.PassengerVehicle

Create four-wheeled passenger vehicle that follows ground in 3D environment

Since R2024b

    Description

    Use the sim3d.vehicle.ground.PassengerVehicle object to create a four-wheeled passenger vehicle that follows ground in the 3D environment. After you create a sim3d.vehicle.ground.PassengerVehicle object, you can modify aspects of the vehicle by setting property values.

    Creation

    Description

    vehicle = sim3d.vehicle.ground.PassengerVehicle() creates a default passenger vehicle object in the 3D environment.

    vehicle = sim3d.vehicle.ground.PassengerVehicle(Name=Value) specifies options using one or more optional name-value arguments. You can also set the properties under Vehicle Attributes and Vehicle Light Attributes using name-value arguments.

    Input Arguments

    expand all

    Name-Value Arguments

    Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

    Example: vehicle = sim3d.vehicle.ground.PassengerVehicle(ActorName="Vehicle",VehicleType='Sedan',Color='Blue')

    Name of actor, specified as a character array or string. If you do not specify an actor name, then the software assigns the actor an autogenerated name. Use this argument to set the name of the sim3d.vehicle.ground.PassengerVehicle object.

    Note

    If you specify the same name as an actor that already exists, then the software appends actor name you specify with a unique identifier.

    Semantic segmentation map of object class identifiers, specified as real positive scalar. For a complete list of actor IDs and their corresponding object descriptions, see Labels.

    Relative translation of vehicle and wheels, specified as real 5-by-3 array, in m. Use this argument to set the initial translation of the passenger vehicle. When you add an actor to the 3D environment, the default parent actor is the Scene Origin at (0,0,0).

    • Translation(1,1), Translation(1,2), and Translation(1,3) — Vehicle translation relative to its parent actor about the X-, Y-, and Z- axes of the ISO 8855 standard coordinate system. For more information on the coordinate system, see Coordinate Systems in Simulink 3D Animation.

    • Translation(...,1), Translation(...,2), and Translation(...,3) — Wheel translation relative to vehicle, about the X-, Y-, and Z- axes of the ISO 8855 standard coordinate system.

    The signal contains translation information according to the axle and wheel locations.

    Translation=[XvYvZvXFLYFLZFLXFRYFRZFRXRLYRLZRLXRRYRRZRR]

    TranslationArray ElementTranslation Axis

    Vehicle, Xv

    Translation(1,1)X-axis

    Vehicle, Yv

    Translation(1,2)Y-axis

    Vehicle, Zv

    Translation(1,3)Z-axis

    Front left wheel, XFL

    Translation(2,1)X-axis

    Front left wheel, YFL

    Translation(2,2)Y-axis

    Front left wheel, ZFL

    Translation(2,3)Z-axis

    Front right wheel, XFR

    Translation(3,1)X-axis

    Front right wheel, YFR

    Translation(3,2)Y-axis

    Front right wheel, ZFR

    Translation(3,3)Z-axis

    Rear left wheel, XRL

    Translation(4,1)X-axis

    Rear left wheel, YRL

    Translation(4,2)Y-axis

    Rear left wheel, ZRL

    Translation(4,3)Z-axis

    Rear right wheel, XRR

    Translation(5,1)X-axis

    Rear right wheel, YRR

    Translation(5,2)Y-axis

    Rear right wheel, ZRR

    Translation(5,3)Z-axis

    Note

    The sim3d.vehicle.ground.PassengerVehicle object implements an actor that follows the ground. Use X, Y, and Yaw properties to move the actor in the 3D environment. The actor object then determines the corresponding elevation, pitch, and roll by sensing the ground terrain.

    Relative rotation of vehicle and wheels, specified as real 5-by-3 array, in rad. Use this argument to set the initial rotation of the passenger vehicle.

    • Rotation(1,1), Rotation(1,2), and Rotation(1,3) — Vehicle rotation relative to its parent actor about the X-, Y-, and Z- axes of the ISO 8855 standard coordinate system. For more information on the coordinate system, see Coordinate Systems in Simulink 3D Animation.

    • Rotation(...,1), Rotation(...,2), and Rotation(...,3) — Wheel rotation relative to vehicle, about the X-, Y-, and Z- axes of the ISO 8855 standard coordinate system.

    The signal contains rotation information according to the axle and wheel locations.

    Rotation=[PitchvRollvYawvPitchFLRollFLYawFLPitchFRRollFRYawFRPitchRLRollRLYawRLPitchRRRollRRYawRR]

    RotationArray ElementRotation Axis

    Vehicle, Rollv

    Rotation(1,1)X-axis

    Vehicle, Pitchv

    Rotation(1,2)Y-axis

    Vehicle, Yawv

    Rotation(1,3)Z-axis

    Front left wheel, RollFL

    Rotation(2,1)X-axis

    Front left wheel, PitchFL

    Rotation(2,2)Y-axis

    Front left wheel, YawFL

    Rotation(2,3)Z-axis

    Front right wheel, RollFR

    Rotation(3,1)X-axis

    Front right wheel, PitchFR

    Rotation(3,2)Y-axis

    Front right wheel, YawFR

    Rotation(3,3)Z-axis

    Rear left wheel, RollRL

    Rotation(4,1)X-axis

    Rear left wheel, PitchRL

    Rotation(4,2)Y-axis

    Rear left wheel, YawRL

    Rotation(4,3)Z-axis

    Rear right wheel, RollRR

    Rotation(5,1)X-axis

    Rear right wheel, PitchRR

    Rotation(5,2)Y-axis

    Rear right wheel, YawRR

    Rotation(5,3)Z-axis

    Note

    The sim3d.vehicle.ground.PassengerVehicle object implements an actor that follows the ground. Use X, Y, and Yaw properties to move the actor in the 3D environment. The actor object then determines the corresponding elevation, pitch, and roll by sensing the ground terrain.

    Properties

    expand all

    Base Attributes

    Parent of actor, specified as a handle to the parent actor object. After you add an actor to the sim3d.World object, the default parent actor is the Scene Origin at (0,0,0). Use this property to set any actor in the 3D environment as the parent actor of a sim3d.vehicle.ground.PassengerVehicle object.

    This property is read-only.

    Children of actor, specified as a structure. Each field of the structure contains a handle to the child of a sim3d.vehicle.ground.PassengerVehicle object.

    Parent world, specified as a handle to the parent sim3d.World object. You can use this property only if the sim3d.vehicle.ground.PassengerVehicle object is added to the parent sim3d.World object.

    Longitudinal position of the actor along the X-axis of the scene, specified as scalar, in m. X is in the ISO 8855 standard coordinate system. Use this property to move the actor along the X-axis of the scene. For more information on the coordinate system, see Coordinate Systems in Simulink 3D Animation.

    Lateral position of the actor along the Y-axis of the scene, specified as scalar, in m. Y is in the ISO 8855 standard coordinate system. Use this property to move the actor along the Y-axis of the scene. For more information on the coordinate system, see Coordinate Systems in Simulink 3D Animation.

    Yaw orientation angle of the actor along the Z-axis of the scene, specified as scalar, in rad. Yaw is in the ISO 8855 standard coordinate system. Use this property to rotate the actor along the Z-axis of the scene. For more information on the coordinate system, see Coordinate Systems in Simulink 3D Animation.

    Vehicle Attributes

    Type of vehicle, specified as one of these options. To obtain the dimensions of each vehicle type, see these reference pages:

    Example: vehicle.VehicleType = 'Sedan'

    Select the color of the vehicle, specified as one of these options:

    • 'Red'

    • 'Orange'

    • 'Yellow'

    • 'Green'

    • 'Blue'

    • 'Black'

    • 'White'

    • 'Silver'

    Example: vehicle.Color = 'Blue'

    Data Types: string

    Vehicle Light Attributes

    Option to enable vehicle light control, specified as 0 (false) if light control is not enabled or 1 (true) if it is enabled. You can control these vehicle light parameters.

    LightsLight Parameters
    Headlights

    • HeadlightColor

    • HighBeamIntensity

    • LowBeamIntensity

    • HighBeamConeHalfAngle

    • LowBeamConeHalfAngle

    • LeftHeadlightBeamOrientation

    • RightHeadlightBeamOrientation

    BrakeLights

    BrakeLightIntensity

    ReverseLights

    ReverseLightIntensity

    TurnSignalLights

    TurnSignalLightIntensity

    Example: vehicle.EnableLightControls = 1

    Data Types: logical

    Vehicle light controls, specified as a 1-by-6 Boolean vector. Each element of the vector turns a specific vehicle light on or off, as indicated in the table. A value of 1 turns the light on. A value of 0 turns the light off.

    ValueVehicle Light

    [1 0 0 0 0 0]

    Headlight high beam

    [0 1 0 0 0 0]

    Headlight low beam

    [0 0 1 0 0 0]

    Brake

    [0 0 0 1 0 0]

    Reverse

    [0 0 0 0 1 0]

    Left signal

    [0 0 0 0 0 1]

    Right signal

    Example: To turn on the headlight low beam and reverse light, set vehicle.LightControls = [0 1 0 1 0 0]

    Dependencies

    To set LightControls, set EnableLightControls to 1.

    Headlight color, specified as a normalized 1-by-3 array of RGB triplet values.

    Example: vehicle.HeadlightColor = [1 1 0]

    Dependencies

    To set HeadlightColor, set EnableLightControls to 1.

    High beam intensity, in cd.

    Example: vehicle.HighBeamIntensity = 500000

    Dependencies

    To set HighBeamIntensity, set EnableLightControls to 1.

    Low beam intensity, in cd.

    Example: vehicle.LowBeamIntensity = 50000

    Dependencies

    To set LowBeamIntensity, set EnableLightControls to 1.

    High beam cone half angle, specified as a positive scalar less than or equal to 90, in deg.

    Example: vehicle.HighBeamConeHalfAngle = 80

    Dependencies

    To set HighBeamConeHalfAngle, set EnableLightControls to 1.

    Low beam cone half angle, specified as a positive scalar less than or equal to 90, in deg.

    Example: vehicle.LowBeamConeHalfAngle = 50

    Dependencies

    To set LowBeamConeHalfAngle, set EnableLightControls to 1.

    Pitch and yaw orientation of the left headlight beam orientation in the Z-up coordinate system, specified as a 1-by-2 array with values between -180 and 180, in deg. The first element of the array [1,1] is the pitch angle. The second element of the array [1,2] is the yaw angle.

    Example: vehicle.LeftHeadlightBeamOrientation = [10,10]

    Dependencies

    To set LeftHeadlightBeamOrientation, set EnableLightControls to 1.

    Pitch and yaw orientation of the right headlight beam orientation in the Z-up coordinate system, specified as a 1-by-2 array with values between -180 and 180, in deg. The first element of the array [1,1] is the pitch angle. The second element of the array [1,2] is the yaw angle.

    Example: vehicle.RightHeadlightBeamOrientation = [10,10]

    Dependencies

    To set RightHeadlightBeamOrientation, set EnableLightControls to 1.

    Intensity of brake light, specified as a positive scalar, in cd/m^2.

    Example: vehicle.BrakeLightIntensity = 600

    Dependencies

    To set BrakeLightIntensity, set EnableLightControls to 1.

    Intensity of reverse light, specified as a positive scalar, in cd/m^2.

    Example: vehicle.ReverseLightIntensity = 600

    Dependencies

    To set ReverseLightIntensity, set EnableLightControls to 1.

    Intensity of turn signal light, specified as a positive scalar, in cd/m^2.

    Example: vehicle.TurnSignalLightIntensity = 600

    Dependencies

    To set TurnSignalLightIntensity, set EnableLightControls to 1.

    Version History

    Introduced in R2024b