Migrate mjModel size fields from int to mjtSize.

This change updates all size-related members within the `mjModel` struct from `int` to `mjtSize`. This allows MuJoCo to handle models with a larger number of elements. Corresponding changes were made to macros, function signatures, and I/O routines to accommodate the new `mjtSize` type.

PiperOrigin-RevId: 860144595
Change-Id: I701c6d607715d240766b6210a9773cd9e4258c59
This commit is contained in:
Yuval Tassa
2026-01-23 09:40:42 -08:00
committed by Copybara-Service
parent 4a64017a5f
commit 30b903b6c0
24 changed files with 832 additions and 802 deletions
+2 -1
View File
@@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <cinttypes>
#include <chrono>
#include <cstdio>
#include <cstdlib>
@@ -283,7 +284,7 @@ int main(int argc, char** argv) {
solver[m->opt.solver], solto6[m->opt.solver], iterations[0]/nstep);
std::printf(" Contacts / step : %.2f\n", static_cast<float>(contacts[0])/nstep);
std::printf(" Constraints / step : %.2f\n", static_cast<float>(constraints[0])/nstep);
std::printf(" Degrees of freedom : %d\n", m->nv);
std::printf(" Degrees of freedom : %" PRId64 "\n", m->nv);
std::printf(" Dynamic memory usage : %.1f%% of %s\n\n",
100 * d[0]->maxuse_arena / (double)(d[0]->narena),
mju_writeNumBytes(d[0]->narena));