unreal.RotationArrayObservation

class unreal.RotationArrayObservation(outer: Object | None = None, name: Name | str = 'None')

Bases: LearningAgentsObservation

An observation of an array of rotations.

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_rotation_array_observation(interactor, name='None', rotation_num=1, scale=1.000000) RotationArrayObservation

Adds a new rotation 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.

  • rotation_num (int32) – The number of rotations in the array

  • scale (float) – Used to normalize the data for the observation. Rotation observations are encoded as directions.

Returns:

The newly created observation.

Return type:

RotationArrayObservation

set_rotation_array_observation(agent_id=-1, rotations, relative_rotation=[0.000000, 0.000000, 0.000000]) None

Sets the data for this observation. Call during ULearningAgentsInteractor::SetObservations event.

Parameters:
  • agent_id (int32) – The agent id this data corresponds to.

  • rotations (Array[Rotator]) – The rotations currently being observed.

  • relative_rotation (Rotator) – The frame of reference rotation.

set_rotation_array_observation_from_quats(agent_id=-1, rotations, relative_rotation) None

Sets the data for this observation. Call during ULearningAgentsInteractor::SetObservations event.

Parameters:
  • agent_id (int32) – The agent id this data corresponds to.

  • rotations (Array[Quat]) – The rotations currently being observed.

  • relative_rotation (Quat) – The frame of reference rotation.