Align comments in mjm_ structs.
PiperOrigin-RevId: 606214754 Change-Id: I4d5ddd98baf52fc71acc1bfca0b345cafda4ce7f
This commit is contained in:
committed by
Copybara-Service
parent
ff39d0b812
commit
ab209c41be
+202
-202
@@ -35,64 +35,64 @@ typedef struct _mjDouble* mjDouble;
|
|||||||
|
|
||||||
//---------------------------------- enum types (mjt) ----------------------------------------------
|
//---------------------------------- enum types (mjt) ----------------------------------------------
|
||||||
|
|
||||||
typedef enum _mjtGeomInertia { // type of inertia inference
|
typedef enum _mjtGeomInertia { // type of inertia inference
|
||||||
mjINERTIA_VOLUME, // mass distributed in the volume
|
mjINERTIA_VOLUME, // mass distributed in the volume
|
||||||
mjINERTIA_SHELL, // mass distributed on the surface
|
mjINERTIA_SHELL, // mass distributed on the surface
|
||||||
} mjtGeomInertia;
|
} mjtGeomInertia;
|
||||||
|
|
||||||
|
|
||||||
//---------------------------------- attribute structs (mjm) ---------------------------------------
|
//---------------------------------- attribute structs (mjm) ---------------------------------------
|
||||||
|
|
||||||
typedef struct _mjmOrientation { // alternative orientation specifiers
|
typedef struct _mjmOrientation { // alternative orientation specifiers
|
||||||
double axisangle[4]; // rotation axis and angle
|
double axisangle[4]; // rotation axis and angle
|
||||||
double xyaxes[6]; // x and y axes
|
double xyaxes[6]; // x and y axes
|
||||||
double zaxis[3]; // z axis (use minimal rotation)
|
double zaxis[3]; // z axis (use minimal rotation)
|
||||||
double euler[3]; // euler angles
|
double euler[3]; // euler angles
|
||||||
} mjmOrientation;
|
} mjmOrientation;
|
||||||
|
|
||||||
|
|
||||||
typedef struct _mjmPlugin { // plugin specification
|
typedef struct _mjmPlugin { // plugin specification
|
||||||
mjElement instance; // internal, do not modify
|
mjElement instance; // internal, do not modify
|
||||||
mjString name; // name
|
mjString name; // name
|
||||||
mjString instance_name; // instance name
|
mjString instance_name; // instance name
|
||||||
bool active; // is the plugin active
|
bool active; // is the plugin active
|
||||||
} mjmPlugin;
|
} mjmPlugin;
|
||||||
|
|
||||||
|
|
||||||
typedef struct _mjmBody { // body specification
|
typedef struct _mjmBody { // body specification
|
||||||
mjElement element; // internal, do not modify
|
mjElement element; // internal, do not modify
|
||||||
mjString name; // name
|
mjString name; // name
|
||||||
mjString classname; // childclass name
|
mjString classname; // childclass name
|
||||||
|
|
||||||
// body frame
|
// body frame
|
||||||
double pos[3]; // frame position
|
double pos[3]; // frame position
|
||||||
double quat[4]; // frame orientation
|
double quat[4]; // frame orientation
|
||||||
mjmOrientation alt; // frame alternative orientation
|
mjmOrientation alt; // frame alternative orientation
|
||||||
|
|
||||||
// inertial frame
|
// inertial frame
|
||||||
double mass; // mass
|
double mass; // mass
|
||||||
double ipos[3]; // inertial frame position
|
double ipos[3]; // inertial frame position
|
||||||
double iquat[4]; // inertial frame orientation
|
double iquat[4]; // inertial frame orientation
|
||||||
double inertia[3]; // diagonal inertia (in i-frame)
|
double inertia[3]; // diagonal inertia (in i-frame)
|
||||||
mjmOrientation ialt; // inertial frame alternative orientation
|
mjmOrientation ialt; // inertial frame alternative orientation
|
||||||
double fullinertia[6]; // non-axis-aligned inertia matrix
|
double fullinertia[6]; // non-axis-aligned inertia matrix
|
||||||
|
|
||||||
// other
|
// other
|
||||||
mjtByte mocap; // is this a mocap body
|
mjtByte mocap; // is this a mocap body
|
||||||
double gravcomp; // gravity compensation
|
double gravcomp; // gravity compensation
|
||||||
mjDouble userdata; // user data
|
mjDouble userdata; // user data
|
||||||
mjtByte explicitinertial; // whether to save the body with explicit inertial clause
|
mjtByte explicitinertial; // whether to save the body with explicit inertial clause
|
||||||
mjmPlugin plugin; // passive force plugin
|
mjmPlugin plugin; // passive force plugin
|
||||||
mjString info; // message appended to compiler errors
|
mjString info; // message appended to compiler errors
|
||||||
} mjmBody;
|
} mjmBody;
|
||||||
|
|
||||||
|
|
||||||
typedef struct _mjmFrame { // frame specification
|
typedef struct _mjmFrame { // frame specification
|
||||||
mjElement element; // internal, do not modify
|
mjElement element; // internal, do not modify
|
||||||
double pos[3]; // position
|
double pos[3]; // position
|
||||||
double quat[4]; // orientation
|
double quat[4]; // orientation
|
||||||
mjmOrientation alt; // alternative orientation
|
mjmOrientation alt; // alternative orientation
|
||||||
mjString info; // message appended to compiler errors
|
mjString info; // message appended to compiler errors
|
||||||
} mjmFrame;
|
} mjmFrame;
|
||||||
|
|
||||||
|
|
||||||
@@ -136,163 +136,163 @@ typedef struct _mjmJoint { // joint specification
|
|||||||
} mjmJoint;
|
} mjmJoint;
|
||||||
|
|
||||||
|
|
||||||
typedef struct _mjmGeom { // geom specification
|
typedef struct _mjmGeom { // geom specification
|
||||||
mjElement element; // internal, do not modify
|
mjElement element; // internal, do not modify
|
||||||
mjString name; // name
|
mjString name; // name
|
||||||
mjString classname; // classname
|
mjString classname; // classname
|
||||||
mjtGeom type; // geom type
|
mjtGeom type; // geom type
|
||||||
|
|
||||||
// frame, size
|
// frame, size
|
||||||
double pos[3]; // position
|
double pos[3]; // position
|
||||||
double quat[4]; // orientation
|
double quat[4]; // orientation
|
||||||
mjmOrientation alt; // alternative orientation
|
mjmOrientation alt; // alternative orientation
|
||||||
double fromto[6]; // alternative for capsule, cylinder, box, ellipsoid
|
double fromto[6]; // alternative for capsule, cylinder, box, ellipsoid
|
||||||
double size[3]; // type-specific size
|
double size[3]; // type-specific size
|
||||||
|
|
||||||
// contact related
|
// contact related
|
||||||
int contype; // contact type
|
int contype; // contact type
|
||||||
int conaffinity; // contact affinity
|
int conaffinity; // contact affinity
|
||||||
int condim; // contact dimensionality
|
int condim; // contact dimensionality
|
||||||
int priority; // contact priority
|
int priority; // contact priority
|
||||||
double friction[3]; // one-sided friction coefficients: slide, roll, spin
|
double friction[3]; // one-sided friction coefficients: slide, roll, spin
|
||||||
double solmix; // solver mixing for contact pairs
|
double solmix; // solver mixing for contact pairs
|
||||||
mjtNum solref[mjNREF]; // solver reference
|
mjtNum solref[mjNREF]; // solver reference
|
||||||
mjtNum solimp[mjNIMP]; // solver impedance
|
mjtNum solimp[mjNIMP]; // solver impedance
|
||||||
double margin; // margin for contact detection
|
double margin; // margin for contact detection
|
||||||
double gap; // include in solver if dist < margin-gap
|
double gap; // include in solver if dist < margin-gap
|
||||||
|
|
||||||
// inertia inference
|
// inertia inference
|
||||||
double mass; // used to compute density
|
double mass; // used to compute density
|
||||||
double density; // used to compute mass and inertia from volume or surface
|
double density; // used to compute mass and inertia from volume or surface
|
||||||
mjtGeomInertia typeinertia; // selects between surface and volume inertia
|
mjtGeomInertia typeinertia; // selects between surface and volume inertia
|
||||||
|
|
||||||
// fluid forces
|
// fluid forces
|
||||||
mjtNum fluid_ellipsoid; // whether ellipsoid-fluid model is active
|
mjtNum fluid_ellipsoid; // whether ellipsoid-fluid model is active
|
||||||
mjtNum fluid_coefs[5]; // ellipsoid-fluid interaction coefs
|
mjtNum fluid_coefs[5]; // ellipsoid-fluid interaction coefs
|
||||||
|
|
||||||
// visual
|
// visual
|
||||||
mjString material; // name of material
|
mjString material; // name of material
|
||||||
float rgba[4]; // rgba when material is omitted
|
float rgba[4]; // rgba when material is omitted
|
||||||
int group; // group
|
int group; // group
|
||||||
|
|
||||||
// other
|
// other
|
||||||
mjString hfieldname; // heightfield attached to geom
|
mjString hfieldname; // heightfield attached to geom
|
||||||
mjString meshname; // mesh attached to geom
|
mjString meshname; // mesh attached to geom
|
||||||
double fitscale; // scale mesh uniformly
|
double fitscale; // scale mesh uniformly
|
||||||
mjDouble userdata; // user data
|
mjDouble userdata; // user data
|
||||||
mjmPlugin plugin; // sdf plugin
|
mjmPlugin plugin; // sdf plugin
|
||||||
mjString info; // message appended to compiler errors
|
mjString info; // message appended to compiler errors
|
||||||
} mjmGeom;
|
} mjmGeom;
|
||||||
|
|
||||||
|
|
||||||
typedef struct _mjmSite { // site specification
|
typedef struct _mjmSite { // site specification
|
||||||
mjElement element; // internal, do not modify
|
mjElement element; // internal, do not modify
|
||||||
mjString name; // name
|
mjString name; // name
|
||||||
mjString classname; // class name
|
mjString classname; // class name
|
||||||
|
|
||||||
// frame, size
|
// frame, size
|
||||||
double pos[3]; // position
|
double pos[3]; // position
|
||||||
double quat[4]; // orientation
|
double quat[4]; // orientation
|
||||||
mjmOrientation alt; // alternative orientation
|
mjmOrientation alt; // alternative orientation
|
||||||
double fromto[6]; // alternative for capsule, cylinder, box, ellipsoid
|
double fromto[6]; // alternative for capsule, cylinder, box, ellipsoid
|
||||||
double size[3]; // geom size
|
double size[3]; // geom size
|
||||||
|
|
||||||
// visual
|
// visual
|
||||||
mjtGeom type; // geom type
|
mjtGeom type; // geom type
|
||||||
mjString material; // name of material
|
mjString material; // name of material
|
||||||
int group; // group
|
int group; // group
|
||||||
float rgba[4]; // rgba when material is omitted
|
float rgba[4]; // rgba when material is omitted
|
||||||
|
|
||||||
// other
|
// other
|
||||||
mjDouble userdata; // user data
|
mjDouble userdata; // user data
|
||||||
mjString info; // message appended to compiler errors
|
mjString info; // message appended to compiler errors
|
||||||
} mjmSite;
|
} mjmSite;
|
||||||
|
|
||||||
|
|
||||||
typedef struct _mjmCamera { // camera specification
|
typedef struct _mjmCamera { // camera specification
|
||||||
mjElement element; // internal, do not modify
|
mjElement element; // internal, do not modify
|
||||||
mjString name; // name
|
mjString name; // name
|
||||||
mjString classname; // class name
|
mjString classname; // class name
|
||||||
|
|
||||||
// extrinsics
|
// extrinsics
|
||||||
double pos[3]; // position
|
double pos[3]; // position
|
||||||
double quat[4]; // orientation
|
double quat[4]; // orientation
|
||||||
mjmOrientation alt; // alternative orientation
|
mjmOrientation alt; // alternative orientation
|
||||||
mjtCamLight mode; // tracking mode
|
mjtCamLight mode; // tracking mode
|
||||||
mjString targetbody; // target body for tracking/targeting
|
mjString targetbody; // target body for tracking/targeting
|
||||||
|
|
||||||
// intrinsics
|
// intrinsics
|
||||||
double fovy; // y-field of view
|
double fovy; // y-field of view
|
||||||
double ipd; // inter-pupilary distance
|
double ipd; // inter-pupilary distance
|
||||||
float intrinsic[4]; // camera intrinsics (length)
|
float intrinsic[4]; // camera intrinsics (length)
|
||||||
float sensor_size[2]; // sensor size (length)
|
float sensor_size[2]; // sensor size (length)
|
||||||
float resolution[2]; // resolution (pixel)
|
float resolution[2]; // resolution (pixel)
|
||||||
float focal_length[2]; // focal length (length)
|
float focal_length[2]; // focal length (length)
|
||||||
float focal_pixel[2]; // focal length (pixel)
|
float focal_pixel[2]; // focal length (pixel)
|
||||||
float principal_length[2]; // principal point (length)
|
float principal_length[2]; // principal point (length)
|
||||||
float principal_pixel[2]; // principal point (pixel)
|
float principal_pixel[2]; // principal point (pixel)
|
||||||
|
|
||||||
// other
|
// other
|
||||||
mjDouble userdata; // user data
|
mjDouble userdata; // user data
|
||||||
mjString info; // message appended to compiler errors
|
mjString info; // message appended to compiler errors
|
||||||
} mjmCamera;
|
} mjmCamera;
|
||||||
|
|
||||||
|
|
||||||
typedef struct _mjmLight { // light specification
|
typedef struct _mjmLight { // light specification
|
||||||
mjElement element; // internal, do not modify
|
mjElement element; // internal, do not modify
|
||||||
mjString name; // name
|
mjString name; // name
|
||||||
mjString classname; // class name
|
mjString classname; // class name
|
||||||
|
|
||||||
// frame
|
// frame
|
||||||
double pos[3]; // position
|
double pos[3]; // position
|
||||||
double dir[3]; // direction
|
double dir[3]; // direction
|
||||||
mjtCamLight mode; // tracking mode
|
mjtCamLight mode; // tracking mode
|
||||||
mjString targetbody; // target body for targeting
|
mjString targetbody; // target body for targeting
|
||||||
|
|
||||||
// intrinsics
|
// intrinsics
|
||||||
mjtByte active; // is light active
|
mjtByte active; // is light active
|
||||||
mjtByte directional; // is light directional or spot
|
mjtByte directional; // is light directional or spot
|
||||||
mjtByte castshadow; // does light cast shadows
|
mjtByte castshadow; // does light cast shadows
|
||||||
float attenuation[3]; // OpenGL attenuation (quadratic model)
|
float attenuation[3]; // OpenGL attenuation (quadratic model)
|
||||||
float cutoff; // OpenGL cutoff
|
float cutoff; // OpenGL cutoff
|
||||||
float exponent; // OpenGL exponent
|
float exponent; // OpenGL exponent
|
||||||
float ambient[3]; // ambient color
|
float ambient[3]; // ambient color
|
||||||
float diffuse[3]; // diffuse color
|
float diffuse[3]; // diffuse color
|
||||||
float specular[3]; // specular color
|
float specular[3]; // specular color
|
||||||
|
|
||||||
// other
|
// other
|
||||||
mjString info; // message appended to compiler errors
|
mjString info; // message appended to compiler errors
|
||||||
} mjmLight;
|
} mjmLight;
|
||||||
|
|
||||||
|
|
||||||
typedef struct _mjmMaterial { // material specification
|
typedef struct _mjmMaterial { // material specification
|
||||||
mjElement element; // internal, do not modify
|
mjElement element; // internal, do not modify
|
||||||
mjString name; // name
|
mjString name; // name
|
||||||
mjString classname; // class name
|
mjString classname; // class name
|
||||||
mjString texture; // name of texture (empty: none)
|
mjString texture; // name of texture (empty: none)
|
||||||
bool texuniform; // make texture cube uniform
|
bool texuniform; // make texture cube uniform
|
||||||
float texrepeat[2]; // texture repetition for 2D mapping
|
float texrepeat[2]; // texture repetition for 2D mapping
|
||||||
float emission; // emission
|
float emission; // emission
|
||||||
float specular; // specular
|
float specular; // specular
|
||||||
float shininess; // shininess
|
float shininess; // shininess
|
||||||
float reflectance; // reflectance
|
float reflectance; // reflectance
|
||||||
float rgba[4]; // rgba
|
float rgba[4]; // rgba
|
||||||
mjString info; // message appended to compiler errors
|
mjString info; // message appended to compiler errors
|
||||||
} mjmMaterial;
|
} mjmMaterial;
|
||||||
|
|
||||||
|
|
||||||
typedef struct _mjmEquality { // equality specification
|
typedef struct _mjmEquality { // equality specification
|
||||||
mjElement element; // internal, do not modify
|
mjElement element; // internal, do not modify
|
||||||
mjString name; // name
|
mjString name; // name
|
||||||
mjString classname; // class name
|
mjString classname; // class name
|
||||||
mjtEq type; // constraint type
|
mjtEq type; // constraint type
|
||||||
double data[mjNEQDATA]; // type-dependent data
|
double data[mjNEQDATA]; // type-dependent data
|
||||||
mjtByte active; // is equality initially active
|
mjtByte active; // is equality initially active
|
||||||
mjString name1; // name of object 1
|
mjString name1; // name of object 1
|
||||||
mjString name2; // name of object 2
|
mjString name2; // name of object 2
|
||||||
mjtNum solref[mjNREF]; // solver reference
|
mjtNum solref[mjNREF]; // solver reference
|
||||||
mjtNum solimp[mjNIMP]; // solver impedance
|
mjtNum solimp[mjNIMP]; // solver impedance
|
||||||
mjString info; // message appended to errors
|
mjString info; // message appended to errors
|
||||||
} mjmEquality;
|
} mjmEquality;
|
||||||
|
|
||||||
|
|
||||||
@@ -328,82 +328,82 @@ typedef struct _mjmTendon { // tendon specification
|
|||||||
} mjmTendon;
|
} mjmTendon;
|
||||||
|
|
||||||
|
|
||||||
typedef struct _mjmWrap { // wrapping object specification
|
typedef struct _mjmWrap { // wrapping object specification
|
||||||
mjElement element; // internal, do not modify
|
mjElement element; // internal, do not modify
|
||||||
mjString name; // name
|
mjString name; // name
|
||||||
mjString classname; // class name
|
mjString classname; // class name
|
||||||
mjString info; // message appended to errors
|
mjString info; // message appended to errors
|
||||||
} mjmWrap;
|
} mjmWrap;
|
||||||
|
|
||||||
|
|
||||||
typedef struct _mjmActuator { // actuator specification
|
typedef struct _mjmActuator { // actuator specification
|
||||||
mjElement element; // internal, do not modify
|
mjElement element; // internal, do not modify
|
||||||
mjString name; // name
|
mjString name; // name
|
||||||
mjString classname; // class name
|
mjString classname; // class name
|
||||||
|
|
||||||
// gain, bias
|
// gain, bias
|
||||||
mjtGain gaintype; // gain type
|
mjtGain gaintype; // gain type
|
||||||
double gainprm[mjNGAIN]; // gain parameters
|
double gainprm[mjNGAIN]; // gain parameters
|
||||||
mjtBias biastype; // bias type
|
mjtBias biastype; // bias type
|
||||||
double biasprm[mjNGAIN]; // bias parameters
|
double biasprm[mjNGAIN]; // bias parameters
|
||||||
|
|
||||||
// activation state
|
// activation state
|
||||||
mjtDyn dyntype; // dynamics type
|
mjtDyn dyntype; // dynamics type
|
||||||
double dynprm[mjNDYN]; // dynamics parameters
|
double dynprm[mjNDYN]; // dynamics parameters
|
||||||
int actdim; // number of activation variables
|
int actdim; // number of activation variables
|
||||||
int plugin_actdim; // actuator state size for plugins
|
int plugin_actdim; // actuator state size for plugins
|
||||||
mjtByte actearly; // apply next activations to qfrc
|
mjtByte actearly; // apply next activations to qfrc
|
||||||
|
|
||||||
// transmission
|
// transmission
|
||||||
mjtTrn trntype; // transmission type
|
mjtTrn trntype; // transmission type
|
||||||
double gear[6]; // length and transmitted force scaling
|
double gear[6]; // length and transmitted force scaling
|
||||||
mjString target; // name of transmission target
|
mjString target; // name of transmission target
|
||||||
mjString refsite; // reference site, for site transmission
|
mjString refsite; // reference site, for site transmission
|
||||||
mjString slidersite; // site defining cylinder, for slider-crank
|
mjString slidersite; // site defining cylinder, for slider-crank
|
||||||
double cranklength; // crank length, for slider-crank
|
double cranklength; // crank length, for slider-crank
|
||||||
double lengthrange[2]; // transmission length range
|
double lengthrange[2]; // transmission length range
|
||||||
|
|
||||||
// input/output clamping
|
// input/output clamping
|
||||||
int ctrllimited; // are control limits defined: 0 false, 1 true, 2 auto
|
int ctrllimited; // are control limits defined: 0 false, 1 true, 2 auto
|
||||||
double ctrlrange[2]; // control range
|
double ctrlrange[2]; // control range
|
||||||
int forcelimited; // are force limits defined: 0 false, 1 true, 2 auto
|
int forcelimited; // are force limits defined: 0 false, 1 true, 2 auto
|
||||||
double forcerange[2]; // force range
|
double forcerange[2]; // force range
|
||||||
int actlimited; // are activation limits defined: 0 false, 1 true, 2 auto
|
int actlimited; // are activation limits defined: 0 false, 1 true, 2 auto
|
||||||
double actrange[2]; // activation range
|
double actrange[2]; // activation range
|
||||||
|
|
||||||
// other
|
// other
|
||||||
int group; // group
|
int group; // group
|
||||||
mjDouble userdata; // user data
|
mjDouble userdata; // user data
|
||||||
mjmPlugin plugin; // actuator plugin
|
mjmPlugin plugin; // actuator plugin
|
||||||
mjString info; // message appended to compiler errors
|
mjString info; // message appended to compiler errors
|
||||||
} mjmActuator;
|
} mjmActuator;
|
||||||
|
|
||||||
|
|
||||||
typedef struct _mjmSensor { // sensor specfication
|
typedef struct _mjmSensor { // sensor specfication
|
||||||
mjElement element; // internal, do not modify
|
mjElement element; // internal, do not modify
|
||||||
mjString name; // name
|
mjString name; // name
|
||||||
mjString classname; // class name
|
mjString classname; // class name
|
||||||
|
|
||||||
// sensor defintion
|
// sensor defintion
|
||||||
mjtSensor type; // type of sensor
|
mjtSensor type; // type of sensor
|
||||||
mjtObj objtype; // type of sensorized object
|
mjtObj objtype; // type of sensorized object
|
||||||
mjString objname; // name of sensorized object
|
mjString objname; // name of sensorized object
|
||||||
mjtObj reftype; // type of referenced object
|
mjtObj reftype; // type of referenced object
|
||||||
mjString refname; // name of referenced object
|
mjString refname; // name of referenced object
|
||||||
|
|
||||||
// user-defined sensors
|
// user-defined sensors
|
||||||
mjtDataType datatype; // data type for sensor measurement
|
mjtDataType datatype; // data type for sensor measurement
|
||||||
mjtStage needstage; // compute stage needed to simulate sensor
|
mjtStage needstage; // compute stage needed to simulate sensor
|
||||||
int dim; // number of scalar outputs
|
int dim; // number of scalar outputs
|
||||||
|
|
||||||
// output post-processing
|
// output post-processing
|
||||||
double cutoff; // cutoff for real and positive datatypes
|
double cutoff; // cutoff for real and positive datatypes
|
||||||
double noise; // noise stdev
|
double noise; // noise stdev
|
||||||
|
|
||||||
// other
|
// other
|
||||||
mjDouble userdata; // user data
|
mjDouble userdata; // user data
|
||||||
mjmPlugin plugin; // sensor plugin
|
mjmPlugin plugin; // sensor plugin
|
||||||
mjString info; // message appended to compiler errors
|
mjString info; // message appended to compiler errors
|
||||||
} mjmSensor;
|
} mjmSensor;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user