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

[bug] Config error of xmate3_robotiq, resulting in abnormal rotation of rx, ry, rz !!! #194

Open
swearos opened this issue Jan 25, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@swearos
Copy link

swearos commented Jan 25, 2024

https://github.com/haosulab/ManiSkill2/blob/d04c2dc5bfd826172b2f3193cbf232a4a33bdd9e/mani_skill2/agents/configs/xmate3/defaults.py#L43

self.ee_link_name = "grasp_convenient_link" should be changed to
self.ee_link_name = "robotiq_arg2f_base_link",

I tried to rotate the end controller 90 degrees around the X-axis and noticed that the robotic arm was acting strangely,
See the video below for a comparison of the effect before and after modification (also problematic is the rotation of rz).

rotate_rx_error.mp4
rotate_rx_ok.mp4
@StoneT2000 StoneT2000 added the bug Something isn't working label Jan 25, 2024
@StoneT2000
Copy link
Member

thanks for raising the issue @swearos, could you provide a reproducible code snippet to do this?

@swearos
Copy link
Author

swearos commented Jan 29, 2024

@StoneT2000
Script has been attached, the default panda robot rotation results are normal, xmate3_robotiq rx and rz are abnormal, you can try it

@swearos
Copy link
Author

swearos commented Jan 29, 2024

@StoneT2000 I found that it is still wrong to change the ee_link_name node to robotiq_arg2f_base_link, but compared with the default panda result,, the origin of rx rotation is wrong. https://github.com/haosulab/ManiSkill2/assets/10892059/bfe539e3-472a-4f27-b0fa-605f93f95dce

Compared with the gripper node in panda_v2.urdf,

Whether to add child nodes to robotiq_arg2f_base_link and then add Z-axis bias,like https://github.com/haosulab/ManiSkill2/blob/d04c2dc5bfd826172b2f3193cbf232a4a33bdd9e/mani_skill2/assets/descriptions/panda_v2_gripper.urdf#L25C15-L25C29

@StoneT2000
Copy link
Member

sorry for the delay. You are correct you should use the convenient link, which basically is the location of the TCP for easier EE control. It seems like the xmate3 robot actually has a small bug/typo in its modelling where it changed the rotation frame. Panda gripper as you point out uses rpy="0 0 0" for the panda_tcp joint, but it is not 0 0 0 for xmate3. For a fix on your side you can edit the URDF file for the xmate3 like so

Original

  <link name="grasp_convenient_link"/>
  <joint name="grasp_convenient_joint" type="fixed">
    <origin rpy="0 -1.57079 0" xyz="0 0 0.225"/>
    <parent link="robotiq_arg2f_base_link"/>
    <child link="grasp_convenient_link"/>
  </joint>

Changed

<link name="grasp_convenient_link"/>
<joint name="grasp_convenient_joint" type="fixed">
  <origin rpy="0 0 0" xyz="0 0 0.225"/>
  <parent link="robotiq_arg2f_base_link"/>
  <child link="grasp_convenient_link"/>
</joint>

You can probably find this file in data/robots/xmate3_robotiq/xmate3_robotiq.urdf where data is the path to your ms2 assets. data is the default location.

Because other people have potentially trained policies already with the action dimensions permuted wrong for xmate3, i will not update the URDF that is downloaded by default for now. I will update this for the next version of ManiSkill.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants