Skip to content

Commit

Permalink
Add mjNOBJECT value to mjtObj enum.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 590164716
Change-Id: I500741aa4fb97fe2c4f5d2086188bb2c9fdfd1a0
  • Loading branch information
yuvaltassa authored and copybara-github committed Dec 12, 2023
1 parent 64c33ce commit 28a9e6d
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 2 deletions.
4 changes: 3 additions & 1 deletion doc/includes/references.h
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,9 @@ typedef enum mjtObj_ { // type of MujoCo object
mjOBJ_TEXT, // text
mjOBJ_TUPLE, // tuple
mjOBJ_KEY, // keyframe
mjOBJ_PLUGIN // plugin instance
mjOBJ_PLUGIN, // plugin instance

mjNOBJECT // number of object types
} mjtObj;
typedef enum mjtConstraint_ { // type of constraint
mjCNSTR_EQUALITY = 0, // equality constraint
Expand Down
4 changes: 3 additions & 1 deletion include/mujoco/mjmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,9 @@ typedef enum mjtObj_ { // type of MujoCo object
mjOBJ_TEXT, // text
mjOBJ_TUPLE, // tuple
mjOBJ_KEY, // keyframe
mjOBJ_PLUGIN // plugin instance
mjOBJ_PLUGIN, // plugin instance

mjNOBJECT // number of object types
} mjtObj;


Expand Down
1 change: 1 addition & 0 deletions introspect/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@
('mjOBJ_TUPLE', 23),
('mjOBJ_KEY', 24),
('mjOBJ_PLUGIN', 25),
('mjNOBJECT', 26),
]),
)),
('mjtConstraint',
Expand Down
2 changes: 2 additions & 0 deletions src/engine/engine_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -1858,6 +1858,8 @@ static int numObjects(const mjModel* m, mjtObj objtype) {
return m->nkey;
case mjOBJ_PLUGIN:
return m->nplugin;
case mjNOBJECT:
return -2;
}
return -2;
}
Expand Down
1 change: 1 addition & 0 deletions unity/Runtime/Bindings/MjBindings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ public enum mjtObj : int{
mjOBJ_TUPLE = 23,
mjOBJ_KEY = 24,
mjOBJ_PLUGIN = 25,
mjNOBJECT = 26,
}
public enum mjtConstraint : int{
mjCNSTR_EQUALITY = 0,
Expand Down

0 comments on commit 28a9e6d

Please sign in to comment.