Add Jdot correction for connect and weld constaints
Measured reduction in constraint violations before/after this change: | Model | Correction ON (Avg Viol) | Correction OFF (Avg Viol) | Reduction | | :--- | :--- | :--- | :--- | | `jdotv_connect_2d.xml` | 3.959e-4 | 1.699e-3 | **76.7%** | | `jdotv_connect_3d.xml` | 1.399e-3 | 5.493e-3 | **74.5%** | | `jdotv_weld_3d.xml` | 9.472e-3 | 1.148e-2 | **17.5%** | PiperOrigin-RevId: 899137525 Change-Id: Ic3e33764ebd64239bab916289c23d80c3da0b51b
This commit is contained in:
committed by
Copybara-Service
parent
0c337799bd
commit
412cee2059
+5
-1
@@ -29,9 +29,13 @@ General
|
||||
may unify the linear and higher-order coefficients into a single array.
|
||||
- Added :ref:`midpoint integration<geMidpoint>` for standalone free bodies in ``implicit`` and ``implicitfast``
|
||||
:ref:`integrators<geIntegrators>`. This applies the implicit midpoint rule to the rotational dynamics of free bodies
|
||||
with no children, exactly conserving kinetic energy and angular momentum in the absence of external torques. The
|
||||
with no children, conserving kinetic energy to machine precision in the absence of external torques. The
|
||||
:ref:`invdiscrete<option-flag-invdiscrete>` flag now also disables midpoint integration, providing an opt-out
|
||||
mechanism.
|
||||
- Added the centripetal/Coriolis acceleration term :math:`\dot{J}v` to the constraint solver bias for
|
||||
:ref:`connect<equality-connect>` and :ref:`weld<equality-weld>` equality constaints. This significantly improves the
|
||||
stability of constrained mechanisms like four-bar linkages. See :ref:`Dual problem<soDual>` for details.
|
||||
|
||||
- Introduced :ref:`mjpEncoder`, the counterpart to :ref:`mjpDecoder` for encoding of :ref:`mjSpec` and :ref:`mjModel`
|
||||
into :ref:`mjResource`.
|
||||
|
||||
|
||||
@@ -1296,10 +1296,13 @@ when
|
||||
|
||||
This key identity is essentially Newton's second law projected in constraint space. It is derived by moving the term
|
||||
:math:`c` in the equations of motion :eq:`eq:motion` to the right hand side, multiplying by :math:`J M^{-1}` from the
|
||||
left, adding :math:`\dot{J} v` to both sides, and substituting the above definitions of :math:`A, \au, \ac`. In terms of
|
||||
implementation, we do not actually compute the acceleration term :math:`\dot{J} v`. This is because our optimization
|
||||
problems depend on differences of constraint-space accelerations, and so this term would cancel out even if we were to
|
||||
compute it.
|
||||
left, adding :math:`\dot{J} v` to both sides, and substituting the above definitions of :math:`A, \au, \ac`. Computing
|
||||
:math:`\dot{J} v` requires differentiating the constraint Jacobian with respect to time, which is nontrivial.
|
||||
Although this term cancels in the identity :eq:`eq:identity` and so does not affect the forward-inverse comparison, its
|
||||
omission in the forward dynamics introduces a velocity-dependent bias for any constraint whose Jacobian varies with
|
||||
configuration. We compute this term for equality constraints (connect and weld) where Jacobian differentiation
|
||||
is tractable. For contacts, the term remains omitted due to the complexity of differentiating the contact frame through
|
||||
the collision pipeline.
|
||||
|
||||
Note that the quadratic term in the inverse problem is weighted by :math:`R` instead of :math:`A+R`. This is the key
|
||||
structural insight: the :math:`A` matrix cancels entirely, leaving only :math:`R` in the quadratic term. Two
|
||||
|
||||
Reference in New Issue
Block a user