isaaclab_fovi.mdp#

Manager terms for active gaze with a foveated camera.

Classes

GazeAction

Moves a foveated camera's gaze by bounded steps in (tilt, pan) order.

GazeActionCfg

Configuration of GazeAction.

gaze_teacher_labels

The teacher's gaze action toward a point fixed to an asset, and its validity, shape (num_envs, 3).

Functions

gaze_state(env[, action_name])

Gaze and its velocity, in field radii and field radii per second, shape (num_envs, 4).

Actions#

class isaaclab_fovi.mdp.GazeAction[source]#

Bases: ActionTerm

Moves a foveated camera’s gaze by bounded steps in (tilt, pan) order.

Actions, the limit and the observed gaze are in field radii. An action of 1 changes a coordinate by step_size, and the gaze stays within gaze_limit of the optical axis. The gaze starts each episode on the optical axis, or anywhere the physical camera sees within the limit when random_reset is set. Gazes are measured in the upright image frame, which image_rotation_deg rolls against a rolled mount.

With mount="fixed" the camera keeps the orientation it had when the term was created, and the teacher uses that mount; turning the camera’s mount afterwards raises. With mount="tracked" the camera may ride a moving body, for example a robot’s head, and the teacher reads each camera’s current mount, so software gaze adds to hardware gaze.

The camera’s stored gaze angles own the gaze: each step and the teacher start from them, so a gaze set directly with set_gaze_angles() carries on. state, the observation, is the gaze and velocity as of the last step or reset.

Attributes:

is_graphable

The gaze moves in process_actions(), once per environment step; apply_actions() does nothing, so physics may record the other terms' actions and its decimation loop into a CUDA graph.

field_radius_deg

Half the retina's field of view [deg].

action_dim

Dimension of the action term.

camera

The foveated camera whose gaze the term moves.

raw_actions

The input/raw actions sent to the term.

processed_actions

The actions computed by the term after applying any processing.

gaze

Current gaze in field radii, from the camera's stored angles, shape (num_envs, 2).

velocity

Gaze velocity in field radii per second, shape (num_envs, 2).

state

Gaze and its velocity, in field radii and field radii per second, shape (num_envs, 4).

angles_deg

Current gaze angles [deg], the camera's stored ones, shape (num_envs, 2).

Methods:

__init__(cfg, env)

Initialize the action term.

process_actions(actions)

Move the gaze by the supplied actions, shape (num_envs, 2).

apply_actions()

Applies the actions to the asset managed by the term.

reset([env_ids])

Resets the manager term.

visible(direction)

Whether directions in the upright gaze frame fall inside the physical camera's image.

teacher_mounts()

Each camera's mount (x, y, z, w), ROS convention, that the teacher aims from: the current one when tracked, else the one captured when the term was created.

is_graphable: ClassVar[bool] = True#

The gaze moves in process_actions(), once per environment step; apply_actions() does nothing, so physics may record the other terms’ actions and its decimation loop into a CUDA graph.

__init__(cfg: GazeActionCfg, env: ManagerBasedEnv)[source]#

Initialize the action term.

Parameters:
  • cfg – The configuration object.

  • env – The environment instance.

field_radius_deg#

Half the retina’s field of view [deg].

property action_dim: int[source]#

Dimension of the action term.

property camera: FoveatedCamera[source]#

The foveated camera whose gaze the term moves.

property raw_actions: Tensor[source]#

The input/raw actions sent to the term.

property processed_actions: Tensor[source]#

The actions computed by the term after applying any processing.

Terms that support graph capture update this tensor in place, so a held reference sees later commands.

property gaze: Tensor[source]#

Current gaze in field radii, from the camera’s stored angles, shape (num_envs, 2).

property velocity: Tensor[source]#

Gaze velocity in field radii per second, shape (num_envs, 2).

property state: Tensor[source]#

Gaze and its velocity, in field radii and field radii per second, shape (num_envs, 4).

property angles_deg: Tensor[source]#

Current gaze angles [deg], the camera’s stored ones, shape (num_envs, 2).

process_actions(actions: Tensor)[source]#

Move the gaze by the supplied actions, shape (num_envs, 2).

The launch reads actions in place. The action manager hands the term the same slice of its buffer each step, so the launch is recorded once; another buffer records a launch that reads it.

apply_actions()[source]#

Applies the actions to the asset managed by the term.

Note

This is called at every simulation step by the manager.

reset(env_ids=None)[source]#

Resets the manager term.

Parameters:

env_ids – The environment ids. Defaults to None, in which case all environments are considered.

visible(direction: Tensor) → Tensor[source]#

Whether directions in the upright gaze frame fall inside the physical camera’s image.

teacher_mounts() → ProxyArray[source]#

Each camera’s mount (x, y, z, w), ROS convention, that the teacher aims from: the current one when tracked, else the one captured when the term was created.

Raises:

RuntimeError – The camera’s mount turned while the gaze assumes a fixed mount.

class isaaclab_fovi.mdp.GazeActionCfg[source]#

Bases: ActionTermCfg

Configuration of GazeAction.

Attributes:

asset_name

Scene name of the foveated camera whose gaze the action moves.

step_size

Change of each gaze coordinate per step at an action of 1, in field radii.

gaze_limit

Largest distance of the gaze from the camera's optical axis, in field radii.

debug_vis

Whether to visualize debug information.

clip

Clip range for the processed action (dict of regex expressions).

random_reset

Start episodes at a random gaze the camera sees; otherwise on the optical axis.

mount

"fixed" at the action's creation, or "tracked" on a moving body (Newton, OVRTX).

Methods:

validate_config()

Reject gaze bounds that would divide by zero and unknown mounts.

asset_name: str#

Scene name of the foveated camera whose gaze the action moves.

step_size: float#

Change of each gaze coordinate per step at an action of 1, in field radii. Positive and finite.

gaze_limit: float#

Largest distance of the gaze from the camera’s optical axis, in field radii. Positive and finite.

debug_vis: bool#

Whether to visualize debug information. Defaults to False.

clip: dict[str, tuple] | None#

Clip range for the processed action (dict of regex expressions). Defaults to None.

The keys are matched against the joint names for joint action terms and against the action names (action_names) for task-space and non-holonomic action terms.

random_reset: bool#

Start episodes at a random gaze the camera sees; otherwise on the optical axis.

mount: str#

"fixed" at the action’s creation, or "tracked" on a moving body (Newton, OVRTX).

Type:

Teacher’s mount

validate_config()[source]#

Reject gaze bounds that would divide by zero and unknown mounts.

Observations#

isaaclab_fovi.mdp.gaze_state(env: ManagerBasedEnv, action_name: str = 'gaze') → torch.Tensor[source]#

Gaze and its velocity, in field radii and field radii per second, shape (num_envs, 4).

class isaaclab_fovi.mdp.gaze_teacher_labels[source]#

Bases: ManagerTermBase

The teacher’s gaze action toward a point fixed to an asset, and its validity, shape (num_envs, 3).

A training label, never a policy input. One launch labels every environment and logs the mean gaze error to valid targets and the fraction of valid targets.

Parameters:
  • target_cfg – The asset, and optionally one body by body_names.

  • offset – The point in the root’s or the body’s frame [m].

  • action_name – The gaze action term.

Methods:

__init__(cfg, env)

Initialize the manager term.

__new__(*args, **kwargs)

__init__(cfg: ObservationTermCfg, env: ManagerBasedEnv)[source]#

Initialize the manager term.

Parameters:
  • cfg – The configuration object.

  • env – The environment instance.

classmethod __new__(*args, **kwargs)#