mujoco_menagerie icon indicating copy to clipboard operation
mujoco_menagerie copied to clipboard

Questions about creating MJCF file converted from URDF file

Open zhang-jiaqi-1207 opened this issue 1 year ago • 1 comments

Thanks for your excellent works and repo! But I wonder

  • Why does the robot arms (e.g. UR5e) hold their initial pose with the grevity in the MuJoCo simulator.
  • Which labels play a role in holding the pose?

I want to get the MJCF file of my 6-DOF custom robot arm from its URDF file. But it can't hold the initial pose under the grevity. I guess I may miss some xml labels in the MJCF model file. Moreover, it seems that the <visual> and <collision> labels are missing after converting although setting discardvisual="false" in the URDF file.

The robot arm product which I use is Jaka Zu 7, which is similar with the UR5e. This is its introduction if needed. The URDF file is downloaded directly from the company website. The file-convert procedure follows the UR5e README file in this repo.

Besides, my codes are also provided here JakaZu7.zip. After unzip the file, there are mesh files in meshes directory, mjcf file in MJCF directory and urdf file in URDF directoty.

Thank you very much if you could give me some help or guidelines or suggestions!

zhang-jiaqi-1207 avatar Jul 17 '24 06:07 zhang-jiaqi-1207

I believe the initial pose is held due specific actuators in default section.

<general gaintype="fixed" biastype="affine" ctrlrange="-6.2831 6.2831" gainprm="2000" biasprm="0 -2000 -400" forcerange="-150 150"/>

This line of the original UR5e xml description tells the simulator that the joints are controlled in position-mode.

A while ago I did a demo of switching actuators on the go, you may find it useful.

lvjonok avatar Jul 18 '24 06:07 lvjonok