Added mjData.eq_active user input variable, for enabling/disabling the state of equality constraints.

Renamed `mjModel.eq_active` to `mjModel.eq_active0`, which now has the semantic of "initial value of `mjData.eq_active`".

Fixes #876.

PiperOrigin-RevId: 570410643
Change-Id: Id03171e751377c7cc453f143abee64239ee2e2ed
This commit is contained in:
Yuval Tassa
2023-10-03 09:29:45 -07:00
committed by Copybara-Service
parent 177aec68dc
commit ee78b8f76b
19 changed files with 180 additions and 72 deletions
+16 -9
View File
@@ -2565,11 +2565,11 @@ STRUCTS: Mapping[str, StructDecl] = dict([
doc='id of object 2 (neq x 1)',
),
StructFieldDecl(
name='eq_active',
name='eq_active0',
type=PointerType(
inner_type=ValueType(name='mjtByte'),
),
doc='enable/disable constraint (neq x 1)',
doc='initial enable/disable constraint state (neq x 1)',
),
StructFieldDecl(
name='eq_solref',
@@ -3826,6 +3826,13 @@ STRUCTS: Mapping[str, StructDecl] = dict([
),
doc='applied Cartesian force/torque (nbody x 6)', # pylint: disable=line-too-long
),
StructFieldDecl(
name='eq_active',
type=PointerType(
inner_type=ValueType(name='mjtByte'),
),
doc='enable/disable constraints (neq x 1)', # pylint: disable=line-too-long
),
StructFieldDecl(
name='mocap_pos',
type=PointerType(
@@ -6226,13 +6233,6 @@ STRUCTS: Mapping[str, StructDecl] = dict([
),
doc='',
),
StructFieldDecl(
name='eq_active',
type=PointerType(
inner_type=ValueType(name='mjtByte'),
),
doc='',
),
StructFieldDecl(
name='eq_data',
type=PointerType(
@@ -6549,6 +6549,13 @@ STRUCTS: Mapping[str, StructDecl] = dict([
),
doc='',
),
StructFieldDecl(
name='eq_active',
type=PointerType(
inner_type=ValueType(name='mjtByte'),
),
doc='',
),
StructFieldDecl(
name='sensordata',
type=PointerType(