unreal.PositionArrayObservation
¶
- class unreal.PositionArrayObservation(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
LearningAgentsObservation
An observation of an array of positions.
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_position_array_observation(interactor, name='None', position_num=1, scale=100.000000) PositionArrayObservation ¶
Adds a new position array 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.
position_num (int32) – The number of positions in the array.
scale (float) – Used to normalize the data for the observation.
- Returns:
The newly created observation.
- Return type:
- set_position_array_observation(agent_id=-1, positions, relative_position=[0.000000, 0.000000, 0.000000], relative_rotation=[0.000000, 0.000000, 0.000000]) None ¶
Sets the data for this observation. The relative position & rotation can be used to make this observation relative to the agent’s perspective, e.g. by passing the agent’s position & forward rotation. Call during ULearningAgentsInteractor::SetObservations event.