Change MuJoCo engine source code function-spacing convention from 3 blank lines to 2
PiperOrigin-RevId: 813754244 Change-Id: I6836e41c3b021cb727e922c25c60f629b9814c93
This commit is contained in:
committed by
Copybara-Service
parent
c439628f82
commit
edbdb5195c
@@ -48,7 +48,6 @@ int mj_isPyramidal(const mjModel* m) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
//-------------------------- sparse chains ---------------------------------------------------------
|
||||
|
||||
// merge dof chains for two bodies
|
||||
@@ -95,7 +94,6 @@ int mj_mergeChain(const mjModel* m, int* chain, int b1, int b2) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
// merge dof chains for two simple bodies
|
||||
int mj_mergeChainSimple(const mjModel* m, int* chain, int b1, int b2) {
|
||||
// swap bodies if wrong order
|
||||
@@ -127,7 +125,6 @@ int mj_mergeChainSimple(const mjModel* m, int* chain, int b1, int b2) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
// get body chain
|
||||
int mj_bodyChain(const mjModel* m, int body, int* chain) {
|
||||
// simple body
|
||||
@@ -173,7 +170,6 @@ int mj_bodyChain(const mjModel* m, int body, int* chain) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
//-------------------------- Jacobians -------------------------------------------------------------
|
||||
|
||||
// compute 3/6-by-nv Jacobian of global point attached to given body
|
||||
@@ -230,21 +226,18 @@ void mj_jac(const mjModel* m, const mjData* d,
|
||||
}
|
||||
|
||||
|
||||
|
||||
// compute body Jacobian
|
||||
void mj_jacBody(const mjModel* m, const mjData* d, mjtNum* jacp, mjtNum* jacr, int body) {
|
||||
mj_jac(m, d, jacp, jacr, d->xpos+3*body, body);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// compute body-com Jacobian
|
||||
void mj_jacBodyCom(const mjModel* m, const mjData* d, mjtNum* jacp, mjtNum* jacr, int body) {
|
||||
mj_jac(m, d, jacp, jacr, d->xipos+3*body, body);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// compute subtree-com Jacobian
|
||||
void mj_jacSubtreeCom(const mjModel* m, mjData* d, mjtNum* jacp, int body) {
|
||||
int nv = m->nv;
|
||||
@@ -273,21 +266,18 @@ void mj_jacSubtreeCom(const mjModel* m, mjData* d, mjtNum* jacp, int body) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
// compute geom Jacobian
|
||||
void mj_jacGeom(const mjModel* m, const mjData* d, mjtNum* jacp, mjtNum* jacr, int geom) {
|
||||
mj_jac(m, d, jacp, jacr, d->geom_xpos + 3*geom, m->geom_bodyid[geom]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// compute site Jacobian
|
||||
void mj_jacSite(const mjModel* m, const mjData* d, mjtNum* jacp, mjtNum* jacr, int site) {
|
||||
mj_jac(m, d, jacp, jacr, d->site_xpos + 3*site, m->site_bodyid[site]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// compute translation Jacobian of point, and rotation Jacobian of axis
|
||||
void mj_jacPointAxis(const mjModel* m, mjData* d, mjtNum* jacPoint, mjtNum* jacAxis,
|
||||
const mjtNum point[3], const mjtNum axis[3], int body) {
|
||||
@@ -312,7 +302,6 @@ void mj_jacPointAxis(const mjModel* m, mjData* d, mjtNum* jacPoint, mjtNum* jacA
|
||||
}
|
||||
|
||||
|
||||
|
||||
// compute 3/6-by-nv sparse Jacobian of global point attached to given body
|
||||
void mj_jacSparse(const mjModel* m, const mjData* d,
|
||||
mjtNum* jacp, mjtNum* jacr, const mjtNum* point, int body,
|
||||
@@ -382,7 +371,6 @@ void mj_jacSparse(const mjModel* m, const mjData* d,
|
||||
}
|
||||
|
||||
|
||||
|
||||
// sparse Jacobian difference for simple body contacts
|
||||
void mj_jacSparseSimple(const mjModel* m, const mjData* d,
|
||||
mjtNum* jacdifp, mjtNum* jacdifr, const mjtNum* point,
|
||||
@@ -445,7 +433,6 @@ void mj_jacSparseSimple(const mjModel* m, const mjData* d,
|
||||
}
|
||||
|
||||
|
||||
|
||||
// dense or sparse Jacobian difference for two body points: pos2 - pos1, global
|
||||
int mj_jacDifPair(const mjModel* m, const mjData* d, int* chain,
|
||||
int b1, int b2, const mjtNum pos1[3], const mjtNum pos2[3],
|
||||
@@ -522,7 +509,6 @@ int mj_jacDifPair(const mjModel* m, const mjData* d, int* chain,
|
||||
}
|
||||
|
||||
|
||||
|
||||
// dense or sparse weighted sum of multiple body Jacobians at same point
|
||||
int mj_jacSum(const mjModel* m, mjData* d, int* chain,
|
||||
int n, const int* body, const mjtNum* weight,
|
||||
@@ -596,7 +582,6 @@ int mj_jacSum(const mjModel* m, mjData* d, int* chain,
|
||||
}
|
||||
|
||||
|
||||
|
||||
// compute 3/6-by-nv Jacobian time derivative of global point attached to given body
|
||||
void mj_jacDot(const mjModel* m, const mjData* d,
|
||||
mjtNum* jacp, mjtNum* jacr, const mjtNum point[3], int body) {
|
||||
@@ -672,7 +657,6 @@ void mj_jacDot(const mjModel* m, const mjData* d,
|
||||
}
|
||||
|
||||
|
||||
|
||||
// compute subtree angular momentum matrix
|
||||
void mj_angmomMat(const mjModel* m, mjData* d, mjtNum* mat, int body) {
|
||||
int nv = m->nv;
|
||||
@@ -742,7 +726,6 @@ void mj_angmomMat(const mjModel* m, mjData* d, mjtNum* mat, int body) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
// count warnings, print only the first time
|
||||
void mj_warning(mjData* d, int warning, int info) {
|
||||
// check type
|
||||
@@ -764,8 +747,6 @@ void mj_warning(mjData* d, int warning, int info) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// compute object 6D velocity in object-centered frame, world/local orientation
|
||||
void mj_objectVelocity(const mjModel* m, const mjData* d,
|
||||
int objtype, int objid, mjtNum res[6], int flg_local) {
|
||||
@@ -817,7 +798,6 @@ void mj_objectVelocity(const mjModel* m, const mjData* d,
|
||||
}
|
||||
|
||||
|
||||
|
||||
// compute object 6D acceleration in object-centered frame, world/local orientation
|
||||
void mj_objectAcceleration(const mjModel* m, const mjData* d,
|
||||
int objtype, int objid, mjtNum res[6], int flg_local) {
|
||||
@@ -943,4 +923,3 @@ void mj_local2Global(mjData* d, mjtNum xpos[3], mjtNum xmat[9],
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user