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
+3 -2
View File
@@ -551,7 +551,7 @@ void mj_printFormattedModel(const mjModel* m, const char* filename, const char*
fprintf(fp, "\n"); \
}
MJMODEL_INTS
MJMODEL_SIZES
#undef X
fprintf(fp, "\n");
@@ -636,7 +636,7 @@ void mj_printFormattedModel(const mjModel* m, const char* filename, const char*
(void)nu;
(void)nmocap;
const int* object_class;
const mjtSize* object_class;
#define X(type, name, num, sz) \
if (&m->num == object_class && sz > 0) { \
@@ -645,6 +645,7 @@ void mj_printFormattedModel(const mjModel* m, const char* filename, const char*
float: float_format, \
int: INT_FORMAT, \
mjtByte: INT_FORMAT, \
mjtSize: SIZE_FORMAT, \
default: NULL); \
if (format) { \
fprintf(fp, " "); \