Closed olegklimov closed 7 years ago
It could be an issue with the particular URDF file. Do you have a link to the URDF file? (possibly with any modifications you needed to make)
It is roboschool/models_robot/atlas_description/urdf/atlas_v4_with_multisense.urdf
, with removed "package://". Also symlinks necessary for it to find .dae
s.
Here is what I found, for R2D2:
link 0 have filename 'b'''
link 1 have filename 'b'''
link 2 have filename 'b'''
link 3 have filename 'b'''
link 4 have filename 'b'''
link 5 have filename 'b'''
link 6 have filename 'b'''
link 7 have filename 'b'''
link 8 have filename 'b'''
link 9 have filename 'b'''
link 10 have filename 'b's_robot/l_finger.stl''
link 11 have filename 'b'bot/l_finger_tip.stl''
link 12 have filename 'b's_robot/l_finger.stl''
link 13 have filename 'b'bot/l_finger_tip.stl''
link 14 have filename 'b'''
link 15 have filename 'b'''
Link numbers increase monotonically.
And for Atlas:
link 23 have filename 'b'unplugged/pelvis.dae''
link 21 have filename 'b'unplugged/ltorso.dae''
link 22 have filename 'b'unplugged/mtorso.dae''
link 37 have filename 'b'unplugged/utorso.dae''
link 8 have filename 'b'unplugged/r_clav.dae''
link 16 have filename 'b'unplugged/r_scap.dae''
link 18 have filename 'b'unplugged/r_uarm.dae''
link 13 have filename 'b'meshes_v3/r_larm.dae''
link 9 have filename 'b'meshes_v3/r_farm.dae''
link 11 have filename 'b'meshes_v3/r_hand.dae''
link 12 have filename 'b'''
link 0 have filename 'b'tion/meshes/head.dae''
link 1 have filename 'b'shes/head_camera.dae''
link 3 have filename 'b'''
link 5 have filename 'b'''
link 7 have filename 'b'''
link 24 have filename 'b'unplugged/r_clav.dae''
link 32 have filename 'b'unplugged/r_scap.dae''
link 34 have filename 'b'unplugged/r_uarm.dae''
link 29 have filename 'b'meshes_v3/r_larm.dae''
link 25 have filename 'b'meshes_v3/r_farm.dae''
link 27 have filename 'b'meshes_v3/r_hand.dae''
link 28 have filename 'b'''
link 38 have filename 'b'''
link 40 have filename 'b'''
link 19 have filename 'b'nplugged/l_uglut.dae''
link 14 have filename 'b'nplugged/l_lglut.dae''
link 20 have filename 'b'unplugged/l_uleg.dae''
link 15 have filename 'b'unplugged/l_lleg.dae''
link 17 have filename 'b'nplugged/l_talus.dae''
link 10 have filename 'b'unplugged/l_foot.dae''
link 35 have filename 'b'nplugged/r_uglut.dae''
link 30 have filename 'b'nplugged/r_lglut.dae''
link 36 have filename 'b'unplugged/r_uleg.dae''
link 31 have filename 'b'unplugged/r_lleg.dae''
link 33 have filename 'b'nplugged/r_talus.dae''
link 26 have filename 'b'unplugged/r_foot.dae''
You see, link 2 missing, link 4 is missing. Not in order. Strange.
Ok, I'll have a look at it later. By the way, the Atlas is one of the most complex robots out there, it might require quite some work to get the simulation in a nice shape.
Well it's regular URDF, links and joints... Rigid bodies with constraints kind of worked:
Oh wait!
It's not that Atlas is hard. It is rendered by internal rendering pipeline just fine! And simulated too, as far as I can tell. It is C API bug (present without using python as well).
This 'package://' stuff is ROS being overly complex (at least you don't use the xacro version) Don't you have a version with simple relative paths to assets? We shouldn't need to worry about those details (symlinks, parsing or ignoring 'package://' etc), when we use paths relative to the URDF file.
I was going to modify URDF load to eat these files without modification.
(if you want to test Atlas, just kill package://
and make a lot of symlinks to make valid paths it tries to use)
Wow. Same code, except:
p.loadMJCF("gym/envs/mujoco/assets/humanoid.xml")
For all objects (floor or humanoid in humanoid.xml, or other objects in other files) getVisualShapeData()
returns array of length 1 with uninitialized values.
(Joints work for MJCF, and URDF work with bug above, at least it's initialized)
Thanks for the report, I'll look at it soon. (there hasn't been much effort in the 'getVisualShapeData' yet)
Great. Your robot rendering looks great!
Here is isolated example:
Output for this:
First several joints connect parts of body (torso, not arms or legs). Seems improbable link 21 or 22 (which apparently are parts of left arm) should load torso models.
Here is how it looks:
First models returned by getVisualShapeData() are body, first joints connect parts of body together, so it's logical to try link_index==array_index, but that attempt was also unsuccessful.