Disable contact in the temporary mjData created during mjCModel::TryCompile.
PiperOrigin-RevId: 478793238 Change-Id: I28ed324b70931eb416ca57574570bf02c977f337
This commit is contained in:
committed by
Copybara-Service
parent
bc1490b7a8
commit
5ef8cb6bbc
@@ -2673,6 +2673,8 @@ void mjCModel::TryCompile(mjModel*& m, mjData*& d, const mjVFS* vfs) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create data
|
// create data
|
||||||
|
int disableflags = m->opt.disableflags;
|
||||||
|
m->opt.disableflags |= mjDSBL_CONTACT;
|
||||||
d = mj_makeData(m);
|
d = mj_makeData(m);
|
||||||
if (!d) {
|
if (!d) {
|
||||||
throw mjCError(0, "could not create mjData");
|
throw mjCError(0, "could not create mjData");
|
||||||
@@ -2710,6 +2712,7 @@ void mjCModel::TryCompile(mjModel*& m, mjData*& d, const mjVFS* vfs) {
|
|||||||
|
|
||||||
// delete data
|
// delete data
|
||||||
mj_deleteData(d);
|
mj_deleteData(d);
|
||||||
|
m->opt.disableflags = disableflags;
|
||||||
d = nullptr;
|
d = nullptr;
|
||||||
|
|
||||||
// pass warning back
|
// pass warning back
|
||||||
|
|||||||
Reference in New Issue
Block a user