Interface IJointExtractor
Interface for generating observations from a physical joint or constraint.
Namespace: Unity.MLAgents.Sensors
Assembly: Unity.ML-Agents.dll
Syntax
[MovedFrom("Unity.MLAgents.Extensions.Sensors")]
public interface IJointExtractor
Methods
NumObservations(PhysicsSensorSettings)
Determine the number of observations that would be generated for the particular joint using the provided PhysicsSensorSettings.
Declaration
int NumObservations(PhysicsSensorSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| PhysicsSensorSettings | settings | The settings used to configure the physics sensor. |
Returns
| Type | Description |
|---|---|
| int | Number of floats that will be written. |
Write(PhysicsSensorSettings, ObservationWriter, int)
Write the observations to the ObservationWriter, starting at the specified offset.
Declaration
int Write(PhysicsSensorSettings settings, ObservationWriter writer, int offset)
Parameters
| Type | Name | Description |
|---|---|---|
| PhysicsSensorSettings | settings | The settings used to configure the physics sensor. |
| ObservationWriter | writer | The writer to which observations are written. |
| int | offset | The starting index in the writer to begin writing observations. |
Returns
| Type | Description |
|---|---|
| int | Number of floats that were written. |