Added a collision midphase on geom pairs using rotated AABBs static trees.
PiperOrigin-RevId: 517357695 Change-Id: I068fee714d9638be2fb6d042d5d86f8ff970635b
This commit is contained in:
committed by
Copybara-Service
parent
47b58f5ccb
commit
70959c1a2c
@@ -246,6 +246,9 @@ struct mjData_ {
|
||||
mjtNum* qLDiagInv; // 1/diag(D) (nv x 1)
|
||||
mjtNum* qLDiagSqrtInv; // 1/sqrt(diag(D)) (nv x 1)
|
||||
|
||||
// computed by mj_collisionTree
|
||||
mjtByte* bvh_active; // volume has been added to collisions (nbvh x 1)
|
||||
|
||||
//-------------------------------- POSITION, VELOCITY dependent
|
||||
|
||||
// computed by mj_fwdVelocity
|
||||
|
||||
@@ -56,8 +56,9 @@ typedef enum mjtDisableBit_ { // disable default feature bitflags
|
||||
mjDSBL_ACTUATION = 1<<10, // apply actuation forces
|
||||
mjDSBL_REFSAFE = 1<<11, // integrator safety: make ref[0]>=2*timestep
|
||||
mjDSBL_SENSOR = 1<<12, // sensors
|
||||
mjDSBL_MIDPHASE = 1<<13, // mid-phase collision filtering
|
||||
|
||||
mjNDISABLE = 13 // number of disable flags
|
||||
mjNDISABLE = 14 // number of disable flags
|
||||
} mjtDisableBit;
|
||||
|
||||
|
||||
@@ -430,6 +431,7 @@ struct mjVisual_ { // visualization options
|
||||
float realtime; // initial real-time factor (1: real time)
|
||||
int offwidth; // width of offscreen buffer
|
||||
int offheight; // height of offscreen buffer
|
||||
int treedepth; // depth of the bounding volume hierarchy
|
||||
} global;
|
||||
|
||||
struct { // rendering quality
|
||||
@@ -533,6 +535,7 @@ struct mjModel_ {
|
||||
int nu; // number of actuators/controls = dim(ctrl)
|
||||
int na; // number of activation states = dim(act)
|
||||
int nbody; // number of bodies
|
||||
int nbvh; // number of total bounding volumes in all bodies
|
||||
int njnt; // number of joints
|
||||
int ngeom; // number of geoms
|
||||
int nsite; // number of sites
|
||||
@@ -635,6 +638,14 @@ struct mjModel_ {
|
||||
mjtNum* body_gravcomp; // antigravity force, units of body weight (nbody x 1)
|
||||
mjtNum* body_user; // user data (nbody x nuser_body)
|
||||
int* body_plugin; // plugin instance id (-1 if not in use) (nbody x 1)
|
||||
int* body_bvhadr; // address of bvh root (nbody x 1)
|
||||
int* body_bvhnum; // number of bounding volumes (nbody x 1)
|
||||
|
||||
// bounding volume hierarchy
|
||||
int* bvh_depth; // depth in the bounding volume hierarchy (nbvh x 1)
|
||||
int* bvh_child; // left and right children in tree (nbvh x 2)
|
||||
int* bvh_geomid; // geom id of the node (non-leaf: -1) (nbvh x 1)
|
||||
mjtNum* bvh_aabb; // bounding box of node (center, size) (nbvh x 6)
|
||||
|
||||
// joints
|
||||
int* jnt_type; // type of joint (mjtJoint) (njnt x 1)
|
||||
@@ -681,6 +692,7 @@ struct mjModel_ {
|
||||
mjtNum* geom_solref; // constraint solver reference: contact (ngeom x mjNREF)
|
||||
mjtNum* geom_solimp; // constraint solver impedance: contact (ngeom x mjNIMP)
|
||||
mjtNum* geom_size; // geom-specific size parameters (ngeom x 3)
|
||||
mjtNum* geom_aabb; // bounding box, (center, size) (ngeom x 6)
|
||||
mjtNum* geom_rbound; // radius of bounding sphere (ngeom x 1)
|
||||
mjtNum* geom_pos; // local position offset rel. to body (ngeom x 3)
|
||||
mjtNum* geom_quat; // local orientation offset rel. to body (ngeom x 4)
|
||||
|
||||
@@ -120,6 +120,7 @@ typedef enum mjtVisFlag_ { // flags enabling model element visualization
|
||||
mjVIS_SELECT, // selection point
|
||||
mjVIS_STATIC, // static bodies
|
||||
mjVIS_SKIN, // skin
|
||||
mjVIS_MIDPHASE, // mid-phase bounding volume hierarchy
|
||||
|
||||
mjNVISFLAG // number of visualization flags
|
||||
} mjtVisFlag;
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
X( nu ) \
|
||||
X( na ) \
|
||||
X( nbody ) \
|
||||
X( nbvh ) \
|
||||
X( njnt ) \
|
||||
X( ngeom ) \
|
||||
X( nsite ) \
|
||||
@@ -176,6 +177,12 @@
|
||||
X( mjtNum, body_gravcomp, nbody, 1 ) \
|
||||
X( mjtNum, body_user, nbody, MJ_M(nuser_body) ) \
|
||||
X( int, body_plugin, nbody, 1 ) \
|
||||
X( int, body_bvhadr, nbody, 1 ) \
|
||||
X( int, body_bvhnum, nbody, 1 ) \
|
||||
X( int, bvh_depth, nbvh, 1 ) \
|
||||
X( int, bvh_child, nbvh, 2 ) \
|
||||
X( int, bvh_geomid, nbvh, 1 ) \
|
||||
X( mjtNum, bvh_aabb, nbvh, 6 ) \
|
||||
X( int, jnt_type, njnt, 1 ) \
|
||||
X( int, jnt_qposadr, njnt, 1 ) \
|
||||
X( int, jnt_dofadr, njnt, 1 ) \
|
||||
@@ -216,6 +223,7 @@
|
||||
X( mjtNum, geom_solref, ngeom, mjNREF ) \
|
||||
X( mjtNum, geom_solimp, ngeom, mjNIMP ) \
|
||||
X( mjtNum, geom_size, ngeom, 3 ) \
|
||||
X( mjtNum, geom_aabb, ngeom, 6 ) \
|
||||
X( mjtNum, geom_rbound, ngeom, 1 ) \
|
||||
X( mjtNum, geom_pos, ngeom, 3 ) \
|
||||
X( mjtNum, geom_quat, ngeom, 4 ) \
|
||||
@@ -502,6 +510,7 @@
|
||||
X( mjtNum, qLD, nM, 1 ) \
|
||||
X( mjtNum, qLDiagInv, nv, 1 ) \
|
||||
X( mjtNum, qLDiagSqrtInv, nv, 1 ) \
|
||||
X( mjtByte, bvh_active, nbvh, 1 ) \
|
||||
X( mjtNum, ten_velocity, ntendon, 1 ) \
|
||||
X( mjtNum, actuator_velocity, nu, 1 ) \
|
||||
X( mjtNum, cvel, nbody, 6 ) \
|
||||
|
||||
Reference in New Issue
Block a user