unilab.envs.mdp.events.ApplyBodyImpulse¶
- class unilab.envs.mdp.events.ApplyBodyImpulse[source]¶
Bases:
ManagerTermBaseTransient random body impulses with a cooldown->trigger->sustain->expire lifecycle.
NumPy adaptation of the pinned mjlab
apply_body_impulseterm. Each environment runs an independent timer: after a sampled cooldown, a uniformly sampled world-frame wrench is staged on the selected bodies and re-staged every step for a sampled duration, then expires back into cooldown. Use withmode="step".body_point_offsetshifts the force application point in the body link frame; the resultingcross(offset_w, force)torque is added at trigger time and held for the impulse duration. Torque channels (explicittorque_rangeor an offset) require the backend’s interval body-torque capability; force-only impulses only require interval body force. Backends without the required capability fail closed at construction.- Parameters:
cfg (
EventTermCfg)env (
ManagerBasedRlEnv)
Methods
Attributes
- __call__(env, env_ids, force_range, torque_range, duration_s, cooldown_s, asset_cfg=SceneEntityCfg(name='robot', joint_names=None, joint_ids=slice(None, None, None), body_names=None, body_ids=slice(None, None, None), geom_names=None, geom_ids=slice(None, None, None), site_names=None, site_ids=slice(None, None, None), actuator_names=None, actuator_ids=slice(None, None, None), tendon_names=None, tendon_ids=slice(None, None, None), camera_names=None, camera_ids=slice(None, None, None), light_names=None, light_ids=slice(None, None, None), material_names=None, material_ids=slice(None, None, None), texture_names=None, texture_ids=slice(None, None, None), pair_names=None, pair_ids=slice(None, None, None), preserve_order=False), body_point_offset=None)[source]¶
Returns the value of the term required by the manager.