docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class RigidBodyJointExtractor

    Extracts joint and rigidbody information for physics-based sensors.

    Inheritance
    object
    RigidBodyJointExtractor
    Implements
    IJointExtractor
    Inherited Members
    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 RigidBodyJointExtractor : IJointExtractor

    Constructors

    RigidBodyJointExtractor(Rigidbody)

    Initializes a new instance of the RigidBodyJointExtractor class.

    Declaration
    public RigidBodyJointExtractor(Rigidbody body)
    Parameters
    Type Name Description
    Rigidbody body

    The Rigidbody to extract joint information from.

    Methods

    NumObservations(PhysicsSensorSettings)

    Gets the number of observations for this joint extractor using the provided settings.

    Declaration
    public int NumObservations(PhysicsSensorSettings settings)
    Parameters
    Type Name Description
    PhysicsSensorSettings settings

    The physics sensor settings.

    Returns
    Type Description
    int

    The number of observations for this joint extractor.

    NumObservations(Rigidbody, Joint, PhysicsSensorSettings)

    Gets the number of observations for the specified rigidbody and joint using the provided settings.

    Declaration
    public static int NumObservations(Rigidbody body, Joint joint, PhysicsSensorSettings settings)
    Parameters
    Type Name Description
    Rigidbody body

    The Rigidbody to extract from.

    Joint joint

    The Joint to extract from.

    PhysicsSensorSettings settings

    The physics sensor settings.

    Returns
    Type Description
    int

    The number of observations for the specified rigidbody and joint.

    Write(PhysicsSensorSettings, ObservationWriter, int)

    Writes the joint observations to the provided writer using the given settings.

    Declaration
    public int Write(PhysicsSensorSettings settings, ObservationWriter writer, int offset)
    Parameters
    Type Name Description
    PhysicsSensorSettings settings

    The physics sensor settings.

    ObservationWriter writer

    The observation writer.

    int offset

    The offset in the writer to start writing at.

    Returns
    Type Description
    int

    The number of floats written to the writer.

    Implements

    IJointExtractor
    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)