unreal.PlanarPositionObservation

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

Bases: LearningAgentsObservation

An observation of a position projected onto a plane.

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_planar_position_observation(interactor, name='None', scale=100.000000, axis0=[1.000000, 0.000000, 0.000000], axis1=[0.000000, 1.000000, 0.000000]) PlanarPositionObservation

Adds a new planar position observation to the given agent interactor. The axis parameters define the plane. 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.

  • axis0 (Vector) – The forward axis of the plane.

  • axis1 (Vector) – The right axis of the plane.

Returns:

The newly created observation.

Return type:

PlanarPositionObservation

set_planar_position_observation(agent_id=-1, position, 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.

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

  • position (Vector) – The position currently being observed.

  • relative_position (Vector) – The vector Position will be offset from.

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