Rename inteval attribute in mjLROpt to interval.

PiperOrigin-RevId: 509275105
Change-Id: I0ffb9cf485a504843ed255f0b4f24e9285a1c273
This commit is contained in:
Saran Tunyasuvunakool
2023-02-13 10:53:20 -08:00
committed by Copybara-Service
parent db28c31f05
commit ace5b74f83
10 changed files with 14 additions and 13 deletions
+2 -2
View File
@@ -297,7 +297,7 @@ disable length range computations altogether, include this element and set mode=
:at:`inttotal`: :at-val:`real, "10"`
The total time interval (in seconds) for running the internal simulation, for each actuator and actuator direction.
Each simulation is initialized at qpos0. It is expected to settle after inttotal time has passed.
:at:`inteval`: :at-val:`real, "2"`
:at:`interval`: :at-val:`real, "2"`
The time interval at the end of the simulation over which length data is collected and analyzed. The maximum (or
respectively minimum) length achieved during this interval is recorded. The difference between the maximum and
minimum is also recorded and is used as a measure of divergence. If the simulation settles, this difference will be
@@ -308,7 +308,7 @@ disable length range computations altogether, include this element and set mode=
prevent actuators from having infinite length.
:at:`tolrange`: :at-val:`real, "0.05"`
This determines the threshold for detecting divergence and generating a compiler error. The range of actuator lengths
observed during inteval is divided by the overall range computed via simulation. If that value is larger than
observed during interval is divided by the overall range computed via simulation. If that value is larger than
tolrange, a compiler error is generated. So one way to suppress compiler errors is to simply make this attribute
larger, but in that case the results could be inaccurate.
+1 -1
View File
@@ -33,7 +33,7 @@
| | | +-------------------------+-------------------------+-------------------------+ |
| | | | :at:`accel` | :at:`maxforce` | :at:`timeconst` | |
| | | +-------------------------+-------------------------+-------------------------+ |
| | | | :at:`timestep` | :at:`inttotal` | :at:`inteval` | |
| | | | :at:`timestep` | :at:`inttotal` | :at:`interval` | |
| | | +-------------------------+-------------------------+-------------------------+ |
| | | | :at:`tolrange` | | | |
| | | +-------------------------+-------------------------+-------------------------+ |
+1
View File
@@ -9,6 +9,7 @@ General
^^^^^^^
- The ``mjd_transitionFD`` function no longer triggers sensor calculation unless explicitly requested.
- Corrected the spelling of the ``inteval`` attribute to ``interval`` in the ``mjLROpt`` struct.
Python bindings
^^^^^^^^^^^^^^^
+2 -2
View File
@@ -586,13 +586,13 @@ struct mjLROpt_ { // options for mj_setLengthRange()
mjtNum timeconst; // time constant for velocity reduction; min 0.01
mjtNum timestep; // simulation timestep; 0: use mjOption.timestep
mjtNum inttotal; // total simulation time interval
mjtNum inteval; // evaluation time interval (at the end)
mjtNum interval; // evaluation time interval (at the end)
mjtNum tolrange; // convergence tolerance (relative to range)
};
typedef struct mjLROpt_ mjLROpt;
struct mjVFS_ { // virtual file system for loading from memory
int nfile; // number of files present
char filename[mjMAXVFS][mjMAXVFSNAME]; // file name without path
char filename[mjMAXVFS][mjMAXVFSNAME]; // file name without path
int filesize[mjMAXVFS]; // file size in bytes
void* filedata[mjMAXVFS]; // buffer with file data
};
+2 -2
View File
@@ -362,7 +362,7 @@ struct mjLROpt_ { // options for mj_setLengthRange()
mjtNum timeconst; // time constant for velocity reduction; min 0.01
mjtNum timestep; // simulation timestep; 0: use mjOption.timestep
mjtNum inttotal; // total simulation time interval
mjtNum inteval; // evaluation time interval (at the end)
mjtNum interval; // evaluation time interval (at the end)
mjtNum tolrange; // convergence tolerance (relative to range)
};
typedef struct mjLROpt_ mjLROpt;
@@ -372,7 +372,7 @@ typedef struct mjLROpt_ mjLROpt;
struct mjVFS_ { // virtual file system for loading from memory
int nfile; // number of files present
char filename[mjMAXVFS][mjMAXVFSNAME]; // file name without path
char filename[mjMAXVFS][mjMAXVFSNAME]; // file name without path
int filesize[mjMAXVFS]; // file size in bytes
void* filedata[mjMAXVFS]; // buffer with file data
};
+1 -1
View File
@@ -1940,7 +1940,7 @@ This is useful for example when the MJB is not available as a file on disk.)"));
X(timeconst);
X(timestep);
X(inttotal);
X(inteval);
X(interval);
X(tolrange);
#undef X
+1 -1
View File
@@ -50,7 +50,7 @@ void mj_defaultLROpt(mjLROpt* opt) {
opt->timeconst = 1;
opt->timestep = 0.01;
opt->inttotal = 10;
opt->inteval = 2;
opt->interval = 2;
opt->tolrange = 0.05;
}
+1 -1
View File
@@ -508,7 +508,7 @@ int mj_setLengthRange(mjModel* m, mjData* d, int index,
}
// update limits
if (d->time > opt->inttotal-opt->inteval) {
if (d->time > opt->inttotal-opt->interval) {
if (len<lmin[side] || !updated) {
lmin[side] = len;
}
+2 -2
View File
@@ -91,7 +91,7 @@ static const char* MJCF[nMJCF][mjXATTRNUM] = {
{"<"},
{"lengthrange", "?", "10", "mode", "useexisting", "uselimit",
"accel", "maxforce", "timeconst", "timestep",
"inttotal", "inteval", "tolrange"},
"inttotal", "interval", "tolrange"},
{">"},
{"option", "*", "22",
@@ -923,7 +923,7 @@ void mjXReader::Compiler(XMLElement* section, mjCModel* mod) {
ReadAttr(elem, "timeconst", 1, &opt->timeconst, text);
ReadAttr(elem, "timestep", 1, &opt->timestep, text);
ReadAttr(elem, "inttotal", 1, &opt->inttotal, text);
ReadAttr(elem, "inteval", 1, &opt->inteval, text);
ReadAttr(elem, "interval", 1, &opt->interval, text);
ReadAttr(elem, "tolrange", 1, &opt->tolrange, text);
}
}
+1 -1
View File
@@ -1706,7 +1706,7 @@ public unsafe struct mjLROpt_ {
public double timeconst;
public double timestep;
public double inttotal;
public double inteval;
public double interval;
public double tolrange;
}