Mocap bodies are the weld root of their own kinematic subtree.

PiperOrigin-RevId: 960212286
Change-Id: Ibeff129c3110576c8846c76ba6ab756f23c0fa2e
This commit is contained in:
Yuval Tassa
2026-08-06 04:09:41 -07:00
committed by Copybara-Service
parent 0accc5b3c7
commit ed13bf5647
19 changed files with 260 additions and 63 deletions
@@ -64,8 +64,8 @@ static float GetPlaneTileSize(const mjModel* model, int matid,
}
static mjtCatBit GetBodyCategory(const mjModel* m, int bodyid) {
if (m->body_weldid[bodyid] == 0 &&
m->body_mocapid[m->body_rootid[bodyid]] == -1) {
// mocap subtrees are their own weld, hence not static
if (m->body_weldid[bodyid] == 0) {
return mjCAT_STATIC;
} else {
return mjCAT_DYNAMIC;