unilab.envs.locomotion.common.rewards.upright_scale¶
- unilab.envs.locomotion.common.rewards.upright_scale(gravity, num_envs)[source]¶
Scalar gate in [0, 1] from the body-up projection of gravity.
Used by quadruped rough tasks to suppress reward / penalty bookkeeping while the robot is tipping over. Returns 1.0 when the body is upright (gravity[:, 2] >= 0.7) and 0.0 when fully tipped.