主要内容

pose

R2026b

Set or get actor pose

Since R2026b

    Description

    Add-On Required: This feature requires the 3D Scenarios add-on.

    p = pose(actr) gets the pose of the specified actor.

    p = pose(actr,Name=Value) gets the pose of the specified actor using options specified by name-value arguments.

    pose(actr,p) sets the pose of the specified actor. To set the pose of an actor, the Behavior property of the actor must be empty and the SimulationStatus property of the associated Scenario object must be "notstarted".

    Input Arguments

    collapse all

    Actor, specified as an m-by-1 vector of Actor objects, where m is the number of actors.

    Pose, specified as a vector of pose objects. The velocity, acceleration, angular velocity, and angular acceleration of the pose objects must be 0. The ReferenceFrame property of the pose objects must specify the reference body as Earth.

    If you specify one pose object, then the pose applies to all the actors. If you specify multiple pose objects, then the number of poses must match the number of actors.

    Name-Value Arguments

    collapse all

    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: pose(carActr,ReferencePoint="rearviewmirror") specifies the reference point of a car actor as the rearview mirror.

    Actor reference point, specified as a string scalar, a vector of strings, a character vector, or a cell array of character vectors. When you specify a string scalar or character vector, the same reference point applies to all the actors. When you specify a vector of strings or a cell array, the number of elements must match the length of actr.

    The supported reference points depend on the Asset object in the Asset property of actr. For more information, see the ReferencePoints property of the Asset object.

    Data Types: char | string

    Target reference frame, specified as a ReferenceFrame object.

    By default, the function uses the reference frame stored in the ReferenceFrame property of the Scene object that is stored in the Scene property of the Scenario object. For information about the types of reference frames, see Specify Coordinate Conventions for 3D Scenarios.

    Output Arguments

    collapse all

    Pose, returned as an m-by-1 vector of pose objects, where m is the number of actors.

    Version History

    Introduced in R2026b