Class IScholaSensor
Class IScholaSensor
- Defined in File SensorInterface.h
Inheritance Relationships
Derived Types
-
public UCameraSensor(Class UCameraSensor) -
public URayCastSensor(Class URayCastSensor)
class IScholaSensorSource: Source/Schola/Interactors/Public/SensorInterface.h
Interface for sensor components that collect observations from the environment.
This interface provides methods for defining the observation space and collecting observations for reinforcement learning agents. Can be implemented in both C++ and Blueprints.
Subclassed by UCameraSensor, URayCastSensor
Public Functions
| Symbol | Details |
|---|---|
InitSensor | Initialize the sensor component. |
InitSensor_Implementation | Default implementation of InitSensor (no-op). |
GetObservationSpace | Return the sensor definition (the observation space) as an instanced FSpace struct. |
GetObservationSpace_Implementation | Default C++ implementation returns an empty box space. |
CollectObservations | Collect a single observation from the sensor as an instanced FPoint struct. |
CollectObservations_Implementation | Default C++ implementation returns an empty box point. |
InitSensor
void InitSensor()Initialize the sensor component.
Called once to set up the sensor. Override this method to perform any necessary initialization such as creating render targets or validating configuration.
Source: Source/Schola/Interactors/Public/SensorInterface.h
InitSensor_Implementation
inline virtual void InitSensor_Implementation()Default implementation of InitSensor (no-op).
Attributes: inline, virtual
Source: Source/Schola/Interactors/Public/SensorInterface.h
GetObservationSpace
void GetObservationSpace(FInstancedStruct &OutObservationSpace) constReturn the sensor definition (the observation space) as an instanced FSpace struct.
This method defines the structure of observations this sensor produces. The returned space describes the dimensionality, data type, and bounds of the observation space. BlueprintNativeEvent so Blueprints can override; C++ classes can implement the _Implementation.
Parameters
OutObservationSpace – [out] The observation space definition to be populated
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | OutObservationSpace | FInstancedStruct & | The observation space definition to be populated |
Attributes: const
Source: Source/Schola/Interactors/Public/SensorInterface.h
GetObservationSpace_Implementation
inline virtual voidGetObservationSpace_Implementation(FInstancedStruct &OutObservationSpace) constDefault C++ implementation returns an empty box space.
Parameters
OutObservationSpace – [out] The observation space to be populated with default box space
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | OutObservationSpace | FInstancedStruct & | The observation space to be populated with default box space |
Attributes: inline, const, virtual
Source: Source/Schola/Interactors/Public/SensorInterface.h
CollectObservations
void CollectObservations(FInstancedStruct &OutObservations)Collect a single observation from the sensor as an instanced FPoint struct.
This method captures the current state of the environment as perceived by this sensor. The observation format must match the observation space returned by GetObservationSpace. BlueprintNativeEvent so Blueprints can override; C++ classes can implement the _Implementation.
Parameters
OutObservations – [out] The collected observation data to be populated
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | OutObservations | FInstancedStruct & | The collected observation data to be populated |
Source: Source/Schola/Interactors/Public/SensorInterface.h
CollectObservations_Implementation
inline virtual voidCollectObservations_Implementation(FInstancedStruct &OutObservations)Default C++ implementation returns an empty box point.
Parameters
OutObservations – [out] The observation data to be populated with default box point
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | OutObservations | FInstancedStruct & | The observation data to be populated with default box point |
Attributes: inline, virtual
Source: Source/Schola/Interactors/Public/SensorInterface.h
Public Static Functions
| Symbol | Details |
|---|---|
Execute_GetObservationSpace | Static helper to execute GetObservationSpace with typed parameters. |
Execute_CollectObservations | Static helper to execute CollectObservations with typed parameters. |
Execute_GetObservationSpace
static inline voidExecute_GetObservationSpace(const UObject *Obj, TInstancedStruct<FSpace> &OutObservationSpace)Static helper to execute GetObservationSpace with typed parameters.
Parameters
-
Obj – [in] The object implementing this interface
-
OutObservationSpace – [out] The observation space to be populated
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | Obj | const UObject * | The object implementing this interface |
| 2 | — | OutObservationSpace | TInstancedStruct< FSpace > & | The observation space to be populated |
Attributes: inline, static
Source: Source/Schola/Interactors/Public/SensorInterface.h
Execute_CollectObservations
static inline voidExecute_CollectObservations(UObject *Obj, TInstancedStruct<FPoint> &OutObservations)Static helper to execute CollectObservations with typed parameters.
Parameters
-
Obj – [inout] The object implementing this interface
-
OutObservations – [out] The observation data to be populated
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | Obj | UObject * | The object implementing this interface |
| 2 | — | OutObservations | TInstancedStruct< FPoint > & | The observation data to be populated |
Attributes: inline, static