Add geom surfacevel: zero-dof conveyors, treadmills and turntables.

https://www.youtube.com/watch?v=PdSdrqhSiZA

The new geom attribute surfacevel (6 numbers: linear and angular velocity in the geom's local frame, angular about the geom frame origin) specifies the velocity of the geom's surface material relative to the geom frame. The relative surface velocity of the two geoms is added to the tangential contact rows of efc_vel in mj_referenceConstraint, so friction drives touching bodies toward the motion of the surface: objects on a conveyor are transported at belt speed, turntables impart omega x r with torsional spin-up for condim >= 4, and surface velocities compose with each other and with body motion. The component along the contact normal is projected out: probe experiments showed that velocity-space emission chatters mass-independently and ingestion merely deepens penetration; normal-direction effects belong to force-space features.

surfacevel is interpreted in the geom frame as authored: for mesh geoms, whose compiled frame absorbs the mesh centering and principal-axes transform, the compiler re-expresses the authored value in the compiled frame.

No special interaction with sleeping: objects being transported do not fall asleep because they are moving; objects at rest on an active surface may sleep like any other resting object.

Includes showcase models (model/surfacevel/): a luggage carousel whose ring is a spinning square-profile supertorus fed by a cascade of belts with matched spinning end rollers, bags dropping in and circulating indefinitely; and a treadmill with a passive humanoid.

PiperOrigin-RevId: 948647785
Change-Id: I0c6559a91cc7ece1237eb8ac2e51986e7342d962
This commit is contained in:
Yuval Tassa
2026-07-15 17:57:28 -07:00
committed by Copybara-Service
parent 97eb1e5d0c
commit 4787c8094c
32 changed files with 781 additions and 11 deletions
+21
View File
@@ -1368,6 +1368,11 @@ STRUCTS: Mapping[str, StructDecl] = dict([
type=ValueType(name='mjtSize'),
doc='number of bodies with nonzero gravcomp',
),
StructFieldDecl(
name='nsurfacevel',
type=ValueType(name='mjtSize'),
doc='number of geoms with nonzero surfacevel',
),
StructFieldDecl(
name='nemax',
type=ValueType(name='mjtSize'),
@@ -2245,6 +2250,14 @@ STRUCTS: Mapping[str, StructDecl] = dict([
doc='additional contact detection buffer',
array_extent=('ngeom',),
),
StructFieldDecl(
name='geom_surfacevel',
type=PointerType(
inner_type=ValueType(name='mjtNum'),
),
doc='surface velocity in local frame: lin,ang',
array_extent=('ngeom', 6),
),
StructFieldDecl(
name='geom_fluid',
type=PointerType(
@@ -7957,6 +7970,14 @@ STRUCTS: Mapping[str, StructDecl] = dict([
type=ValueType(name='double'),
doc='additional contact detection buffer',
),
StructFieldDecl(
name='surfacevel',
type=ArrayType(
inner_type=ValueType(name='double'),
extents=(6,),
),
doc='surface velocity in local frame: linear, angular',
),
StructFieldDecl(
name='mass',
type=ValueType(name='double'),