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
|
// return if disabled
|
||||||
if (mjDISABLED(mjDSBL_CONSTRAINT) || mjDISABLED(mjDSBL_CONTACT)
|
if (mjDISABLED(mjDSBL_CONSTRAINT) || mjDISABLED(mjDSBL_CONTACT) || nbodyflex < 2) {
|
||||||
|| m->nconmax == 0 || nbodyflex < 2) {
|
|
||||||
return;
|
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
|
// 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) {
|
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
|
// move arena pointer back to the end of the existing contact array and invalidate efc_ arrays
|
||||||
d->parena = d->ncon * sizeof(mjContact);
|
d->parena = d->ncon * sizeof(mjContact);
|
||||||
#ifdef ADDRESS_SANITIZER
|
#ifdef ADDRESS_SANITIZER
|
||||||
|
|||||||
@@ -1302,8 +1302,7 @@ const char* mju_warningText(int warning, size_t info) {
|
|||||||
|
|
||||||
case mjWARN_CONTACTFULL:
|
case mjWARN_CONTACTFULL:
|
||||||
mjSNPRINTF(str,
|
mjSNPRINTF(str,
|
||||||
"Too many contacts. Either the arena memory is full, or nconmax is specified and is "
|
"Too many contacts. The arena memory is full, increase arena memory allocation."
|
||||||
"exceeded. Increase arena memory allocation, or increase/remove nconmax. "
|
|
||||||
"(ncon = %zu)", info);
|
"(ncon = %zu)", info);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
<include file="humanoid.xml"/>
|
<include file="humanoid.xml"/>
|
||||||
<compiler autolimits="true" boundmass="1e-05" boundinertia="1e-11" angle="radian" eulerseq="xyz"/>
|
<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"/>
|
<option timestep="0.001" cone="elliptic" noslip_iterations="5" noslip_tolerance="0"/>
|
||||||
<size njmax="1000" nconmax="500"/>
|
|
||||||
<visual>
|
<visual>
|
||||||
<headlight ambient="0.4 0.4 0.4" diffuse="0.8 0.8 0.8" specular="0.1 0.1 0.1"/>
|
<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"/>
|
<map znear="0.01"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user