isaaclab_fovi.mdp#
Manager terms for active gaze with a foveated camera.
Classes
Moves a foveated camera's gaze by bounded steps in (tilt, pan) order. |
|
Configuration of |
|
The teacher's gaze action toward a point fixed to an asset, and its validity, shape (num_envs, 3). |
Functions
|
Gaze and its velocity, in field radii and field radii per second, shape (num_envs, 4). |
Actions#
- class isaaclab_fovi.mdp.GazeAction[source]#
Bases:
ActionTermMoves 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 withingaze_limitof the optical axis. The gaze starts each episode on the optical axis, or anywhere the physical camera sees within the limit whenrandom_resetis set. Gazes are measured in the upright image frame, whichimage_rotation_degrolls 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. Withmount="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:
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.Half the retina's field of view [deg].
Dimension of the action term.
The foveated camera whose gaze the term moves.
The input/raw actions sent to the term.
The actions computed by the term after applying any processing.
Current gaze in field radii, from the camera's stored angles, shape (num_envs, 2).
Gaze velocity in field radii per second, shape (num_envs, 2).
Gaze and its velocity, in field radii and field radii per second, shape (num_envs, 4).
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).
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.
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.
- field_radius_deg#
Half the retina’s field of view [deg].
- property camera: FoveatedCamera[source]#
The foveated camera whose gaze the term moves.
- 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 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
actionsin 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:
ActionTermCfgConfiguration of
GazeAction.Attributes:
Scene name of the foveated camera whose gaze the action moves.
Change of each gaze coordinate per step at an action of 1, in field radii.
Largest distance of the gaze from the camera's optical axis, in field radii.
Whether to visualize debug information.
Clip range for the processed action (dict of regex expressions).
Start episodes at a random gaze the camera sees; otherwise on the optical axis.
"fixed"at the action's creation, or"tracked"on a moving body (Newton, OVRTX).Methods:
Reject gaze bounds that would divide by zero and unknown mounts.
- 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.
- 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.
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:
ManagerTermBaseThe 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:
Methods:
- __init__(cfg: ObservationTermCfg, env: ManagerBasedEnv)[source]#
Initialize the manager term.
- classmethod __new__(*args, **kwargs)#