Remove references to deprecated nconmax and njmax.
PiperOrigin-RevId: 809987304 Change-Id: I4109497fe108234dd77011d61eb3ef833e6ae111
This commit is contained in:
committed by
Copybara-Service
parent
4bbe4e5ebc
commit
d616f11508
@@ -279,8 +279,7 @@ void mj_collision(const mjModel* m, mjData* d) {
|
||||
}
|
||||
|
||||
// return if disabled
|
||||
if (mjDISABLED(mjDSBL_CONSTRAINT) || mjDISABLED(mjDSBL_CONTACT)
|
||||
|| m->nconmax == 0 || nbodyflex < 2) {
|
||||
if (mjDISABLED(mjDSBL_CONSTRAINT) || mjDISABLED(mjDSBL_CONTACT) || nbodyflex < 2) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -210,12 +210,6 @@ static int mj_vertBodyWeight(const mjModel* m, const mjData* d, int f, int v,
|
||||
|
||||
// add contact to d->contact list; return 0 if success; 1 if buffer full
|
||||
int mj_addContact(const mjModel* m, mjData* d, const mjContact* con) {
|
||||
// if nconmax is specified and ncon >= nconmax, warn and return error
|
||||
if (m->nconmax != -1 && d->ncon >= m->nconmax) {
|
||||
mj_warning(d, mjWARN_CONTACTFULL, d->ncon);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// move arena pointer back to the end of the existing contact array and invalidate efc_ arrays
|
||||
d->parena = d->ncon * sizeof(mjContact);
|
||||
#ifdef ADDRESS_SANITIZER
|
||||
|
||||
@@ -1302,8 +1302,7 @@ const char* mju_warningText(int warning, size_t info) {
|
||||
|
||||
case mjWARN_CONTACTFULL:
|
||||
mjSNPRINTF(str,
|
||||
"Too many contacts. Either the arena memory is full, or nconmax is specified and is "
|
||||
"exceeded. Increase arena memory allocation, or increase/remove nconmax. "
|
||||
"Too many contacts. The arena memory is full, increase arena memory allocation."
|
||||
"(ncon = %zu)", info);
|
||||
break;
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
<include file="humanoid.xml"/>
|
||||
<compiler autolimits="true" boundmass="1e-05" boundinertia="1e-11" angle="radian" eulerseq="xyz"/>
|
||||
<option timestep="0.001" cone="elliptic" noslip_iterations="5" noslip_tolerance="0"/>
|
||||
<size njmax="1000" nconmax="500"/>
|
||||
<visual>
|
||||
<headlight ambient="0.4 0.4 0.4" diffuse="0.8 0.8 0.8" specular="0.1 0.1 0.1"/>
|
||||
<map znear="0.01"/>
|
||||
|
||||
Reference in New Issue
Block a user