Source code for isaaclab.controllers.pink_ik.pink_task_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
"""Task configuration objects for Pink IK."""
from __future__ import annotations
from dataclasses import MISSING, field
from typing import Any
from isaaclab.utils.configclass import configclass
[docs]
@configclass
class PinkIKTaskCfg:
"""Base task specification for deferred runtime construction.
All Pink IK task configs inherit from this class. The :attr:`class_type`
attribute is resolved at runtime to instantiate the concrete task object.
"""
class_type: str | type | None = None
"""Task builder as ``"module.path:callable"`` or callable object."""
[docs]
@configclass
class DampingTaskCfg(PinkIKTaskCfg):
"""Configuration for a :class:`~isaaclab.controllers.pink_ik.pink_tasks.DampingTask`.
Adds joint-velocity damping to the IK problem for numerical stability.
"""
cost: Any = MISSING
"""Scalar cost weight penalising joint velocities."""
class_type: str | type | None = "{DIR}.pink_tasks:DampingTask"
"""Default builder pointing to :class:`DampingTask`."""
[docs]
@configclass
class NullSpacePostureTaskCfg(PinkIKTaskCfg):
"""Configuration for a :class:`~isaaclab.controllers.pink_ik.null_space_posture_task.NullSpacePostureTask`.
Regularises the IK solution toward a preferred joint posture in the
null-space of the primary tasks.
"""
cost: Any = MISSING
"""Scalar cost weight for the posture regularisation term."""
lm_damping: float = 0.0
"""Levenberg-Marquardt damping for numerical stability."""
gain: float = 1.0
"""Task gain that scales the overall task contribution."""
controlled_frames: list[str] = field(default_factory=list)
"""Robot frames whose joints are included in the posture task."""
controlled_joints: list[str] = field(default_factory=list)
"""Explicit list of joint names to include (overrides frame-based selection when non-empty)."""
class_type: str | type | None = "{DIR}.null_space_posture_task:NullSpacePostureTask"
"""Default builder pointing to :class:`NullSpacePostureTask`."""