Fix field ordering in mjModel.

`nnames_map` is not required for `mjModel` construction, it is set during construction.

PiperOrigin-RevId: 696462793
Change-Id: Ie722e2a04d7fd7ed96634d3304cc94e895ed713b
This commit is contained in:
Yuval Tassa
2024-11-14 03:44:42 -08:00
committed by Copybara-Service
parent 0e8cca93e1
commit 9f51ba50db
4 changed files with 16 additions and 16 deletions
+4 -4
View File
@@ -948,10 +948,10 @@ struct mjModel_ {
int nuser_actuator; // number of mjtNums in actuator_user
int nuser_sensor; // number of mjtNums in sensor_user
int nnames; // number of chars in all names
int nnames_map; // number of slots in the names hash map
int npaths; // number of chars in all paths
// sizes set after mjModel construction (only affect mjData)
// sizes set after mjModel construction
int nnames_map; // number of slots in the names hash map
int nM; // number of non-zeros in sparse inertia matrix
int nB; // number of non-zeros in sparse body-dof matrix
int nC; // number of non-zeros in sparse reduced dof-dof matrix
@@ -959,8 +959,8 @@ struct mjModel_ {
int ntree; // number of kinematic trees under world body
int ngravcomp; // number of bodies with nonzero gravcomp
int nemax; // number of potential equality-constraint rows
int njmax; // number of available rows in constraint Jacobian
int nconmax; // number of potential contacts in contact list
int njmax; // number of available rows in constraint Jacobian (legacy)
int nconmax; // number of potential contacts in contact list (legacy)
int nuserdata; // number of mjtNums reserved for the user
int nsensordata; // number of mjtNums in sensor data vector
int npluginstate; // number of mjtNums in plugin state vector
+4 -4
View File
@@ -655,10 +655,10 @@ struct mjModel_ {
int nuser_actuator; // number of mjtNums in actuator_user
int nuser_sensor; // number of mjtNums in sensor_user
int nnames; // number of chars in all names
int nnames_map; // number of slots in the names hash map
int npaths; // number of chars in all paths
// sizes set after mjModel construction (only affect mjData)
// sizes set after mjModel construction
int nnames_map; // number of slots in the names hash map
int nM; // number of non-zeros in sparse inertia matrix
int nB; // number of non-zeros in sparse body-dof matrix
int nC; // number of non-zeros in sparse reduced dof-dof matrix
@@ -666,8 +666,8 @@ struct mjModel_ {
int ntree; // number of kinematic trees under world body
int ngravcomp; // number of bodies with nonzero gravcomp
int nemax; // number of potential equality-constraint rows
int njmax; // number of available rows in constraint Jacobian
int nconmax; // number of potential contacts in contact list
int njmax; // number of available rows in constraint Jacobian (legacy)
int nconmax; // number of potential contacts in contact list (legacy)
int nuserdata; // number of mjtNums reserved for the user
int nsensordata; // number of mjtNums in sensor data vector
int npluginstate; // number of mjtNums in plugin state vector
+7 -7
View File
@@ -1148,16 +1148,16 @@ STRUCTS: Mapping[str, StructDecl] = dict([
type=ValueType(name='int'),
doc='number of chars in all names',
),
StructFieldDecl(
name='nnames_map',
type=ValueType(name='int'),
doc='number of slots in the names hash map',
),
StructFieldDecl(
name='npaths',
type=ValueType(name='int'),
doc='number of chars in all paths',
),
StructFieldDecl(
name='nnames_map',
type=ValueType(name='int'),
doc='number of slots in the names hash map',
),
StructFieldDecl(
name='nM',
type=ValueType(name='int'),
@@ -1196,12 +1196,12 @@ STRUCTS: Mapping[str, StructDecl] = dict([
StructFieldDecl(
name='njmax',
type=ValueType(name='int'),
doc='number of available rows in constraint Jacobian',
doc='number of available rows in constraint Jacobian (legacy)',
),
StructFieldDecl(
name='nconmax',
type=ValueType(name='int'),
doc='number of potential contacts in contact list',
doc='number of potential contacts in contact list (legacy)',
),
StructFieldDecl(
name='nuserdata',
+1 -1
View File
@@ -5238,8 +5238,8 @@ public unsafe struct mjModel_ {
public int nuser_actuator;
public int nuser_sensor;
public int nnames;
public int nnames_map;
public int npaths;
public int nnames_map;
public int nM;
public int nB;
public int nC;