@@ -628,108 +628,72 @@ def body_incoming_joint_wrench_b(self) -> ProxyArray:
628628 def body_link_jacobian_w (self ) -> ProxyArray :
629629 """Per-body geometric Jacobian referenced at each body's link origin in world frame.
630630
631- Shape is (num_instances, num_jacobi_bodies, 6, num_joints + num_base_dofs),
632- dtype = wp.float32. In torch this resolves to
633- (num_instances, num_jacobi_bodies, 6, num_joints + num_base_dofs).
634- Linear rows ``[0:3]`` [m/s for unit ``q_dot``], angular rows ``[3:6]`` [rad/s for unit
635- ``q_dot``].
631+ Shape: ``(num_instances, num_jacobi_bodies, 6, num_joints + num_base_dofs)``,
632+ dtype ``wp.float32``. Linear rows ``[0:3]`` [m/s per unit DoF velocity];
633+ angular rows ``[3:6]`` [rad/s per unit DoF velocity].
636634
637- For any generalized- velocity vector ``v`` of length ``num_joints + num_base_dofs``,
638- the returned Jacobian ``J`` satisfies:
635+ Contract: for any generalized velocity ``v`` of length
636+ ``num_joints + num_base_dofs``,
639637
640638 .. code-block:: text
641639
642640 J[:, jacobi_body_idx, 0:3, :] @ v == body_link_lin_vel_w[:, body_idx]
643641 J[:, jacobi_body_idx, 3:6, :] @ v == body_link_ang_vel_w[:, body_idx]
644642
645- Linear rows ``[0:3]`` give the velocity at the link origin (the body's USD prim transform
646- / actor frame) in world frame. Angular rows ``[3:6]`` give the body's angular velocity in
647- world frame. The contract matches :attr:`body_link_pos_w` and :attr:`body_link_lin_vel_w`.
648- For fixed-base articulations, ``jacobi_body_idx`` excludes the fixed root body and is
649- therefore ``body_idx - 1``. For floating-base articulations, ``jacobi_body_idx ==
650- body_idx``.
651-
652- Backends whose native Jacobian is expressed at the body center of mass MUST shift the
653- linear rows to the link origin before returning so the contract holds across backends.
654-
655- The DoF axis prepends :attr:`~isaaclab.assets.BaseArticulation.num_base_dofs`
656- floating-base columns ([lin_x, lin_y, lin_z, ang_x, ang_y, ang_z] in world frame —
657- 0 cols for fixed-base, 6 for floating-base), followed by the actuated-joint columns
658- in :attr:`joint_names` order. This matches the cross-library industry convention
659- (Pinocchio, Drake, MuJoCo, RBDL, OCS2, iDynTree). Consumers that index by actuated-
660- joint id should add ``num_base_dofs`` to the joint id.
643+ Conventions:
644+ * Body axis: ``jacobi_body_idx == body_idx - 1`` for fixed-base (fixed-root
645+ row excluded); ``jacobi_body_idx == body_idx`` for floating-base.
646+ * DoF axis: leading
647+ :attr:`~isaaclab.assets.BaseArticulation.num_base_dofs` floating-base
648+ columns (world-frame ``[lin_x, lin_y, lin_z, ang_x, ang_y, ang_z]``),
649+ then actuated-joint columns in :attr:`joint_names` order.
661650 """
662651 raise NotImplementedError (f"{ type (self ).__name__ } does not implement body_link_jacobian_w." )
663652
664653 @property
665654 def body_com_jacobian_w (self ) -> ProxyArray :
666655 """Per-body geometric Jacobian referenced at each body's center of mass in world frame.
667656
668- Shape is (num_instances, num_jacobi_bodies, 6, num_joints + num_base_dofs),
669- dtype = wp.float32. In torch this resolves to
670- (num_instances, num_jacobi_bodies, 6, num_joints + num_base_dofs).
671- Linear rows ``[0:3]`` [m/s for unit ``q_dot``], angular rows ``[3:6]`` [rad/s for unit
672- ``q_dot``].
657+ Same shape and indexing conventions as :attr:`body_link_jacobian_w`. Linear
658+ rows ``[0:3]`` give the velocity at the body's center of mass; angular rows
659+ ``[3:6]`` are reference-point invariant (identical to
660+ :attr:`body_link_jacobian_w`).
673661
674- For any generalized-velocity vector ``v`` of length ``num_joints + num_base_dofs``,
675- the returned Jacobian ``J`` satisfies:
662+ Contract: for any generalized velocity ``v``,
676663
677664 .. code-block:: text
678665
679666 J[:, jacobi_body_idx, 0:3, :] @ v == body_com_lin_vel_w[:, body_idx]
680667 J[:, jacobi_body_idx, 3:6, :] @ v == body_com_ang_vel_w[:, body_idx]
681-
682- Linear rows ``[0:3]`` give the velocity at the body's center of mass in world frame.
683- Angular rows ``[3:6]`` give the body's angular velocity in world frame (reference-point
684- invariant, identical to the angular rows of :attr:`body_link_jacobian_w`).
685-
686- This is the form most physics engines compute natively, since dynamics equations decouple
687- at the COM. Use :attr:`body_link_jacobian_w` for IK / OSC controllers that target the
688- link-origin pose (USD prim frame).
689-
690- DoF axis layout matches :attr:`body_link_jacobian_w`: leading
691- :attr:`~isaaclab.assets.BaseArticulation.num_base_dofs` floating-base columns,
692- followed by per-actuated-joint columns.
693668 """
694669 raise NotImplementedError (f"{ type (self ).__name__ } does not implement body_com_jacobian_w." )
695670
696671 @property
697672 def mass_matrix (self ) -> ProxyArray :
698- """Per-env generalized mass matrix in joint space.
699-
700- Shape is (num_instances, num_joints + num_base_dofs, num_joints + num_base_dofs),
701- dtype = wp.float32 [kg·m² or kg, depending on joint type]. In torch this resolves to
702- (num_instances, num_joints + num_base_dofs, num_joints + num_base_dofs).
673+ """Per-env generalized mass matrix ``M(q)`` in joint space.
703674
704- Returns the symmetric positive-definite inertia matrix ``M(q)`` of the articulation in
705- its generalized joint coordinates. ``M[i, j]`` is the coefficient relating DoF ``j``'s
706- acceleration to the inertial torque on DoF ``i`` in the equation of motion
707- ``M(q) q_ddot + C(q, q_dot) q_dot + g(q) = tau``. The matrix is reference-point
708- invariant — joint-space dynamics do not depend on whether body velocities are measured
709- at the COM or link origin.
675+ Shape: ``(num_instances, num_joints + num_base_dofs, num_joints + num_base_dofs)``,
676+ dtype ``wp.float32`` [kg·m² or kg, per DoF type]. DoF-axis convention matches
677+ :attr:`body_link_jacobian_w`.
710678
711- The DoF axis matches :attr:`body_link_jacobian_w`: leading
712- :attr:`~isaaclab.assets.BaseArticulation.num_base_dofs` floating-base rows/cols,
713- followed by per-actuated-joint rows/cols .
679+ ``M(q)`` is symmetric positive-definite. ``M[i, j]`` is the coefficient
680+ relating DoF ``j``'s acceleration to the inertial torque on DoF ``i`` in
681+ ``M(q) q_ddot + C(q, q_dot) q_dot + g(q) = tau`` .
714682 """
715683 raise NotImplementedError (f"{ type (self ).__name__ } does not implement mass_matrix." )
716684
717685 @property
718686 def gravity_compensation_forces (self ) -> ProxyArray :
719- """Per-env gravity compensation torques in joint space.
687+ """Per-env gravity compensation torques ``g(q)`` in joint space.
720688
721- Shape is (num_instances, num_joints + num_base_dofs), dtype = wp.float32
722- [N·m or N, depending on joint type]. In torch this resolves to
723- (num_instances, num_joints + num_base_dofs) .
689+ Shape: `` (num_instances, num_joints + num_base_dofs)`` , dtype `` wp.float32``
690+ [N·m or N, per DoF type]. DoF-axis convention matches
691+ :attr:`body_link_jacobian_w` .
724692
725- Returns ``g(q)`` — the joint-space gravity-loading term in the equation of motion
693+ ``g(q)`` is the gravity-loading term in
726694 ``M(q) q_ddot + C(q, q_dot) q_dot + g(q) = tau``. Applying ``tau = g(q)`` at
727- ``q_dot = 0`` with no external load yields ``q_ddot = 0`` (static equilibrium under
728- gravity).
729-
730- The DoF axis matches :attr:`body_link_jacobian_w`: leading
731- :attr:`~isaaclab.assets.BaseArticulation.num_base_dofs` floating-base entries,
732- followed by per-actuated-joint entries.
695+ ``q_dot = 0`` with no external load yields ``q_ddot = 0`` (static equilibrium
696+ under gravity).
733697 """
734698 raise NotImplementedError (f"{ type (self ).__name__ } does not implement gravity_compensation_forces." )
735699
0 commit comments