Open giotherobot opened 8 months ago
Trying to add the FT sensors programmatically I found an issue in the converted model: the fixed joints that in the URDF represent the FT location are not present in the MJCF model converted. It seems that the fixed joint gets removed in the processing, the chain does not contain a 'l_shoulder_3link for example and the connection is direct from
l_shoulder_2to
l_upper_arm. Both meshes ("sim_ecub_1-1_l_shoulder_2" and "sim_ecub_1-1_l_shoulder_3") are loaded into the
l_shoulder_2` link.
Relevant section in mujoco URDF parser: https://github.com/google-deepmind/mujoco/blob/e2c14188adc8f6170aaf03a2f9c3424ab191d629/src/xml/xml_urdf.cc#L436
Ah cool, that was exactly the first issue we faced when importing the iCub in Gazebo Classic in 2013 as well, we solved it back in time by adding an option to disable fixed joint lumping https://github.com/gazebosim/sdformat/commit/62e8dd0edfddb02b5885c87ebf1eceed6e57eb4c and https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/133/page/1 . We could think of ignoring FT sensors for now.
Ok let's skip FTs for now, looking at mujoco there seems to be no 'fixed' joint too.
The same problem is present with IMUs, to place them in the URDF we are using fixed joints that vanish in the conversion to mjcf.
I think the "correct" way to deal with these should be with site
elements (see https://mujoco.readthedocs.io/en/stable/XMLreference.html#body-site).
The same problem is present with IMUs, to place them in the URDF we are using fixed joints that vanish in the conversion to mjcf.
I think the "correct" way to deal with these should be with
site
elements (see https://mujoco.readthedocs.io/en/stable/XMLreference.html#body-site).
Nice, also for this we have a Gazebo equivalent: https://github.com/gazebosim/sdformat/issues/262, that then was fixed in https://github.com/gazebosim/sdformat/pull/1148 .
@vpunithreddy is working on this for ironcub on the https://github.com/ami-iit/mujoco-urdf-loader repo, we can open issues there.
Thanks @giotherobot I have started to add sites necessary for the frames of the sensors with respect to their parent_body
I have used iRoncub-Mk3 for reference and have been progressing. As of now, I have added the
The commits are in the branch iRonCub_mjcf