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
Syntax
Description
creates a default passenger vehicle object in the 3D environment.vehicle
= sim3d.vehicle.ground.PassengerVehicle()
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.vehicle
= sim3d.vehicle.ground.PassengerVehicle(Name=Value
)
Input 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')
ActorName
— Name of actor
autogenerated name (default) | character array | string
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.
ActorClassId
— Semantic segmentation map of object class identifiers
10
(default) | real positive scalar
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.
Translation
— Relative translation
[0 0 0; 0 0 0; 0 0 0; 0 0 0; 0 0 0]
(default) | real 5-by-3 array
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)
, andTranslation(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)
, andTranslation(...,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 | Array Element | Translation 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.
Rotation
— Relative rotation
[0 0 0; 0 0 0; 0 0 0; 0 0 0; 0 0 0]
(default) | real 5-by-3 array
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)
, andRotation(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)
, andRotation(...,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 | Array Element | Rotation 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
Base Attributes
Parent
— Parent of actor
handle to parent actor object
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.
Children
— Children of actor
structure
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.
ParentWorld
— Parent world
handle to parent world 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.
X
— Longitudinal position of actor
0
(default) | scalar
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.
Y
— Lateral position of actor
0
(default) | scalar
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
— Yaw orientation angle of actor
0
(default) | scalar
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
VehicleType
— Type of vehicle
'MuscleCar'
(default) | 'Sedan'
| 'SportUtilityVehicle'
| 'SmallPickupTruck'
| 'Hatchback'
| 'BoxTruck'
| 'FormulaStudentVehicle'
Type of vehicle, specified as one of these options. To obtain the dimensions of each vehicle type, see these reference pages:
'MuscleCar'
— Muscle Car (Automated Driving Toolbox)'Sedan'
— Sedan (Automated Driving Toolbox)'SportUtilityVehicle'
— Sport Utility Vehicle (Automated Driving Toolbox)'SmallPickupTruck'
— Small Pickup Truck (Automated Driving Toolbox)'Hatchback'
— Hatchback (Automated Driving Toolbox)'BoxTruck'
— Box Truck (Automated Driving Toolbox)
Example: vehicle.VehicleType = 'Sedan'
Color
— Color of vehicle
'Red'
(default) | 'Orange'
| 'Yellow'
| 'Green'
| 'Blue'
| 'Black'
| 'White'
| 'Silver'
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
EnableLightControls
— Option to enable vehicle light control
0
or false
(default) | 1
or true
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.
Lights | Light Parameters |
---|---|
Headlights |
|
BrakeLights |
|
ReverseLights |
|
TurnSignalLights |
|
Example: vehicle.EnableLightControls = 1
Data Types: logical
LightControls
— Vehicle light controls
1-by-6 Boolean vector
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.
Value | Vehicle Light |
---|---|
| Headlight high beam |
| Headlight low beam |
| Brake |
| Reverse |
| Left signal |
| 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
.
HeadlightColor
— Headlight color
[1 1 1]
(default) | 1-by-3 array of RGB triplet values
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
.
HighBeamIntensity
— High beam intensity
100000
(default) | positive scalar
High beam intensity, in cd.
Example: vehicle.HighBeamIntensity = 500000
Dependencies
To set HighBeamIntensity
, set
EnableLightControls
to 1
.
LowBeamIntensity
— Low beam intensity
60000
(default) | positive scalar
Low beam intensity, in cd.
Example: vehicle.LowBeamIntensity = 50000
Dependencies
To set LowBeamIntensity
, set
EnableLightControls
to 1
.
HighBeamConeHalfAngle
— High beam cone half angle
70
(default) | positive scalar less than or equal to 90
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
.
LowBeamConeHalfAngle
— Low beam cone half angle
70
(default) | positive scalar less than or equal to 90
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
.
LeftHeadlightBeamOrientation
— Left headlight beam orientation
[0,0]
(default) | 1-by-2 array with values between -180
and
180
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
.
RightHeadlightBeamOrientation
— Right headlight beam orientation
[0,0]
(default) | 1-by-2 array with values between -180
and
180
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
.
BrakeLightIntensity
— Intensity of brake light
500
(default) | positive scalar
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
.
ReverseLightIntensity
— Intensity of reverse light
500
(default) | positive scalar
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
.
TurnSignalLightIntensity
— Intensity of turn signal light
500
(default) | positive scalar
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
See Also
Simulation 3D Vehicle with
Ground Following | sim3d.World
| sim3d.Actor
| add
| run
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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)