Source code for isaaclab_experimental.envs.mdp.actions.actions_cfg

# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md).
# All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause

from __future__ import annotations

from dataclasses import MISSING
from typing import TYPE_CHECKING

from isaaclab.utils.configclass import configclass

from isaaclab_experimental.managers.manager_term_cfg import ActionTermCfg

if TYPE_CHECKING:
    from .joint_actions import JointEffortAction, JointPositionAction

##
# Joint actions.
##


[docs] @configclass class JointActionCfg(ActionTermCfg): """Configuration for the base joint action term. See :class:`JointAction` for more details. """ joint_names: list[str] = MISSING """List of joint names or regex expressions that the action will be mapped to.""" scale: float | dict[str, float] = 1.0 """Scale factor for the action (float or dict of regex expressions). Defaults to 1.0.""" offset: float | dict[str, float] = 0.0 """Offset factor for the action (float or dict of regex expressions). Defaults to 0.0.""" preserve_order: bool = False """Whether to preserve the order of the joint names in the action output. Defaults to False."""
[docs] @configclass class JointPositionActionCfg(JointActionCfg): """Configuration for the joint position action term. See :class:`JointPositionAction` for more details. """ class_type: type[JointPositionAction] | str = "{DIR}.joint_actions:JointPositionAction" use_default_offset: bool = True """Whether to use default joint positions configured in the articulation asset as offset. Defaults to True. If True, this flag results in overwriting the values of :attr:`offset` to the default joint positions from the articulation asset. """
[docs] @configclass class JointEffortActionCfg(JointActionCfg): """Configuration for the joint effort action term. See :class:`JointEffortAction` for more details. """ class_type: type[JointEffortAction] | str = "{DIR}.joint_actions:JointEffortAction"