setAttribute
Set runtime attribute of actor
Description
setAttribute(
sets the value of the specified runtime attribute for the
actorSim
,Name=Value
)Simulink.ActorSimulation
actor actorSim
. Using this
command, you can set one runtime attribute at a time.
Examples
Set Runtime Attributes of Actor
Set the pose of an actor.
setAttribute(actorSim,Pose=[0.1694 0.9855 -0.0000 -90.7324; -0.9855 0.1694 -0.0000 -12.9314; -0.0000 0.0000 1.0000 -0.0000; 0 0 0 1.0000]
Set the velocity of an actor.
setAttribute(actorSim,Velocity=[2.6216 3.0288 0.0000])
Input Arguments
actorSim
— Actor
Simulink.ActorSimulation
object
Actor for which to set attribute, specified as a
Simulink.ActorSimulation
object.
Example: setAttribute(actorSim,AngularVelocity=[0.4100 0.5000
0.0000])
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: setAttribute(actorSim, Pose=[0.1694 0.9855 -0.0000 -90.7324; -0.9855
0.1694 -0.0000 -12.9314; -0.0000 0.0000 1.0000 -0.0000; 0 0 0 1.0000])
sets the
pose of an actor to the specified value.
Pose
— Actor pose
array
Actor pose, specified as a 4-by-4 array. Indicates the position and orientation of an actor in the RoadRunner Scenario coordinate system.
Example: Pose=[0.1694 0.9855 -0.0000 -90.7324; -0.9855 0.1694 -0.0000
-12.9314; -0.0000 0.0000 1.0000 -0.0000; 0 0 0 1.0000]
Velocity
— Actor velocity
array
Actor velocity in the x-, y-and z- directions, specified as a 1-by-3 vector. Units are in meters per second.
Example: Velocity=[17.6216 3.0288 0.0000]
AngularVelocity
— Angular velocity of actor
array
Angular velocity of actor in the x-, y-and z- directions, specified as a 1-by-3 vector. Units are in radians per second.
Example: AngularVelocity=[0.6216 0.0288 1.0000]
WheelPoses
— Runtime pose of each wheel of actor
array
Runtime pose of each wheel of actor, specified as a multidimensional 4-by-4-by-N array. N is the number of wheels of the vehicle-type actor.
WheelPoses
is set for wheels starting from the leftmost side on
the front axle, moving to the right. After the first axle is complete, the leftmost
wheel on the second axle is taken into consideration before moving to the right, and
so on
Version History
Introduced in R2022a
See Also
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
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)