unilab.envs.locomotion.common.rewards.RewardContext

class unilab.envs.locomotion.common.rewards.RewardContext[source]

Bases: object

Immutable snapshot of everything reward functions may read.

Built once per _compute_reward call. Shared functions access only the fields they need; robot-specific methods that still live on the environment class receive the same context via self.

Parameters:

Methods

__init__(info, linvel, gyro, dof_pos[, ...])

Attributes

info: dict
linvel: ndarray
gyro: ndarray
dof_pos: ndarray
num_envs: int = 0
default_angles: ndarray
tracking_sigma: float = 0.25
base_height_target: float = 0.0
base_height: ndarray
gravity: ndarray | None = None
dof_vel: ndarray | None = None
pose_weights: ndarray | None = None
joint_range: ndarray | None = None
linvel_yaw: ndarray | None = None
__init__(info, linvel, gyro, dof_pos, num_envs=0, default_angles=<factory>, tracking_sigma=0.25, base_height_target=0.0, base_height=<factory>, gravity=None, dof_vel=None, pose_weights=None, joint_range=None, linvel_yaw=None)
Parameters: