Skip to content

Class IScholaSensor

Class IScholaSensor

  • Defined in File SensorInterface.h

Inheritance Relationships

Derived Types

class IScholaSensor

Source: Source/Schola/Interactors/Public/SensorInterface.h

Dependencies: FPoint, FSpace

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

SymbolDetails
InitSensorInitialize the sensor component.
InitSensor_ImplementationDefault implementation of InitSensor (no-op).
GetObservationSpaceReturn the sensor definition (the observation space) as an instanced FSpace struct.
GetObservationSpace_ImplementationDefault C++ implementation returns an empty box space.
CollectObservationsCollect a single observation from the sensor as an instanced FPoint struct.
CollectObservations_ImplementationDefault 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) const

Return 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

#DirectionNameTypeDescription
1OutObservationSpaceFInstancedStruct &The observation space definition to be populated

Attributes: const

Source: Source/Schola/Interactors/Public/SensorInterface.h

GetObservationSpace_Implementation

inline virtual void
GetObservationSpace_Implementation(FInstancedStruct &OutObservationSpace) const

Default C++ implementation returns an empty box space.

Parameters

OutObservationSpace – [out] The observation space to be populated with default box space

#DirectionNameTypeDescription
1OutObservationSpaceFInstancedStruct &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

#DirectionNameTypeDescription
1OutObservationsFInstancedStruct &The collected observation data to be populated

Source: Source/Schola/Interactors/Public/SensorInterface.h

CollectObservations_Implementation

inline virtual void
CollectObservations_Implementation(FInstancedStruct &OutObservations)

Default C++ implementation returns an empty box point.

Parameters

OutObservations – [out] The observation data to be populated with default box point

#DirectionNameTypeDescription
1OutObservationsFInstancedStruct &The observation data to be populated with default box point

Attributes: inline, virtual

Source: Source/Schola/Interactors/Public/SensorInterface.h


Public Static Functions

SymbolDetails
Execute_GetObservationSpaceStatic helper to execute GetObservationSpace with typed parameters.
Execute_CollectObservationsStatic helper to execute CollectObservations with typed parameters.

Execute_GetObservationSpace

static inline void
Execute_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

#DirectionNameTypeDescription
1Objconst UObject *The object implementing this interface
2OutObservationSpaceTInstancedStruct< FSpace > &The observation space to be populated

Attributes: inline, static

Source: Source/Schola/Interactors/Public/SensorInterface.h

Execute_CollectObservations

static inline void
Execute_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

#DirectionNameTypeDescription
1ObjUObject *The object implementing this interface
2OutObservationsTInstancedStruct< FPoint > &The observation data to be populated

Attributes: inline, static

Source: Source/Schola/Interactors/Public/SensorInterface.h