Move mjtConstraint from mjmodel.h to mjdata.h.
PiperOrigin-RevId: 798987338 Change-Id: I3117742de7eb3c16366f266fe0c0651262717cb4
This commit is contained in:
committed by
Copybara-Service
parent
d77ecb3f06
commit
2b45b39ce5
@@ -328,17 +328,6 @@ MuJoCo object types. These are used, for example, in the support functions :ref:
|
|||||||
.. mujoco-include:: mjtObj
|
.. mujoco-include:: mjtObj
|
||||||
|
|
||||||
|
|
||||||
.. _mjtConstraint:
|
|
||||||
|
|
||||||
mjtConstraint
|
|
||||||
~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
Constraint types. These values are not used in mjModel, but are used in the mjData field ``d->efc_type`` when the list
|
|
||||||
of active constraints is constructed at each simulation time step.
|
|
||||||
|
|
||||||
.. mujoco-include:: mjtConstraint
|
|
||||||
|
|
||||||
|
|
||||||
.. _mjtSensor:
|
.. _mjtSensor:
|
||||||
|
|
||||||
mjtSensor
|
mjtSensor
|
||||||
@@ -431,6 +420,17 @@ State component elements as integer bitflags and several convenient combinations
|
|||||||
.. mujoco-include:: mjtState
|
.. mujoco-include:: mjtState
|
||||||
|
|
||||||
|
|
||||||
|
.. _mjtConstraint:
|
||||||
|
|
||||||
|
mjtConstraint
|
||||||
|
~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Constraint types. These values are not used in mjModel, but are used in the mjData field ``d->efc_type`` when the list
|
||||||
|
of active constraints is constructed at each simulation time step.
|
||||||
|
|
||||||
|
.. mujoco-include:: mjtConstraint
|
||||||
|
|
||||||
|
|
||||||
.. _mjtConstraintState:
|
.. _mjtConstraintState:
|
||||||
|
|
||||||
mjtConstraintState
|
mjtConstraintState
|
||||||
|
|||||||
+10
-10
@@ -41,6 +41,16 @@ typedef enum mjtState_ { // state elements
|
|||||||
mjSTATE_USERDATA,
|
mjSTATE_USERDATA,
|
||||||
mjSTATE_INTEGRATION = mjSTATE_FULLPHYSICS | mjSTATE_USER | mjSTATE_WARMSTART
|
mjSTATE_INTEGRATION = mjSTATE_FULLPHYSICS | mjSTATE_USER | mjSTATE_WARMSTART
|
||||||
} mjtState;
|
} mjtState;
|
||||||
|
typedef enum mjtConstraint_ { // type of constraint
|
||||||
|
mjCNSTR_EQUALITY = 0, // equality constraint
|
||||||
|
mjCNSTR_FRICTION_DOF, // dof friction
|
||||||
|
mjCNSTR_FRICTION_TENDON, // tendon friction
|
||||||
|
mjCNSTR_LIMIT_JOINT, // joint limit
|
||||||
|
mjCNSTR_LIMIT_TENDON, // tendon limit
|
||||||
|
mjCNSTR_CONTACT_FRICTIONLESS, // frictionless contact
|
||||||
|
mjCNSTR_CONTACT_PYRAMIDAL, // frictional contact, pyramidal friction cone
|
||||||
|
mjCNSTR_CONTACT_ELLIPTIC // frictional contact, elliptic friction cone
|
||||||
|
} mjtConstraint;
|
||||||
typedef enum mjtConstraintState_ { // constraint state
|
typedef enum mjtConstraintState_ { // constraint state
|
||||||
mjCNSTRSTATE_SATISFIED = 0, // constraint satisfied, zero cost (limit, contact)
|
mjCNSTRSTATE_SATISFIED = 0, // constraint satisfied, zero cost (limit, contact)
|
||||||
mjCNSTRSTATE_QUADRATIC, // quadratic cost (equality, friction, limit, contact)
|
mjCNSTRSTATE_QUADRATIC, // quadratic cost (equality, friction, limit, contact)
|
||||||
@@ -639,16 +649,6 @@ typedef enum mjtObj_ { // type of MujoCo object
|
|||||||
mjOBJ_MODEL // entire model
|
mjOBJ_MODEL // entire model
|
||||||
|
|
||||||
} mjtObj;
|
} mjtObj;
|
||||||
typedef enum mjtConstraint_ { // type of constraint
|
|
||||||
mjCNSTR_EQUALITY = 0, // equality constraint
|
|
||||||
mjCNSTR_FRICTION_DOF, // dof friction
|
|
||||||
mjCNSTR_FRICTION_TENDON, // tendon friction
|
|
||||||
mjCNSTR_LIMIT_JOINT, // joint limit
|
|
||||||
mjCNSTR_LIMIT_TENDON, // tendon limit
|
|
||||||
mjCNSTR_CONTACT_FRICTIONLESS, // frictionless contact
|
|
||||||
mjCNSTR_CONTACT_PYRAMIDAL, // frictional contact, pyramidal friction cone
|
|
||||||
mjCNSTR_CONTACT_ELLIPTIC // frictional contact, elliptic friction cone
|
|
||||||
} mjtConstraint;
|
|
||||||
typedef enum mjtSensor_ { // type of sensor
|
typedef enum mjtSensor_ { // type of sensor
|
||||||
// common robotic sensors, attached to a site
|
// common robotic sensors, attached to a site
|
||||||
mjSENS_TOUCH = 0, // scalar contact normal forces summed over sensor zone
|
mjSENS_TOUCH = 0, // scalar contact normal forces summed over sensor zone
|
||||||
|
|||||||
@@ -51,6 +51,18 @@ typedef enum mjtState_ { // state elements
|
|||||||
} mjtState;
|
} mjtState;
|
||||||
|
|
||||||
|
|
||||||
|
typedef enum mjtConstraint_ { // type of constraint
|
||||||
|
mjCNSTR_EQUALITY = 0, // equality constraint
|
||||||
|
mjCNSTR_FRICTION_DOF, // dof friction
|
||||||
|
mjCNSTR_FRICTION_TENDON, // tendon friction
|
||||||
|
mjCNSTR_LIMIT_JOINT, // joint limit
|
||||||
|
mjCNSTR_LIMIT_TENDON, // tendon limit
|
||||||
|
mjCNSTR_CONTACT_FRICTIONLESS, // frictionless contact
|
||||||
|
mjCNSTR_CONTACT_PYRAMIDAL, // frictional contact, pyramidal friction cone
|
||||||
|
mjCNSTR_CONTACT_ELLIPTIC // frictional contact, elliptic friction cone
|
||||||
|
} mjtConstraint;
|
||||||
|
|
||||||
|
|
||||||
typedef enum mjtConstraintState_ { // constraint state
|
typedef enum mjtConstraintState_ { // constraint state
|
||||||
mjCNSTRSTATE_SATISFIED = 0, // constraint satisfied, zero cost (limit, contact)
|
mjCNSTRSTATE_SATISFIED = 0, // constraint satisfied, zero cost (limit, contact)
|
||||||
mjCNSTRSTATE_QUADRATIC, // quadratic cost (equality, friction, limit, contact)
|
mjCNSTRSTATE_QUADRATIC, // quadratic cost (equality, friction, limit, contact)
|
||||||
|
|||||||
@@ -291,18 +291,6 @@ typedef enum mjtObj_ { // type of MujoCo object
|
|||||||
} mjtObj;
|
} mjtObj;
|
||||||
|
|
||||||
|
|
||||||
typedef enum mjtConstraint_ { // type of constraint
|
|
||||||
mjCNSTR_EQUALITY = 0, // equality constraint
|
|
||||||
mjCNSTR_FRICTION_DOF, // dof friction
|
|
||||||
mjCNSTR_FRICTION_TENDON, // tendon friction
|
|
||||||
mjCNSTR_LIMIT_JOINT, // joint limit
|
|
||||||
mjCNSTR_LIMIT_TENDON, // tendon limit
|
|
||||||
mjCNSTR_CONTACT_FRICTIONLESS, // frictionless contact
|
|
||||||
mjCNSTR_CONTACT_PYRAMIDAL, // frictional contact, pyramidal friction cone
|
|
||||||
mjCNSTR_CONTACT_ELLIPTIC // frictional contact, elliptic friction cone
|
|
||||||
} mjtConstraint;
|
|
||||||
|
|
||||||
|
|
||||||
typedef enum mjtSensor_ { // type of sensor
|
typedef enum mjtSensor_ { // type of sensor
|
||||||
// common robotic sensors, attached to a site
|
// common robotic sensors, attached to a site
|
||||||
mjSENS_TOUCH = 0, // scalar contact normal forces summed over sensor zone
|
mjSENS_TOUCH = 0, // scalar contact normal forces summed over sensor zone
|
||||||
|
|||||||
@@ -312,21 +312,6 @@ ENUMS: Mapping[str, EnumDecl] = dict([
|
|||||||
('mjOBJ_MODEL', 102),
|
('mjOBJ_MODEL', 102),
|
||||||
]),
|
]),
|
||||||
)),
|
)),
|
||||||
('mjtConstraint',
|
|
||||||
EnumDecl(
|
|
||||||
name='mjtConstraint',
|
|
||||||
declname='enum mjtConstraint_',
|
|
||||||
values=dict([
|
|
||||||
('mjCNSTR_EQUALITY', 0),
|
|
||||||
('mjCNSTR_FRICTION_DOF', 1),
|
|
||||||
('mjCNSTR_FRICTION_TENDON', 2),
|
|
||||||
('mjCNSTR_LIMIT_JOINT', 3),
|
|
||||||
('mjCNSTR_LIMIT_TENDON', 4),
|
|
||||||
('mjCNSTR_CONTACT_FRICTIONLESS', 5),
|
|
||||||
('mjCNSTR_CONTACT_PYRAMIDAL', 6),
|
|
||||||
('mjCNSTR_CONTACT_ELLIPTIC', 7),
|
|
||||||
]),
|
|
||||||
)),
|
|
||||||
('mjtSensor',
|
('mjtSensor',
|
||||||
EnumDecl(
|
EnumDecl(
|
||||||
name='mjtSensor',
|
name='mjtSensor',
|
||||||
@@ -501,6 +486,21 @@ ENUMS: Mapping[str, EnumDecl] = dict([
|
|||||||
('mjSTATE_INTEGRATION', 8191),
|
('mjSTATE_INTEGRATION', 8191),
|
||||||
]),
|
]),
|
||||||
)),
|
)),
|
||||||
|
('mjtConstraint',
|
||||||
|
EnumDecl(
|
||||||
|
name='mjtConstraint',
|
||||||
|
declname='enum mjtConstraint_',
|
||||||
|
values=dict([
|
||||||
|
('mjCNSTR_EQUALITY', 0),
|
||||||
|
('mjCNSTR_FRICTION_DOF', 1),
|
||||||
|
('mjCNSTR_FRICTION_TENDON', 2),
|
||||||
|
('mjCNSTR_LIMIT_JOINT', 3),
|
||||||
|
('mjCNSTR_LIMIT_TENDON', 4),
|
||||||
|
('mjCNSTR_CONTACT_FRICTIONLESS', 5),
|
||||||
|
('mjCNSTR_CONTACT_PYRAMIDAL', 6),
|
||||||
|
('mjCNSTR_CONTACT_ELLIPTIC', 7),
|
||||||
|
]),
|
||||||
|
)),
|
||||||
('mjtConstraintState',
|
('mjtConstraintState',
|
||||||
EnumDecl(
|
EnumDecl(
|
||||||
name='mjtConstraintState',
|
name='mjtConstraintState',
|
||||||
|
|||||||
@@ -115,6 +115,16 @@ public const int mjVERSION_HEADER = 336;
|
|||||||
|
|
||||||
|
|
||||||
// ------------------------------------Enums------------------------------------
|
// ------------------------------------Enums------------------------------------
|
||||||
|
public enum mjtConstraint : int{
|
||||||
|
mjCNSTR_EQUALITY = 0,
|
||||||
|
mjCNSTR_FRICTION_DOF = 1,
|
||||||
|
mjCNSTR_FRICTION_TENDON = 2,
|
||||||
|
mjCNSTR_LIMIT_JOINT = 3,
|
||||||
|
mjCNSTR_LIMIT_TENDON = 4,
|
||||||
|
mjCNSTR_CONTACT_FRICTIONLESS = 5,
|
||||||
|
mjCNSTR_CONTACT_PYRAMIDAL = 6,
|
||||||
|
mjCNSTR_CONTACT_ELLIPTIC = 7,
|
||||||
|
}
|
||||||
public enum mjtConstraintState : int{
|
public enum mjtConstraintState : int{
|
||||||
mjCNSTRSTATE_SATISFIED = 0,
|
mjCNSTRSTATE_SATISFIED = 0,
|
||||||
mjCNSTRSTATE_QUADRATIC = 1,
|
mjCNSTRSTATE_QUADRATIC = 1,
|
||||||
@@ -341,16 +351,6 @@ public enum mjtObj : int{
|
|||||||
mjOBJ_DEFAULT = 101,
|
mjOBJ_DEFAULT = 101,
|
||||||
mjOBJ_MODEL = 102,
|
mjOBJ_MODEL = 102,
|
||||||
}
|
}
|
||||||
public enum mjtConstraint : int{
|
|
||||||
mjCNSTR_EQUALITY = 0,
|
|
||||||
mjCNSTR_FRICTION_DOF = 1,
|
|
||||||
mjCNSTR_FRICTION_TENDON = 2,
|
|
||||||
mjCNSTR_LIMIT_JOINT = 3,
|
|
||||||
mjCNSTR_LIMIT_TENDON = 4,
|
|
||||||
mjCNSTR_CONTACT_FRICTIONLESS = 5,
|
|
||||||
mjCNSTR_CONTACT_PYRAMIDAL = 6,
|
|
||||||
mjCNSTR_CONTACT_ELLIPTIC = 7,
|
|
||||||
}
|
|
||||||
public enum mjtSensor : int{
|
public enum mjtSensor : int{
|
||||||
mjSENS_TOUCH = 0,
|
mjSENS_TOUCH = 0,
|
||||||
mjSENS_ACCELEROMETER = 1,
|
mjSENS_ACCELEROMETER = 1,
|
||||||
|
|||||||
Reference in New Issue
Block a user