Class UCameraObserver
- class UCameraObserver : public UBoxObserver
-
An observer that collects 2D observations from a camera in the environment.
sensor uses a SceneCaptureComponent2D (https://dev.epicgames.com/documentation/en-us/unreal-engine/1.7—scene-capture-2d?application_version=4.27) and a RenderTarget(https://dev.epicgames.com/documentation/en-us/unreal-engine/BlueprintAPI/RenderTarget?application_version=5.5) to capture images from the environment. To use this sensor, a SceneCaptureComponent2D and a RenderTarget must be first created in the Unreal Editor, and selected in the sensor settings.
Change the CompositeMode setting in the SceneCaptureComponent2D to choose the mode of operation of the camera (RGB, RGB-depth, depth-only).
RenderTarget setting recommendations: Advanced –> Shared = true
SceneCaptureComponent2D setting recommendations: bCaptureEveryFrame = true bRenderInMainRenderer = true CompositeMode = overwrite
Public Functions
- virtual FBoxSpace GetObservationSpace() const
-
Get the BoxSpace bounding the outputs of this sensor.
Note
This function should be implemented by any derived classes
- Returns:
-
The ObservationSpace bounding the outputs of this sensor.
- bool IsChannelUsed(USceneCaptureComponent2D *CapComponent, FName ChannelName) const
-
Determines whether the specified channel is used.
- void UpdateChannelBooleans()
-
Set bObserveChannelR, bObserveChannelG, bObserveChannelB, bObserveChannelA according to the camera mode.
- virtual void CollectObservations(FBoxPoint &OutObservations) override
-
Collect observations about the environment state.
- Parameters:
-
OutObservations – [out] A BoxPoint that will be updated with the outputs of this sensor.