Compute convex hull for collision pairs.
build / windows-2025 (push) Has been cancelled
build / ubuntu-22.04-clang-13 (push) Has been cancelled
build / ubuntu-22.04-clang-14 (push) Has been cancelled
build / ubuntu-22.04-clang-15 (push) Has been cancelled
build / ubuntu-24.04-clang-16 (push) Has been cancelled
build / ubuntu-24.04-clang-17 (push) Has been cancelled
build / ubuntu-24.04-clang-18 (push) Has been cancelled
build / ubuntu-22.04-gcc-10 (push) Has been cancelled
build / ubuntu-22.04-gcc-11 (push) Has been cancelled
build / ubuntu-22.04-gcc-12 (push) Has been cancelled
build / ubuntu-24.04-gcc-13 (push) Has been cancelled
build / ubuntu-24.04-gcc-14 (push) Has been cancelled
build / macos-15-arm64 (push) Has been cancelled
build / macos-15-x86_64 (push) Has been cancelled
build / windows-2025 (push) Has been cancelled
build / ubuntu-22.04-clang-13 (push) Has been cancelled
build / ubuntu-22.04-clang-14 (push) Has been cancelled
build / ubuntu-22.04-clang-15 (push) Has been cancelled
build / ubuntu-24.04-clang-16 (push) Has been cancelled
build / ubuntu-24.04-clang-17 (push) Has been cancelled
build / ubuntu-24.04-clang-18 (push) Has been cancelled
build / ubuntu-22.04-gcc-10 (push) Has been cancelled
build / ubuntu-22.04-gcc-11 (push) Has been cancelled
build / ubuntu-22.04-gcc-12 (push) Has been cancelled
build / ubuntu-24.04-gcc-13 (push) Has been cancelled
build / ubuntu-24.04-gcc-14 (push) Has been cancelled
build / macos-15-arm64 (push) Has been cancelled
build / macos-15-x86_64 (push) Has been cancelled
PiperOrigin-RevId: 788074030 Change-Id: I3d4bbe71f824db82e998e374d95a5c49995af806
This commit is contained in:
committed by
Copybara-Service
parent
a116653e5f
commit
3434f5d9c7
+16
-2
@@ -4481,11 +4481,25 @@ void mjCModel::TryCompile(mjModel*& m, mjData*& d, const mjVFS* vfs) {
|
||||
// map names to asset references
|
||||
IndexAssets(/*discard=*/false);
|
||||
|
||||
// compile pairs for convex hull check
|
||||
// TODO(quaglino): Consolidate the two calls to pair->Compile() in TryCompile.
|
||||
for (auto pair : pairs_) pair->Compile();
|
||||
|
||||
// mark meshes that need convex hull
|
||||
for (int i=0; i < geoms_.size(); i++) {
|
||||
bool is_in_pair = false;
|
||||
for (const mjCPair* pair : pairs_) {
|
||||
if ((pair->geom1 && pair->geom1->id == geoms_[i]->id) ||
|
||||
(pair->geom2 && pair->geom2->id == geoms_[i]->id)) {
|
||||
is_in_pair = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (geoms_[i]->mesh &&
|
||||
(geoms_[i]->spec.type == mjGEOM_MESH || geoms_[i]->spec.type == mjGEOM_SDF) &&
|
||||
(geoms_[i]->spec.contype || geoms_[i]->spec.conaffinity ||
|
||||
(geoms_[i]->spec.type == mjGEOM_MESH ||
|
||||
geoms_[i]->spec.type == mjGEOM_SDF) &&
|
||||
(geoms_[i]->spec.contype || geoms_[i]->spec.conaffinity || is_in_pair ||
|
||||
geoms_[i]->mesh->spec.inertia == mjMESH_INERTIA_CONVEX)) {
|
||||
geoms_[i]->mesh->SetNeedHull(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user