Observation Functors#
This page lists all available observation functors that can be used with the Observation Manager. Observation functors are configured using ObservationCfg and can operate in two modes: modify (update existing observations) or add (add new observations).
Pose Computations#
Functor Name |
Description |
|---|---|
|
Get world poses of rigid objects. Returns 4x4 transformation matrices of shape (num_envs, 4, 4). If the object doesn’t exist, returns a zero tensor. |
|
Transform sensor poses to robot coordinate frame. Returns pose as [x, y, z, qw, qx, qy, qz] of shape (num_envs, 7). |
Sensor Information#
Functor Name |
Description |
|---|---|
|
Get the intrinsic matrix of a camera sensor. Returns 3x3 intrinsic matrices of shape (num_envs, 3, 3). For stereo cameras, supports selecting left or right camera intrinsics. |
|
Compute semantic masks from camera segmentation masks. Returns masks of shape (num_envs, height, width, 3) with channels for robot, background, and foreground objects. |
Keypoint Projections#
Functor Name |
Description |
|---|---|
|
Project 3D keypoints (affordance poses, robot parts) onto camera image planes. Supports multiple sources: affordance poses from objects (e.g., grasp poses, place poses) and robot control part poses (e.g., end-effector positions). Returns normalized 2D coordinates. Implemented as a Functor class. |
Normalization#
Functor Name |
Description |
|---|---|
|
Normalize joint positions or velocities to [0, 1] range based on joint limits. Supports both |
Note
To get robot end-effector poses, you can use the robot’s compute_fk() method directly in your observation functors or task code.
Usage Example#
from embodichain.lab.gym.envs.managers.cfg import ObservationCfg, SceneEntityCfg
# Example: Add object pose to observations
observations = {
"object_pose": ObservationCfg(
func="get_rigid_object_pose",
mode="add",
name="object/cube/pose",
params={
"entity_cfg": SceneEntityCfg(uid="cube"),
},
),
# Example: Normalize joint positions
"normalized_qpos": ObservationCfg(
func="normalize_robot_joint_data",
mode="modify",
name="robot/qpos",
params={
"joint_ids": list(range(7)), # First 7 joints
"limit": "qpos_limits",
},
),
}