From c7b6e0b8dd6880f89c3f99f52fd08f52d4659a22 Mon Sep 17 00:00:00 2001 From: Yuval Tassa Date: Mon, 27 Jul 2026 10:44:47 -0700 Subject: [PATCH] Fix the array size of `biasprm` in `mjsActuator` specification. Note mjNBIAS == mjNGAIN, this change is a no-op. PiperOrigin-RevId: 954712145 Change-Id: I096246e5d060596c4025ea4c23e8e9e887c8cd50 --- doc/includes/references.h | 2 +- include/mujoco/mjspec.h | 2 +- include/mujoco/mjspecmacro.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/includes/references.h b/doc/includes/references.h index 4410aed4..d3902c53 100644 --- a/doc/includes/references.h +++ b/doc/includes/references.h @@ -2240,7 +2240,7 @@ typedef struct mjsActuator_ { // actuator specification mjtGain gaintype; // gain type double gainprm[mjNGAIN]; // gain parameters mjtBias biastype; // bias type - double biasprm[mjNGAIN]; // bias parameters + double biasprm[mjNBIAS]; // bias parameters // activation state mjtDyn dyntype; // dynamics type diff --git a/include/mujoco/mjspec.h b/include/mujoco/mjspec.h index 8bb782a7..1d682054 100644 --- a/include/mujoco/mjspec.h +++ b/include/mujoco/mjspec.h @@ -718,7 +718,7 @@ typedef struct mjsActuator_ { // actuator specification mjtGain gaintype; // gain type double gainprm[mjNGAIN]; // gain parameters mjtBias biastype; // bias type - double biasprm[mjNGAIN]; // bias parameters + double biasprm[mjNBIAS]; // bias parameters // activation state mjtDyn dyntype; // dynamics type diff --git a/include/mujoco/mjspecmacro.h b/include/mujoco/mjspecmacro.h index 14a47c12..ede71163 100644 --- a/include/mujoco/mjspecmacro.h +++ b/include/mujoco/mjspecmacro.h @@ -492,7 +492,7 @@ X ( mjtGain, gaintype, 1 ) \ XVEC( double, gainprm, mjNGAIN ) \ X ( mjtBias, biastype, 1 ) \ - XVEC( double, biasprm, mjNGAIN ) \ + XVEC( double, biasprm, mjNBIAS ) \ X ( mjtDyn, dyntype, 1 ) \ XVEC( double, dynprm, mjNDYN ) \ X ( int, actdim, 1 ) \