11 lines
391 B
Python
11 lines
391 B
Python
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)
|