unreal.ScalarPositionObservation¶
- class unreal.ScalarPositionObservation(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
LearningAgentsObservationAn observation of a position along a single axis. Can be useful for providing information like object heights.
C++ Source:
Plugin: LearningAgents
Module: LearningAgents
File: LearningAgentsObservations.h
Editor Properties: (see get_editor_property/set_editor_property)
interactor(LearningAgentsInteractor): [Read-Only] Reference to the Interactor this observation is associated with.
- classmethod add_scalar_position_observation(interactor, name='None', scale=100.000000) ScalarPositionObservation¶
Adds a new scalar position observation to the given agent interactor. Call during ULearningAgentsInteractor::SetupObservations event.
- Parameters:
interactor (LearningAgentsInteractor) – The agent interactor to add this observation to.
name (Name) – The name of this new observation. Used for debugging.
scale (float) – Used to normalize the data for the observation.
- Returns:
The newly created observation.
- Return type:
- set_scalar_position_observation(agent_id=-1, position, relative_position=0.000000) None¶
Sets the data for this observation. The relative position can be used to make this observation relative to the agent’s perspective, e.g. by passing the agent’s position. Call during ULearningAgentsInteractor::SetObservations event.
- set_scalar_position_observation_with_axis(agent_id=-1, position, relative_position=[0.000000, 0.000000, 0.000000], axis=[0.000000, 0.000000, 1.000000]) None¶
Sets the data for this observation. The relative position can be used to make this observation relative to the agent’s perspective, e.g. by passing the agent’s position. Call during ULearningAgentsInteractor::SetObservations event.