cmvr_ai_lab/source/engineai_lab/tasks/velocity/mdp/terminations.py

11 lines
391 B
Python
Raw Normal View History

2026-07-13 10:52:46 +08:00
from __future__ import annotations
import torch
from isaaclab.envs import mdp
from isaaclab.managers import SceneEntityCfg
def illegal_contact(env, threshold: float, sensor_cfg: SceneEntityCfg) -> torch.Tensor:
"""Terminate on illegal contacts and return the mask on the RL env device."""
return mdp.illegal_contact(env, threshold=threshold, sensor_cfg=sensor_cfg).to(env.device)