Implementation:Haosulab ManiSkill ArticulationJoint
| Knowledge Sources | |
|---|---|
| Domains | Robotics, Simulation, Articulated Bodies |
| Last Updated | 2026-02-15 08:00 GMT |
Overview
Concrete tool for managing batched articulation joints across parallel simulation environments.
Description
The ArticulationJoint dataclass wraps physx.PhysxArticulationJoint objects, providing a batched interface for querying and configuring joint properties. All joints of the same type across parallel sub-scenes are restricted to having the same properties.
Key attributes:
index-- Index of this joint among all joints in the articulation.active_index-- Index among active (actuated) joints only.articulation-- Reference to the parent Articulation (None for merged views).child_link/parent_link-- References to the connected Link objects.
Key properties and methods:
type-- Joint type string ("revolute", "prismatic", "fixed", etc.).damping/friction/stiffness-- Joint dynamic properties.limits-- Joint position limits as a tensor of shape (N, 1, 2).set_drive_properties()-- Configure PD drive stiffness, damping, force limit, and mode.set_limits()-- Set joint position limits (before GPU init only).
The class factory method create() constructs the joint wrapper from raw physx joint objects and articulation references.
Usage
ArticulationJoint objects are accessed through their parent Articulation's joints, active_joints, or corresponding map attributes. They are used to configure robot joint controllers and query joint properties.
Code Reference
Source Location
- Repository: Haosulab_ManiSkill
- File: mani_skill/utils/structs/articulation_joint.py
Signature
@dataclass
class ArticulationJoint(BaseStruct[physx.PhysxArticulationJoint]):
index: torch.Tensor
active_index: torch.Tensor
articulation: Optional[Articulation] = None
child_link: Optional[Link] = None
parent_link: Optional[Link] = None
name: str = None
@classmethod
def create(
cls,
physx_joints: list[physx.PhysxArticulationJoint],
physx_articulations: list[physx.PhysxArticulation],
scene: ManiSkillScene,
scene_idxs: torch.Tensor,
joint_index: torch.Tensor,
active_joint_index: torch.Tensor = None,
) -> "ArticulationJoint": ...
def set_drive_properties(
self, stiffness: float, damping: float, force_limit: float = ..., mode: str = "force"
) -> None: ...
Import
from mani_skill.utils.structs.articulation_joint import ArticulationJoint
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| physx_joints | list[PhysxArticulationJoint] | Yes | Raw physx joint objects |
| physx_articulations | list[PhysxArticulation] | Yes | Parent articulation objects |
| joint_index | torch.Tensor | Yes | Index of this joint among all joints |
| active_joint_index | torch.Tensor | No | Index among active joints (None if fixed) |
Outputs
| Name | Type | Description |
|---|---|---|
| type | str | Joint type string ("revolute", "prismatic", "fixed", etc.) |
| limits | torch.Tensor | Joint limits of shape (N, 1, 2) with [low, high] |
| damping | float | Joint damping coefficient |
Usage Examples
Basic Usage
# Access joints from an articulation
robot = env.agent.robot
for joint in robot.active_joints:
print(f"{joint.name}: type={joint.type}, limits={joint.limits}")
# Configure drive properties for a specific joint
joint = robot.active_joints_map["joint_1"]
joint.set_drive_properties(stiffness=1000, damping=100, force_limit=100, mode="force")