From 98478f88110e47aeb98dc609085c7a32677916a9 Mon Sep 17 00:00:00 2001 From: Saran Tunyasuvunakool Date: Mon, 21 Oct 2024 12:28:26 -0700 Subject: [PATCH] Minor changes to inline comments in mjModel and mjData headers. PiperOrigin-RevId: 688231631 Change-Id: Iae5430142cab256a73a0fb8c698992ceba21b28c --- doc/includes/references.h | 8 ++++---- include/mujoco/mjdata.h | 4 ++-- include/mujoco/mjmodel.h | 4 ++-- introspect/structs.py | 10 +++++----- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/doc/includes/references.h b/doc/includes/references.h index 457dc11b..820e571e 100644 --- a/doc/includes/references.h +++ b/doc/includes/references.h @@ -256,8 +256,8 @@ struct mjData_ { int* ten_J_colind; // column indices in sparse Jacobian (ntendon x nv) mjtNum* ten_J; // tendon Jacobian (ntendon x nv) mjtNum* ten_length; // tendon lengths (ntendon x 1) - int* wrap_obj; // geom id; -1: site; -2: pulley (nwrap*2 x 1) - mjtNum* wrap_xpos; // Cartesian 3D points in all path (nwrap*2 x 3) + int* wrap_obj; // geom id; -1: site; -2: pulley (nwrap x 2) + mjtNum* wrap_xpos; // Cartesian 3D points in all paths (nwrap x 6) // computed by mj_fwdPosition/mj_transmission mjtNum* actuator_length; // actuator lengths (nu x 1) @@ -1388,8 +1388,8 @@ struct mjModel_ { mjtNum* key_qpos; // key position (nkey x nq) mjtNum* key_qvel; // key velocity (nkey x nv) mjtNum* key_act; // key activation (nkey x na) - mjtNum* key_mpos; // key mocap position (nkey x 3*nmocap) - mjtNum* key_mquat; // key mocap quaternion (nkey x 4*nmocap) + mjtNum* key_mpos; // key mocap position (nkey x nmocap*3) + mjtNum* key_mquat; // key mocap quaternion (nkey x nmocap*4) mjtNum* key_ctrl; // key control (nkey x nu) // names diff --git a/include/mujoco/mjdata.h b/include/mujoco/mjdata.h index dbe05f40..44342c90 100644 --- a/include/mujoco/mjdata.h +++ b/include/mujoco/mjdata.h @@ -284,8 +284,8 @@ struct mjData_ { int* ten_J_colind; // column indices in sparse Jacobian (ntendon x nv) mjtNum* ten_J; // tendon Jacobian (ntendon x nv) mjtNum* ten_length; // tendon lengths (ntendon x 1) - int* wrap_obj; // geom id; -1: site; -2: pulley (nwrap*2 x 1) - mjtNum* wrap_xpos; // Cartesian 3D points in all path (nwrap*2 x 3) + int* wrap_obj; // geom id; -1: site; -2: pulley (nwrap x 2) + mjtNum* wrap_xpos; // Cartesian 3D points in all paths (nwrap x 6) // computed by mj_fwdPosition/mj_transmission mjtNum* actuator_length; // actuator lengths (nu x 1) diff --git a/include/mujoco/mjmodel.h b/include/mujoco/mjmodel.h index 32b65b74..7893a8b3 100644 --- a/include/mujoco/mjmodel.h +++ b/include/mujoco/mjmodel.h @@ -1095,8 +1095,8 @@ struct mjModel_ { mjtNum* key_qpos; // key position (nkey x nq) mjtNum* key_qvel; // key velocity (nkey x nv) mjtNum* key_act; // key activation (nkey x na) - mjtNum* key_mpos; // key mocap position (nkey x 3*nmocap) - mjtNum* key_mquat; // key mocap quaternion (nkey x 4*nmocap) + mjtNum* key_mpos; // key mocap position (nkey x nmocap*3) + mjtNum* key_mquat; // key mocap quaternion (nkey x nmocap*4) mjtNum* key_ctrl; // key control (nkey x nu) // names diff --git a/introspect/structs.py b/introspect/structs.py index 19549b89..d844f0c6 100644 --- a/introspect/structs.py +++ b/introspect/structs.py @@ -4075,7 +4075,7 @@ STRUCTS: Mapping[str, StructDecl] = dict([ inner_type=ValueType(name='mjtNum'), ), doc='key mocap position', - array_extent=('nkey', '3*nmocap'), + array_extent=('nkey', 'nmocap*3'), ), StructFieldDecl( name='key_mquat', @@ -4083,7 +4083,7 @@ STRUCTS: Mapping[str, StructDecl] = dict([ inner_type=ValueType(name='mjtNum'), ), doc='key mocap quaternion', - array_extent=('nkey', '4*nmocap'), + array_extent=('nkey', 'nmocap*4'), ), StructFieldDecl( name='key_ctrl', @@ -5126,15 +5126,15 @@ STRUCTS: Mapping[str, StructDecl] = dict([ inner_type=ValueType(name='int'), ), doc='geom id; -1: site; -2: pulley', - array_extent=('nwrap*2',), + array_extent=('nwrap', 2), ), StructFieldDecl( name='wrap_xpos', type=PointerType( inner_type=ValueType(name='mjtNum'), ), - doc='Cartesian 3D points in all path', - array_extent=('nwrap*2', 3), + doc='Cartesian 3D points in all paths', + array_extent=('nwrap', 6), ), StructFieldDecl( name='actuator_length',