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:
committed by
Copybara-Service
parent
4a64017a5f
commit
30b903b6c0
+5
-1
@@ -203,6 +203,10 @@ auto Compare(unsigned char val1, unsigned char val2) {
|
||||
return val1 != val2;
|
||||
}
|
||||
|
||||
auto Compare(mjtSize val1, mjtSize val2) {
|
||||
return val1 > val2 ? val1 - val2 : val2 - val1;
|
||||
}
|
||||
|
||||
// The maximum spacing between a normalised floating point number x and an
|
||||
// adjacent normalised number is 2 epsilon |x|; a factor 10 is added accounting
|
||||
// for losses during non-idempotent operations such as vector normalizations.
|
||||
@@ -245,7 +249,7 @@ mjtNum CompareModel(const mjModel* m1, const mjModel* m2,
|
||||
field = #name; \
|
||||
} \
|
||||
}
|
||||
MJMODEL_INTS
|
||||
MJMODEL_SIZES
|
||||
#undef X
|
||||
if (maxdif > 0) return maxdif;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user