From 5ef8cb6bbc5c90499c9864f86e21235417b8db7b Mon Sep 17 00:00:00 2001 From: Saran Tunyasuvunakool Date: Tue, 4 Oct 2022 08:20:17 -0700 Subject: [PATCH] Disable contact in the temporary mjData created during mjCModel::TryCompile. PiperOrigin-RevId: 478793238 Change-Id: I28ed324b70931eb416ca57574570bf02c977f337 --- src/user/user_model.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/user/user_model.cc b/src/user/user_model.cc index 7a875ee6..2eb0881f 100644 --- a/src/user/user_model.cc +++ b/src/user/user_model.cc @@ -2673,6 +2673,8 @@ void mjCModel::TryCompile(mjModel*& m, mjData*& d, const mjVFS* vfs) { } // create data + int disableflags = m->opt.disableflags; + m->opt.disableflags |= mjDSBL_CONTACT; d = mj_makeData(m); if (!d) { throw mjCError(0, "could not create mjData"); @@ -2710,6 +2712,7 @@ void mjCModel::TryCompile(mjModel*& m, mjData*& d, const mjVFS* vfs) { // delete data mj_deleteData(d); + m->opt.disableflags = disableflags; d = nullptr; // pass warning back