Add vertex equality option.
PiperOrigin-RevId: 860299454 Change-Id: I7befd8e5f4c8bac6d74684a96a9cc3cee9ae1e29
This commit is contained in:
committed by
Copybara-Service
parent
a5de40b400
commit
7da271c687
@@ -5995,7 +5995,7 @@ void mjCEquality::ResolveReferences(const mjCModel* m) {
|
||||
object_type = mjOBJ_JOINT;
|
||||
} else if (type == mjEQ_TENDON) {
|
||||
object_type = mjOBJ_TENDON;
|
||||
} else if (type == mjEQ_FLEX) {
|
||||
} else if (type == mjEQ_FLEX || type == mjEQ_FLEXVERT) {
|
||||
object_type = mjOBJ_FLEX;
|
||||
} else {
|
||||
throw mjCError(this, "invalid type in equality constraint");
|
||||
@@ -6052,7 +6052,7 @@ void mjCEquality::Compile(void) {
|
||||
ResolveReferences(model);
|
||||
|
||||
// make sure flex is not rigid
|
||||
if (type == mjEQ_FLEX && model->Flexes()[obj1id]->rigid) {
|
||||
if ((type == mjEQ_FLEX || type == mjEQ_FLEXVERT) && model->Flexes()[obj1id]->rigid) {
|
||||
throw mjCError(this, "rigid flex '%s' in equality constraint %d", name1_.c_str(), id);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user