docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class RigidBodyPoseExtractor

    Utility class to track a hierarchy of RigidBodies. These are assumed to have a root node, and child nodes are connect to their parents via Joints.

    Inheritance
    object
    PoseExtractor
    RigidBodyPoseExtractor
    Inherited Members
    PoseExtractor.GetEnabledModelSpacePoses()
    PoseExtractor.GetEnabledLocalSpacePoses()
    PoseExtractor.GetEnabledModelSpaceVelocities()
    PoseExtractor.GetEnabledLocalSpaceVelocities()
    PoseExtractor.NumEnabledPoses
    PoseExtractor.NumPoses
    PoseExtractor.GetParentIndex(int)
    PoseExtractor.SetPoseEnabled(int, bool)
    PoseExtractor.IsPoseEnabled(int)
    PoseExtractor.Setup(int[])
    PoseExtractor.UpdateModelSpacePoses()
    PoseExtractor.UpdateLocalSpacePoses()
    PoseExtractor.GetNumPoseObservations(PhysicsSensorSettings)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.MLAgents.Sensors
    Assembly: Unity.ML-Agents.dll
    Syntax
    [MovedFrom("Unity.MLAgents.Extensions.Sensors")]
    public class RigidBodyPoseExtractor : PoseExtractor

    Constructors

    RigidBodyPoseExtractor(Rigidbody, GameObject, GameObject, Dictionary<Rigidbody, bool>)

    Initialize given a root RigidBody.

    Declaration
    public RigidBodyPoseExtractor(Rigidbody rootBody, GameObject rootGameObject = null, GameObject virtualRoot = null, Dictionary<Rigidbody, bool> enableBodyPoses = null)
    Parameters
    Type Name Description
    Rigidbody rootBody

    The root Rigidbody. This has no Joints on it (but other Joints may connect to it).

    GameObject rootGameObject

    Optional GameObject used to find Rigidbodies in the hierarchy.

    GameObject virtualRoot

    Optional GameObject used to determine the root of the poses, separate from the actual Rigidbodies in the hierarchy. For locomotion tasks, with ragdolls, this provides a stabilized reference frame, which can improve learning.

    Dictionary<Rigidbody, bool> enableBodyPoses

    Optional mapping of whether a body's psoe should be enabled or not.

    Methods

    GetLinearVelocityAt(int)

    Return the world space linear velocity of the i'th object.

    Declaration
    protected override Vector3 GetLinearVelocityAt(int index)
    Parameters
    Type Name Description
    int index

    The index of the pose for which to get the linear velocity.

    Returns
    Type Description
    Vector3

    The world space linear velocity at given index.

    Overrides
    PoseExtractor.GetLinearVelocityAt(int)

    GetObjectAt(int)

    Return the underlying object at the given index. This is only used for display in the inspector.

    Declaration
    protected override Object GetObjectAt(int index)
    Parameters
    Type Name Description
    int index

    The index of the object to retrieve.

    Returns
    Type Description
    Object

    The Object at given index.

    Overrides
    PoseExtractor.GetObjectAt(int)

    GetPoseAt(int)

    Return the world space Pose of the i'th object.

    Declaration
    protected override Pose GetPoseAt(int index)
    Parameters
    Type Name Description
    int index

    The index of the pose to retrieve.

    Returns
    Type Description
    Pose

    The world space Pose at given index.

    Overrides
    PoseExtractor.GetPoseAt(int)
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)