Add mj_maxContact API function.

PiperOrigin-RevId: 903135055
Change-Id: I5f103c7d51f97e327c923bc567002ace835f5517
This commit is contained in:
Kyle Bayes
2026-04-21 04:02:34 -07:00
committed by Copybara-Service
parent bc5883e82f
commit 3325971840
13 changed files with 448 additions and 21 deletions
+5
View File
@@ -8845,6 +8845,10 @@ void mj_makeM_wrapper(const MjModel& m, MjData& d) {
mj_makeM(m.get(), d.get());
}
int mj_maxContact_wrapper(const MjModel& m, int g1, int g2, int has_margin) {
return mj_maxContact(m.get(), g1, g2, has_margin);
}
void mj_mulJacTVec_wrapper(const MjModel& m, const MjData& d, const val& res, const NumberArray& vec) {
UNPACK_VALUE(mjtNum, res);
UNPACK_ARRAY(mjtNum, vec);
@@ -13173,6 +13177,7 @@ EMSCRIPTEN_BINDINGS(mujoco_bindings) {
function("mj_local2Global", &mj_local2Global_wrapper);
function("mj_makeConstraint", &mj_makeConstraint_wrapper);
function("mj_makeM", &mj_makeM_wrapper);
function("mj_maxContact", &mj_maxContact_wrapper);
function("mj_mulJacTVec", &mj_mulJacTVec_wrapper);
function("mj_mulJacVec", &mj_mulJacVec_wrapper);
function("mj_mulM", &mj_mulM_wrapper);