Fix trilinear flexcomp with unused vertices.

Fix a crash and dimension mismatch issue in user_flexcomp when dealing with interpolated="true" meshes that contain unused vertices. Previously, vertbody would correspond only to used vertices while vert included all vertices, leading to assertions or out-of-bounds access. Also enable node pinning for interpolated meshes.

PiperOrigin-RevId: 865881995
Change-Id: Id150f00f22b5f48896ffbffddf03c57b252de8c0
This commit is contained in:
Alessio Quaglino
2026-02-05 04:40:11 -08:00
committed by Copybara-Service
parent a52180069c
commit 6afd742f43
3 changed files with 98 additions and 4 deletions
+2
View File
@@ -4137,6 +4137,8 @@ void mjCFlex::Compile(const mjVFS* vfs) {
nvert = (int)vert_.size()/3;
if (vertbody_.size() == 1) {
rigid = true;
} else if (vertbody_.size() != nvert) {
throw mjCError(this, "vertbody size must be 1 or nvert");
}
}
if (nvert < dim+1) {