google-deepmind / mujoco_menagerie

A collection of high-quality models for the MuJoCo physics engine, curated by Google DeepMind.
Other
1.43k stars 197 forks source link

Questions about creating MJCF file converted from URDF file #74

Open zhang-jiaqi-1207 opened 3 months ago

zhang-jiaqi-1207 commented 3 months ago

Thanks for your excellent works and repo! But I wonder

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!

lvjonok commented 3 months ago

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.