Move mjtConstraintState from mjmodel.h to mjdata.h.
This is the correct location, this enum is only used in `mjData`, not `mjModel`. PiperOrigin-RevId: 798860951 Change-Id: I48b9a2afc831bd9a6966cc9586429fd03605bdd2
This commit is contained in:
committed by
Copybara-Service
parent
1c1bb14e1c
commit
d77ecb3f06
@@ -338,15 +338,6 @@ of active constraints is constructed at each simulation time step.
|
|||||||
|
|
||||||
.. mujoco-include:: mjtConstraint
|
.. mujoco-include:: mjtConstraint
|
||||||
|
|
||||||
.. _mjtConstraintState:
|
|
||||||
|
|
||||||
mjtConstraintState
|
|
||||||
~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
These values are used by the solver internally to keep track of the constraint states.
|
|
||||||
|
|
||||||
.. mujoco-include:: mjtConstraintState
|
|
||||||
|
|
||||||
|
|
||||||
.. _mjtSensor:
|
.. _mjtSensor:
|
||||||
|
|
||||||
@@ -440,6 +431,16 @@ State component elements as integer bitflags and several convenient combinations
|
|||||||
.. mujoco-include:: mjtState
|
.. mujoco-include:: mjtState
|
||||||
|
|
||||||
|
|
||||||
|
.. _mjtConstraintState:
|
||||||
|
|
||||||
|
mjtConstraintState
|
||||||
|
~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
These values are used by the solver internally to keep track of the constraint states.
|
||||||
|
|
||||||
|
.. mujoco-include:: mjtConstraintState
|
||||||
|
|
||||||
|
|
||||||
.. _mjtWarning:
|
.. _mjtWarning:
|
||||||
|
|
||||||
mjtWarning
|
mjtWarning
|
||||||
|
|||||||
@@ -41,6 +41,13 @@ 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 mjtConstraintState_ { // constraint state
|
||||||
|
mjCNSTRSTATE_SATISFIED = 0, // constraint satisfied, zero cost (limit, contact)
|
||||||
|
mjCNSTRSTATE_QUADRATIC, // quadratic cost (equality, friction, limit, contact)
|
||||||
|
mjCNSTRSTATE_LINEARNEG, // linear cost, negative side (friction)
|
||||||
|
mjCNSTRSTATE_LINEARPOS, // linear cost, positive side (friction)
|
||||||
|
mjCNSTRSTATE_CONE // squared distance to cone cost (elliptic contact)
|
||||||
|
} mjtConstraintState;
|
||||||
typedef enum mjtWarning_ { // warning types
|
typedef enum mjtWarning_ { // warning types
|
||||||
mjWARN_INERTIA = 0, // (near) singular inertia matrix
|
mjWARN_INERTIA = 0, // (near) singular inertia matrix
|
||||||
mjWARN_CONTACTFULL, // too many contacts in contact list
|
mjWARN_CONTACTFULL, // too many contacts in contact list
|
||||||
@@ -642,13 +649,6 @@ typedef enum mjtConstraint_ { // type of constraint
|
|||||||
mjCNSTR_CONTACT_PYRAMIDAL, // frictional contact, pyramidal friction cone
|
mjCNSTR_CONTACT_PYRAMIDAL, // frictional contact, pyramidal friction cone
|
||||||
mjCNSTR_CONTACT_ELLIPTIC // frictional contact, elliptic friction cone
|
mjCNSTR_CONTACT_ELLIPTIC // frictional contact, elliptic friction cone
|
||||||
} mjtConstraint;
|
} mjtConstraint;
|
||||||
typedef enum mjtConstraintState_ { // constraint state
|
|
||||||
mjCNSTRSTATE_SATISFIED = 0, // constraint satisfied, zero cost (limit, contact)
|
|
||||||
mjCNSTRSTATE_QUADRATIC, // quadratic cost (equality, friction, limit, contact)
|
|
||||||
mjCNSTRSTATE_LINEARNEG, // linear cost, negative side (friction)
|
|
||||||
mjCNSTRSTATE_LINEARPOS, // linear cost, positive side (friction)
|
|
||||||
mjCNSTRSTATE_CONE // squared distance to cone cost (elliptic contact)
|
|
||||||
} mjtConstraintState;
|
|
||||||
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,15 @@ typedef enum mjtState_ { // state elements
|
|||||||
} mjtState;
|
} mjtState;
|
||||||
|
|
||||||
|
|
||||||
|
typedef enum mjtConstraintState_ { // constraint state
|
||||||
|
mjCNSTRSTATE_SATISFIED = 0, // constraint satisfied, zero cost (limit, contact)
|
||||||
|
mjCNSTRSTATE_QUADRATIC, // quadratic cost (equality, friction, limit, contact)
|
||||||
|
mjCNSTRSTATE_LINEARNEG, // linear cost, negative side (friction)
|
||||||
|
mjCNSTRSTATE_LINEARPOS, // linear cost, positive side (friction)
|
||||||
|
mjCNSTRSTATE_CONE // squared distance to cone cost (elliptic contact)
|
||||||
|
} mjtConstraintState;
|
||||||
|
|
||||||
|
|
||||||
typedef enum mjtWarning_ { // warning types
|
typedef enum mjtWarning_ { // warning types
|
||||||
mjWARN_INERTIA = 0, // (near) singular inertia matrix
|
mjWARN_INERTIA = 0, // (near) singular inertia matrix
|
||||||
mjWARN_CONTACTFULL, // too many contacts in contact list
|
mjWARN_CONTACTFULL, // too many contacts in contact list
|
||||||
|
|||||||
@@ -303,15 +303,6 @@ typedef enum mjtConstraint_ { // type of constraint
|
|||||||
} mjtConstraint;
|
} mjtConstraint;
|
||||||
|
|
||||||
|
|
||||||
typedef enum mjtConstraintState_ { // constraint state
|
|
||||||
mjCNSTRSTATE_SATISFIED = 0, // constraint satisfied, zero cost (limit, contact)
|
|
||||||
mjCNSTRSTATE_QUADRATIC, // quadratic cost (equality, friction, limit, contact)
|
|
||||||
mjCNSTRSTATE_LINEARNEG, // linear cost, negative side (friction)
|
|
||||||
mjCNSTRSTATE_LINEARPOS, // linear cost, positive side (friction)
|
|
||||||
mjCNSTRSTATE_CONE // squared distance to cone cost (elliptic contact)
|
|
||||||
} mjtConstraintState;
|
|
||||||
|
|
||||||
|
|
||||||
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
|
||||||
|
|||||||
@@ -327,18 +327,6 @@ ENUMS: Mapping[str, EnumDecl] = dict([
|
|||||||
('mjCNSTR_CONTACT_ELLIPTIC', 7),
|
('mjCNSTR_CONTACT_ELLIPTIC', 7),
|
||||||
]),
|
]),
|
||||||
)),
|
)),
|
||||||
('mjtConstraintState',
|
|
||||||
EnumDecl(
|
|
||||||
name='mjtConstraintState',
|
|
||||||
declname='enum mjtConstraintState_',
|
|
||||||
values=dict([
|
|
||||||
('mjCNSTRSTATE_SATISFIED', 0),
|
|
||||||
('mjCNSTRSTATE_QUADRATIC', 1),
|
|
||||||
('mjCNSTRSTATE_LINEARNEG', 2),
|
|
||||||
('mjCNSTRSTATE_LINEARPOS', 3),
|
|
||||||
('mjCNSTRSTATE_CONE', 4),
|
|
||||||
]),
|
|
||||||
)),
|
|
||||||
('mjtSensor',
|
('mjtSensor',
|
||||||
EnumDecl(
|
EnumDecl(
|
||||||
name='mjtSensor',
|
name='mjtSensor',
|
||||||
@@ -513,6 +501,18 @@ ENUMS: Mapping[str, EnumDecl] = dict([
|
|||||||
('mjSTATE_INTEGRATION', 8191),
|
('mjSTATE_INTEGRATION', 8191),
|
||||||
]),
|
]),
|
||||||
)),
|
)),
|
||||||
|
('mjtConstraintState',
|
||||||
|
EnumDecl(
|
||||||
|
name='mjtConstraintState',
|
||||||
|
declname='enum mjtConstraintState_',
|
||||||
|
values=dict([
|
||||||
|
('mjCNSTRSTATE_SATISFIED', 0),
|
||||||
|
('mjCNSTRSTATE_QUADRATIC', 1),
|
||||||
|
('mjCNSTRSTATE_LINEARNEG', 2),
|
||||||
|
('mjCNSTRSTATE_LINEARPOS', 3),
|
||||||
|
('mjCNSTRSTATE_CONE', 4),
|
||||||
|
]),
|
||||||
|
)),
|
||||||
('mjtWarning',
|
('mjtWarning',
|
||||||
EnumDecl(
|
EnumDecl(
|
||||||
name='mjtWarning',
|
name='mjtWarning',
|
||||||
|
|||||||
@@ -115,6 +115,13 @@ public const int mjVERSION_HEADER = 336;
|
|||||||
|
|
||||||
|
|
||||||
// ------------------------------------Enums------------------------------------
|
// ------------------------------------Enums------------------------------------
|
||||||
|
public enum mjtConstraintState : int{
|
||||||
|
mjCNSTRSTATE_SATISFIED = 0,
|
||||||
|
mjCNSTRSTATE_QUADRATIC = 1,
|
||||||
|
mjCNSTRSTATE_LINEARNEG = 2,
|
||||||
|
mjCNSTRSTATE_LINEARPOS = 3,
|
||||||
|
mjCNSTRSTATE_CONE = 4,
|
||||||
|
}
|
||||||
public enum mjtWarning : int{
|
public enum mjtWarning : int{
|
||||||
mjWARN_INERTIA = 0,
|
mjWARN_INERTIA = 0,
|
||||||
mjWARN_CONTACTFULL = 1,
|
mjWARN_CONTACTFULL = 1,
|
||||||
@@ -344,13 +351,6 @@ public enum mjtConstraint : int{
|
|||||||
mjCNSTR_CONTACT_PYRAMIDAL = 6,
|
mjCNSTR_CONTACT_PYRAMIDAL = 6,
|
||||||
mjCNSTR_CONTACT_ELLIPTIC = 7,
|
mjCNSTR_CONTACT_ELLIPTIC = 7,
|
||||||
}
|
}
|
||||||
public enum mjtConstraintState : int{
|
|
||||||
mjCNSTRSTATE_SATISFIED = 0,
|
|
||||||
mjCNSTRSTATE_QUADRATIC = 1,
|
|
||||||
mjCNSTRSTATE_LINEARNEG = 2,
|
|
||||||
mjCNSTRSTATE_LINEARPOS = 3,
|
|
||||||
mjCNSTRSTATE_CONE = 4,
|
|
||||||
}
|
|
||||||
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