From 8faf47dd16f77651cc4323e3bd25e881f125899b Mon Sep 17 00:00:00 2001 From: Kevin Zakka Date: Tue, 12 Sep 2023 12:53:57 -0700 Subject: [PATCH] BEGIN_PUBLIC Add missing `ctrl` attribute to keyframe indexer. END_PUBLIC Context: Making an LQR notebook for the Skydio drone and wanted to read the ctrl attribute in the keyframe stored in the XML. PiperOrigin-RevId: 564806350 Change-Id: I5af3189cc8be87915f9d320d95f0fab551ef87fa --- python/mujoco/indexer_xmacro.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/mujoco/indexer_xmacro.h b/python/mujoco/indexer_xmacro.h index bc462853..9e4c32a7 100644 --- a/python/mujoco/indexer_xmacro.h +++ b/python/mujoco/indexer_xmacro.h @@ -281,7 +281,8 @@ X( mjtNum, key_, qvel, nkey, MJ_M(nv) ) \ X( mjtNum, key_, act, nkey, MJ_M(na) ) \ X( mjtNum, key_, mpos, nkey, MJ_M(nmocap)*3 ) \ - X( mjtNum, key_, mquat, nkey, MJ_M(nmocap)*4 ) + X( mjtNum, key_, mquat, nkey, MJ_M(nmocap)*4 ) \ + X( mjtNum, key_, ctrl, nkey, MJ_M(nu) ) #define MJMODEL_VIEW_GROUPS \ XGROUP( MjModelActuatorViews, actuator, nu, MJMODEL_ACTUATOR ) \