Skip to content

Commit a650501

Browse files
yuvaltassacopybara-github
authored andcommitted
Make tendon sidesite select the homotopy class of the path through the side site.
PiperOrigin-RevId: 1010128817 Change-Id: I27ebdc0c1acac072bc562cf2a14743b28fb3668a
1 parent fffe659 commit a650501

15 files changed

Lines changed: 790 additions & 60 deletions

File tree

‎doc/XMLreference.rst‎

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5727,9 +5727,27 @@ constrained to pass through the geom instead of passing around it.
57275727

57285728
:at:`sidesite`: :at-val:`string, optional`
57295729
To prevent the tendon path from snapping from one side of the geom to the other as the model configuration varies,
5730-
the user can define a preferred "side" of the geom. At runtime, the wrap that is closer to the specified site is
5731-
automatically selected. Specifying a side site is often needed in practice. If the side site is inside the geom, the
5732-
tendon is constrained to pass through the interior of the geom.
5730+
the user can define a preferred "side" of the geom. The tendon then goes around the geom the same way as the path
5731+
from the first endpoint :math:`p_1`, through the side site :math:`s` (projected onto the surface of the geom), to the
5732+
second endpoint :math:`p_2`. If the straight segment between the endpoints already passes the geom that way, the
5733+
tendon does not wrap. Formally, the tendon is the shortest path from :math:`p_1` to :math:`p_2` that is homotopic to
5734+
the polyline :math:`p_1 \to s \to p_2` in the wrapping plane with the geom removed, i.e., that has the same winding
5735+
angle around the geom center. In the images below, the side site is green and the polyline is the thin grey line.
5736+
5737+
.. image:: images/XMLreference/sidesite_homotopy_light.svg
5738+
:align: center
5739+
:width: 90%
5740+
:class: only-light
5741+
5742+
.. image:: images/XMLreference/sidesite_homotopy_dark.svg
5743+
:align: center
5744+
:width: 90%
5745+
:class: only-dark
5746+
5747+
The tendon snaps off the geom when an endpoint crosses the ray opposite the side site, so side sites should be placed
5748+
such that the endpoints do not cross this ray over the range of motion, typically near the middle of the wrapped
5749+
arc. Specifying a side site is often needed in practice. If the side site is inside the geom, the tendon is
5750+
constrained to pass through the interior of the geom.
57335751

57345752

57355753
.. _spatial-pulley:

‎doc/changelog.rst‎

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,46 @@ General
7979

8080
Engine
8181
^^^^^^
82+
.. admonition:: Breaking changes
83+
:class: attention
84+
85+
- Changed the semantics of :ref:`sidesite<spatial-geom-sidesite>`: the tendon now goes around the geom the same way
86+
as the path from the first endpoint, through the side site, to the second endpoint (thin grey line below).
87+
Formally, the tendon is the shortest path homotopic to this polyline in the wrapping plane with the geom removed.
88+
89+
.. image:: images/XMLreference/sidesite_homotopy_light.svg
90+
:align: center
91+
:width: 90%
92+
:class: only-light
93+
94+
.. image:: images/XMLreference/sidesite_homotopy_dark.svg
95+
:align: center
96+
:width: 90%
97+
:class: only-dark
98+
99+
Previously, a half-plane test was used, which could make the tendon jump onto the geom, a discontinuity in tendon
100+
length, when the segment between the endpoints moved away from the side site while clear of the geom. It could
101+
also select the wrong side for wraps longer than 180 degrees. Top row: old rule; bottom row: new rule.
102+
103+
.. image:: images/changelog/sidesite_old_vs_new_light.svg
104+
:align: center
105+
:width: 90%
106+
:class: only-light
107+
108+
.. image:: images/changelog/sidesite_old_vs_new_dark.svg
109+
:align: center
110+
:width: 90%
111+
:class: only-dark
112+
113+
The new rule has a single discontinuity: when an endpoint crosses the ray opposite the side site, the path
114+
through the side site changes its winding around the geom and the tendon snaps off. This can change the behavior
115+
of existing models.
116+
117+
**Migration:** Place side sites so that the endpoints do not cross this ray over the range of motion, typically
118+
near the middle of the wrapped arc. For example, the side sites of the
119+
`two-link arm <https://github.com/google-deepmind/mujoco/blob/main/model/tendon_arm/arm26.xml>`__ were moved from
120+
directly below the joints to 45 degrees below the arm, which reproduces the previous tendon lengths exactly.
121+
82122
- Flex improvements:
83123

84124
- Volumetric interpolated flexes (**trilinear** or **quadratic** :ref:`dofs<body-flexcomp-dof>` with ``elastic2d="none"``)
Lines changed: 29 additions & 0 deletions
Loading
Lines changed: 29 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)
⌂ 换网址