Add mjModel.tendon_armature (in preparation, not yet implemented)

PiperOrigin-RevId: 743649968
Change-Id: I1d893e3e06afc48b652575bc7837750ab3573670
This commit is contained in:
Yuval Tassa
2025-04-03 12:05:30 -07:00
committed by Copybara-Service
parent f96f3e1c22
commit e1f5ceb65a
14 changed files with 140 additions and 11 deletions
+12
View File
@@ -5616,6 +5616,12 @@ void mjCTendon::Compile(void) {
// spatial path
else {
if (armature < 0) {
throw mjCError(this,
"tendon '%s' (id = %d): tendon armature cannot be negative",
name.c_str(), id);
}
switch (path[i]->type) {
case mjWRAP_PULLEY:
// pulley should not follow other pulley
@@ -5657,6 +5663,12 @@ void mjCTendon::Compile(void) {
name.c_str(), id, i);
}
if (armature > 0) {
throw mjCError(this,
"tendon '%s' (id = %d): geom wrapping not supported by tendon armature",
name.c_str(), id);
}
// mark geoms as non visual
model->Geoms()[path[i]->obj->id]->SetNotVisual();
break;