Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set joint position for position actuators #24

Open
edwardjjj opened this issue Jun 30, 2024 · 0 comments
Open

How to set joint position for position actuators #24

edwardjjj opened this issue Jun 30, 2024 · 0 comments

Comments

@edwardjjj
Copy link

edwardjjj commented Jun 30, 2024

Hi, I'm trying to adapt my robot that utilizes position actuators to the RGB_stacking environment. I implemented the python class for the robot based on the sawyer robot implementation, but it keeps failing with the following error:
WARNING:absl:Unable to solve the inverse kinematics for ref_pose: Pose(position=[0.54648661 0.12579726 0.4226723 ], quaternion=[ 6.03993497e-17 9.86396237e-01 -1.64385105e-01 1.00656846e-17])

The following is how I set the joint angles:

def set_joint_angles(self, physics: mjcf.Physics, joint_angles: np.ndarray) -> None:
        physics_joints = models_utils.binding(physics, self._joints)
        physics_actuators = models_utils.binding(physics, self._actuators)
        physics_joints.qpos[:] = joint_angles
        physics_joints.qvel[:] = np.zeros_like(joint_angles)
        physics.forward()

Can anyone help me locate the problem? Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant