Add mjtSameFrame enum to specify frame alignment of bodies with their children.
PiperOrigin-RevId: 666303674 Change-Id: I53dc56e1ca52afa280ae5abaf4158edc465fb1e0
This commit is contained in:
committed by
Copybara-Service
parent
a2649d6cec
commit
8b03daa09b
@@ -373,6 +373,13 @@ typedef enum mjtDataType_ { // data type for sensors
|
||||
} mjtDataType;
|
||||
|
||||
|
||||
typedef enum mjtSameFrame_ { // frame alignment of bodies with their children
|
||||
mjSAMEFRAME_NONE = 0, // no alignment
|
||||
mjSAMEFRAME_BODY, // frame is same as body frame
|
||||
mjSAMEFRAME_INERTIA, // frame is same as inertial frame
|
||||
} mjtSameFrame;
|
||||
|
||||
|
||||
typedef enum mjtLRMode_ { // mode for actuator length range computation
|
||||
mjLRMODE_NONE = 0, // do not process any actuators
|
||||
mjLRMODE_MUSCLE, // process muscle actuators
|
||||
@@ -692,7 +699,7 @@ struct mjModel_ {
|
||||
int* body_geomnum; // number of geoms (nbody x 1)
|
||||
int* body_geomadr; // start addr of geoms; -1: no geoms (nbody x 1)
|
||||
mjtByte* body_simple; // 1: diag M; 2: diag M, sliders only (nbody x 1)
|
||||
mjtByte* body_sameframe; // inertial frame is same as body frame (nbody x 1)
|
||||
mjtByte* body_sameframe; // same frame as inertia (mjtSameframe) (nbody x 1)
|
||||
mjtNum* body_pos; // position offset rel. to parent body (nbody x 3)
|
||||
mjtNum* body_quat; // orientation offset rel. to parent body (nbody x 4)
|
||||
mjtNum* body_ipos; // local position of center of mass (nbody x 3)
|
||||
@@ -761,7 +768,7 @@ struct mjModel_ {
|
||||
int* geom_group; // group for visibility (ngeom x 1)
|
||||
int* geom_priority; // geom contact priority (ngeom x 1)
|
||||
int* geom_plugin; // plugin instance id; -1: not in use (ngeom x 1)
|
||||
mjtByte* geom_sameframe; // same as body frame (1) or iframe (2) (ngeom x 1)
|
||||
mjtByte* geom_sameframe; // same frame as body (mjtSameframe) (ngeom x 1)
|
||||
mjtNum* geom_solmix; // mixing coef for solref/imp in geom pair (ngeom x 1)
|
||||
mjtNum* geom_solref; // constraint solver reference: contact (ngeom x mjNREF)
|
||||
mjtNum* geom_solimp; // constraint solver impedance: contact (ngeom x mjNIMP)
|
||||
@@ -782,7 +789,7 @@ struct mjModel_ {
|
||||
int* site_bodyid; // id of site's body (nsite x 1)
|
||||
int* site_matid; // material id for rendering; -1: none (nsite x 1)
|
||||
int* site_group; // group for visibility (nsite x 1)
|
||||
mjtByte* site_sameframe; // same as body frame (1) or iframe (2) (nsite x 1)
|
||||
mjtByte* site_sameframe; // same frame as body (mjtSameframe) (nsite x 1)
|
||||
mjtNum* site_size; // geom size for rendering (nsite x 3)
|
||||
mjtNum* site_pos; // local position offset rel. to body (nsite x 3)
|
||||
mjtNum* site_quat; // local orientation offset rel. to body (nsite x 4)
|
||||
|
||||
@@ -507,7 +507,7 @@ MJAPI void mj_integratePos(const mjModel* m, mjtNum* qpos, const mjtNum* qvel, m
|
||||
// Normalize all quaternions in qpos-type vector.
|
||||
MJAPI void mj_normalizeQuat(const mjModel* m, mjtNum* qpos);
|
||||
|
||||
// Map from body local to global Cartesian coordinates.
|
||||
// Map from body local to global Cartesian coordinates, sameframe takes values from mjtSameFrame.
|
||||
MJAPI void mj_local2Global(mjData* d, mjtNum xpos[3], mjtNum xmat[9], const mjtNum pos[3],
|
||||
const mjtNum quat[4], int body, mjtByte sameframe);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user