vehicleDimensions
Store vehicle dimensions
Description
The vehicleDimensions
object stores vehicle dimensions. The
figure shows the dimensions that are included in the
vehicleDimensions
.
The position of the vehicle is often represented as a single point located on the ground at the center of the rear axle, as indicated by the red dot in the figure. This position corresponds to the natural center of rotation of the vehicle.
The table lists typical vehicle types and their corresponding dimensions.
Vehicle Classification | Length | Width | Height | Wheelbase | Front Overhang | Rear Overhang |
---|---|---|---|---|---|---|
Automobile (sedan) | 4.7 m | 1.8 m | 1.4 m | 2.8 m | 0.9 m | 1.0 m |
Motorcycle | 2.2 m | 0.6 m | 1.5 m | 1.51 m | 0.37 m | 0.32 m |
Creation
Syntax
Description
vdims = vehicleDimensions
creates a
vehicleDimensions
object with a default length of 4.7 m,
width of 1.8 m, and height of 1.4 m.
vdims = vehicleDimensions(___,
uses one or more name-value pair arguments to set the Name,Value
)Wheelbase
,
FrontOverhang
, RearOverhang
, and WorldUnits
properties. Name
is the property name and
Value
is the corresponding value. Name
must appear inside single quotes (' '
). You can specify
several name and value pair arguments in any order as
Name1,Value1,...,NameN,ValueN
.
Properties
Examples
Tips
The
Length
of the vehicle is the sum of theWheelbase
,FrontOverhang
, andRearOverhang
. If you changeFrontOverhang
, then the value ofWheelbase
automatically adjusts to keepLength
constant. Any change resulting in a negative wheelbase causes an error.You can use the vehicle dimensions to define a
vehicleCostmap
that represents the planning search space around a vehicle. Path planning algorithms, such aspathPlannerRRT
, use vehicle dimensions to find a path for the vehicle to follow.
Extended Capabilities
Version History
Introduced in R2018a