Improve mjContact documentation. Fixes #1136
PiperOrigin-RevId: 579836970 Change-Id: Ife8dd73eecdbdaacecc1e48460cf6efcf4f7b487
This commit is contained in:
committed by
Copybara-Service
parent
dafd041ad8
commit
8a5e2b19a8
@@ -84,7 +84,7 @@ struct mjContact_ { // result of collision detection functions
|
|||||||
// contact parameters set by near-phase collision function
|
// contact parameters set by near-phase collision function
|
||||||
mjtNum dist; // distance between nearest points; neg: penetration
|
mjtNum dist; // distance between nearest points; neg: penetration
|
||||||
mjtNum pos[3]; // position of contact point: midpoint between geoms
|
mjtNum pos[3]; // position of contact point: midpoint between geoms
|
||||||
mjtNum frame[9]; // normal is in [0-2]
|
mjtNum frame[9]; // normal is in [0-2], points from geom[0] to geom[1]
|
||||||
|
|
||||||
// contact parameters set by mj_collideGeoms
|
// contact parameters set by mj_collideGeoms
|
||||||
mjtNum includemargin; // include if dist<includemargin=margin-gap
|
mjtNum includemargin; // include if dist<includemargin=margin-gap
|
||||||
@@ -99,8 +99,8 @@ struct mjContact_ { // result of collision detection functions
|
|||||||
|
|
||||||
// contact descriptors set by mj_collideXXX
|
// contact descriptors set by mj_collideXXX
|
||||||
int dim; // contact space dimensionality: 1, 3, 4 or 6
|
int dim; // contact space dimensionality: 1, 3, 4 or 6
|
||||||
int geom1; // id of geom 1
|
int geom1; // id of geom 1; deprecated, use geom[0]
|
||||||
int geom2; // id of geom 2
|
int geom2; // id of geom 2; deprecated, use geom[1]
|
||||||
int geom[2]; // geom ids; -1 for flex
|
int geom[2]; // geom ids; -1 for flex
|
||||||
int flex[2]; // flex ids; -1 for geom
|
int flex[2]; // flex ids; -1 for geom
|
||||||
int elem[2]; // element ids; -1 for geom or flex vertex
|
int elem[2]; // element ids; -1 for geom or flex vertex
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ struct mjContact_ { // result of collision detection functions
|
|||||||
// contact parameters set by near-phase collision function
|
// contact parameters set by near-phase collision function
|
||||||
mjtNum dist; // distance between nearest points; neg: penetration
|
mjtNum dist; // distance between nearest points; neg: penetration
|
||||||
mjtNum pos[3]; // position of contact point: midpoint between geoms
|
mjtNum pos[3]; // position of contact point: midpoint between geoms
|
||||||
mjtNum frame[9]; // normal is in [0-2]
|
mjtNum frame[9]; // normal is in [0-2], points from geom[0] to geom[1]
|
||||||
|
|
||||||
// contact parameters set by mj_collideGeoms
|
// contact parameters set by mj_collideGeoms
|
||||||
mjtNum includemargin; // include if dist<includemargin=margin-gap
|
mjtNum includemargin; // include if dist<includemargin=margin-gap
|
||||||
@@ -115,8 +115,8 @@ struct mjContact_ { // result of collision detection functions
|
|||||||
|
|
||||||
// contact descriptors set by mj_collideXXX
|
// contact descriptors set by mj_collideXXX
|
||||||
int dim; // contact space dimensionality: 1, 3, 4 or 6
|
int dim; // contact space dimensionality: 1, 3, 4 or 6
|
||||||
int geom1; // id of geom 1
|
int geom1; // id of geom 1; deprecated, use geom[0]
|
||||||
int geom2; // id of geom 2
|
int geom2; // id of geom 2; deprecated, use geom[1]
|
||||||
int geom[2]; // geom ids; -1 for flex
|
int geom[2]; // geom ids; -1 for flex
|
||||||
int flex[2]; // flex ids; -1 for geom
|
int flex[2]; // flex ids; -1 for geom
|
||||||
int elem[2]; // element ids; -1 for geom or flex vertex
|
int elem[2]; // element ids; -1 for geom or flex vertex
|
||||||
|
|||||||
@@ -3871,7 +3871,7 @@ STRUCTS: Mapping[str, StructDecl] = dict([
|
|||||||
inner_type=ValueType(name='mjtNum'),
|
inner_type=ValueType(name='mjtNum'),
|
||||||
extents=(9,),
|
extents=(9,),
|
||||||
),
|
),
|
||||||
doc='normal is in [0-2]',
|
doc='normal is in [0-2], points from geom[0] to geom[1]',
|
||||||
),
|
),
|
||||||
StructFieldDecl(
|
StructFieldDecl(
|
||||||
name='includemargin',
|
name='includemargin',
|
||||||
@@ -3931,12 +3931,12 @@ STRUCTS: Mapping[str, StructDecl] = dict([
|
|||||||
StructFieldDecl(
|
StructFieldDecl(
|
||||||
name='geom1',
|
name='geom1',
|
||||||
type=ValueType(name='int'),
|
type=ValueType(name='int'),
|
||||||
doc='id of geom 1',
|
doc='id of geom 1; deprecated, use geom[0]',
|
||||||
),
|
),
|
||||||
StructFieldDecl(
|
StructFieldDecl(
|
||||||
name='geom2',
|
name='geom2',
|
||||||
type=ValueType(name='int'),
|
type=ValueType(name='int'),
|
||||||
doc='id of geom 2',
|
doc='id of geom 2; deprecated, use geom[1]',
|
||||||
),
|
),
|
||||||
StructFieldDecl(
|
StructFieldDecl(
|
||||||
name='geom',
|
name='geom',
|
||||||
|
|||||||
Reference in New Issue
Block a user