Implement mesh extrema in a 3x3x3 grid corresponding to each feature of a unit cube. These are used as seeds for a better initial point in mesh hill climbing with up to a 2x speedup in mjc_Convex.

PiperOrigin-RevId: 959645299
Change-Id: I032ae534704e0cc440ddb7691fd21a29a359f521
This commit is contained in:
Kyle Bayes
2026-08-05 07:22:01 -07:00
committed by Copybara-Service
parent 1362a8bded
commit 83e621d771
14 changed files with 2708 additions and 2 deletions
+1
View File
@@ -5122,6 +5122,7 @@ EMSCRIPTEN_BINDINGS(mujoco_bindings) {
.property("mat_texuniform", &MjModel::mat_texuniform)
.property("mesh_bvhadr", &MjModel::mesh_bvhadr)
.property("mesh_bvhnum", &MjModel::mesh_bvhnum)
.property("mesh_extrema", &MjModel::mesh_extrema)
.property("mesh_face", &MjModel::mesh_face)
.property("mesh_faceadr", &MjModel::mesh_faceadr)
.property("mesh_facenormal", &MjModel::mesh_facenormal)
+3
View File
@@ -5100,6 +5100,9 @@ struct MjModel {
emscripten::val mesh_graphadr() const {
return emscripten::val(emscripten::typed_memory_view(ptr_->nmesh, ptr_->mesh_graphadr));
}
emscripten::val mesh_extrema() const {
return emscripten::val(emscripten::typed_memory_view(ptr_->nmesh * 27, ptr_->mesh_extrema));
}
emscripten::val mesh_vert() const {
return emscripten::val(emscripten::typed_memory_view(ptr_->nmeshvert * 3, ptr_->mesh_vert));
}