Monty.Frameworks.Models.SensorModules.SnapshotTelemetry (ExTbpMonty.Core v0.1.0)

Copy Markdown View Source

Keeps the raw observations a sensor saw, and where it was when it saw them.

Mirrors tbp/monty/frameworks/models/sensor_modules.py::SnapshotTelemetry. Only a sensor configured with save_raw_obs: true fills it. What it is for is looking back at the very pixels a percept was computed from — a graph of features is not enough to tell a bad estimate from a bad view — so the observation is kept as it arrived rather than as it was summarised.

The observations are held newest first, which is how a list is cheapest to grow in; state_dict/1 hands them back in the order they were taken, one pose per observation, as Monty's does.

Summary

Types

The sensor's pose when it took one observation: wxyz, then metres.

t()

Functions

Records one raw observation and the sensor's pose when it took it.

Forgets everything, for a new episode.

What was recorded, oldest first, as Monty's state_dict reports it.

Types

pose()

@type pose() :: %{sm_rotation: [float()], sm_location: [float()]}

The sensor's pose when it took one observation: wxyz, then metres.

t()

@type t() :: %Monty.Frameworks.Models.SensorModules.SnapshotTelemetry{
  poses: [pose()],
  raw_observations: [map()]
}

Functions

new()

@spec new() :: t()

raw_observation(telemetry, observation, rotation, position)

@spec raw_observation(t(), map(), Monty.Geometry.Rotation.t(), [float()]) :: t()

Records one raw observation and the sensor's pose when it took it.

Both lists grow together, which is the invariant state_dict/1 relies on.

reset(snapshot_telemetry)

@spec reset(t()) :: t()

Forgets everything, for a new episode.

state_dict(telemetry)

@spec state_dict(t()) :: %{raw_observations: [map()], sm_properties: [pose()]}

What was recorded, oldest first, as Monty's state_dict reports it.