From 2417ab5d336a60b471a2d274ec363bda99072c56 Mon Sep 17 00:00:00 2001 From: stevenaya Date: Tue, 25 Aug 2026 00:49:53 +0900 Subject: [PATCH] Fix joint type checks with newer MuJoCo --- src/openarm_control/qp/arm_joint_limit.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/openarm_control/qp/arm_joint_limit.py b/src/openarm_control/qp/arm_joint_limit.py index d25e2805..f5418065 100644 --- a/src/openarm_control/qp/arm_joint_limit.py +++ b/src/openarm_control/qp/arm_joint_limit.py @@ -44,9 +44,9 @@ def __init__( or int(model.jnt_qposadr[joint_id]) not in selected_qpos ): continue - if model.jnt_type[joint_id] not in ( - mujoco.mjtJoint.mjJNT_HINGE, - mujoco.mjtJoint.mjJNT_SLIDE, + if int(model.jnt_type[joint_id]) not in ( + int(mujoco.mjtJoint.mjJNT_HINGE), + int(mujoco.mjtJoint.mjJNT_SLIDE), ): raise ValueError("ArmConfigurationLimit only supports scalar joints.") active_dofs.append(int(model.jnt_dofadr[joint_id])) @@ -106,9 +106,9 @@ def __init__( "its velocity limit will be skipped." ) continue - if model.jnt_type[joint_id] not in ( - mujoco.mjtJoint.mjJNT_HINGE, - mujoco.mjtJoint.mjJNT_SLIDE, + if int(model.jnt_type[joint_id]) not in ( + int(mujoco.mjtJoint.mjJNT_HINGE), + int(mujoco.mjtJoint.mjJNT_SLIDE), ): raise ValueError("ArmJointLimit only supports scalar joints.")