Add components of qfrc_passive to mjData: qfrc_{spring, damper, gravcomp, fluid}.

PiperOrigin-RevId: 576493532
Change-Id: If8eda1a2bb728fe8ab91b8004f97fc729d999ad9
This commit is contained in:
Yuval Tassa
2023-10-25 05:00:51 -07:00
committed by Copybara-Service
parent 190bfac2d6
commit a89412bb4a
8 changed files with 189 additions and 75 deletions
+29 -1
View File
@@ -4680,12 +4680,40 @@ STRUCTS: Mapping[str, StructDecl] = dict([
),
doc='C(qpos,qvel) (nv x 1)', # pylint: disable=line-too-long
),
StructFieldDecl(
name='qfrc_spring',
type=PointerType(
inner_type=ValueType(name='mjtNum'),
),
doc='passive spring force (nv x 1)', # pylint: disable=line-too-long
),
StructFieldDecl(
name='qfrc_damper',
type=PointerType(
inner_type=ValueType(name='mjtNum'),
),
doc='passive damper force (nv x 1)', # pylint: disable=line-too-long
),
StructFieldDecl(
name='qfrc_gravcomp',
type=PointerType(
inner_type=ValueType(name='mjtNum'),
),
doc='passive gravity compensation force (nv x 1)', # pylint: disable=line-too-long
),
StructFieldDecl(
name='qfrc_fluid',
type=PointerType(
inner_type=ValueType(name='mjtNum'),
),
doc='passive fluid force (nv x 1)', # pylint: disable=line-too-long
),
StructFieldDecl(
name='qfrc_passive',
type=PointerType(
inner_type=ValueType(name='mjtNum'),
),
doc='passive force (nv x 1)', # pylint: disable=line-too-long
doc='total passive force (nv x 1)', # pylint: disable=line-too-long
),
StructFieldDecl(
name='subtree_linvel',