robotic 0.2.9.dev2__cp38-cp38-manylinux2014_x86_64.whl → 0.3.0__cp38-cp38-manylinux2014_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. robotic/__init__.py +1 -1
  2. robotic/_robotic.pyi +9 -9
  3. robotic/_robotic.so +0 -0
  4. robotic/include/rai/Algo/rungeKutta.h +1 -1
  5. robotic/include/rai/Control/TimingMPC.h +2 -2
  6. robotic/include/rai/Core/array.h +64 -40
  7. robotic/include/rai/Core/array.ipp +244 -80
  8. robotic/include/rai/Core/arrayDouble.h +10 -13
  9. robotic/include/rai/Core/graph.h +22 -2
  10. robotic/include/rai/Core/h5.h +3 -1
  11. robotic/include/rai/Geo/fclInterface.h +3 -1
  12. robotic/include/rai/Geo/geo.h +4 -1
  13. robotic/include/rai/Geo/mesh.h +11 -5
  14. robotic/include/rai/Geo/pairCollision.h +4 -4
  15. robotic/include/rai/Gui/RenderData.h +4 -3
  16. robotic/include/rai/Gui/opengl.h +1 -1
  17. robotic/include/rai/KOMO/komo.h +1 -0
  18. robotic/include/rai/KOMO/manipTools.h +1 -1
  19. robotic/include/rai/Kin/F_forces.h +1 -1
  20. robotic/include/rai/Kin/dof_forceExchange.h +4 -4
  21. robotic/include/rai/Kin/frame.h +4 -3
  22. robotic/include/rai/Kin/kin.h +24 -15
  23. robotic/include/rai/Kin/kin_physx.h +2 -2
  24. robotic/include/rai/Logic/folWorld.h +1 -1
  25. robotic/include/rai/Optim/testProblems_Opt.h +2 -2
  26. robotic/include/rai/Optim/utils.h +2 -2
  27. robotic/include/rai/PathAlgos/ConfigurationProblem.h +3 -2
  28. robotic/include/rai/PathAlgos/RRT_PathFinder.h +1 -1
  29. robotic/librai.so +0 -0
  30. robotic/meshTool +0 -0
  31. robotic/rai-robotModels/g1/g1.g +11 -2
  32. robotic/rai-robotModels/objects/shelf.g +1 -1
  33. robotic/rai-robotModels/panda/panda.g +1 -1
  34. robotic/rai-robotModels/panda/panda_arm_hand_conv.g +22 -22
  35. robotic/rai-robotModels/panda/panda_arm_hand_conv.yml +24 -0
  36. robotic/rai-robotModels/pr2/pr2.g +6 -6
  37. robotic/rai-robotModels/pr2/pr2_clean.g +114 -114
  38. robotic/rai-robotModels/pr2/pr2_modifications.g +2 -2
  39. robotic/rai-robotModels/ranger/ranger.g +3 -3
  40. robotic/rai-robotModels/robotiq/robotiq.g +1 -1
  41. robotic/rai-robotModels/scenarios/panda_fixRobotiq.g +3 -3
  42. robotic/rai-robotModels/tests/arm.g +11 -11
  43. robotic/rai-robotModels/ur10/ur10.g +1 -1
  44. robotic/rai-robotModels/ur10/ur10_clean.g +8 -8
  45. robotic/ry-h5info +2 -2
  46. robotic/ry-urdfConvert.py +3 -2
  47. robotic/{cleanMeshes.py → src/cleanMeshes.py} +0 -0
  48. robotic/src/meshlabFilters.mlx +20 -0
  49. robotic/src/{config_mujoco.py → mujoco_io.py} +18 -13
  50. robotic/test.py +15 -0
  51. robotic/version.py +1 -1
  52. {robotic-0.2.9.dev2.data → robotic-0.3.0.data}/scripts/ry-h5info +2 -2
  53. robotic-0.3.0.data/scripts/ry-urdfConvert.py +74 -0
  54. {robotic-0.2.9.dev2.dist-info → robotic-0.3.0.dist-info}/METADATA +3 -7
  55. {robotic-0.2.9.dev2.dist-info → robotic-0.3.0.dist-info}/RECORD +63 -65
  56. robotic/rai-robotModels/g1/g1_29dof_conv.g +0 -77
  57. robotic/rai-robotModels/robotiq/robotiq_arg2f_85_model_conv.g +0 -21
  58. robotic/ry-urdf2rai +0 -222
  59. robotic/ry-urdf2yaml +0 -250
  60. robotic-0.2.9.dev2.data/scripts/ry-urdf2rai +0 -222
  61. robotic-0.2.9.dev2.data/scripts/ry-urdf2yaml +0 -250
  62. {robotic-0.2.9.dev2.data → robotic-0.3.0.data}/scripts/ry-bot +0 -0
  63. {robotic-0.2.9.dev2.data → robotic-0.3.0.data}/scripts/ry-info +0 -0
  64. {robotic-0.2.9.dev2.data → robotic-0.3.0.data}/scripts/ry-meshTool +0 -0
  65. {robotic-0.2.9.dev2.data → robotic-0.3.0.data}/scripts/ry-test +0 -0
  66. {robotic-0.2.9.dev2.data → robotic-0.3.0.data}/scripts/ry-view +0 -0
  67. {robotic-0.2.9.dev2.dist-info → robotic-0.3.0.dist-info}/LICENSE +0 -0
  68. {robotic-0.2.9.dev2.dist-info → robotic-0.3.0.dist-info}/WHEEL +0 -0
  69. {robotic-0.2.9.dev2.dist-info → robotic-0.3.0.dist-info}/top_level.txt +0 -0
@@ -1,77 +0,0 @@
1
- pelvis: { shape: mesh, color: [0.2, 0.2, 0.2, 1], mesh: <meshes/pelvis.h5>, mass: 0.400236, inertia: [0.00159584, -5.92804e-10, -1.2185e-09, 0.0013267, 3.05393e-09, 0.00119011] },
2
- pelvis_contour_joint(pelvis): { joint: rigid, shape: mesh, color: [0.7, 0.7, 0.7, 1], mesh: <meshes/pelvis_contour_link.h5>, mass: 0.393642, inertia: [0.00120549, -1.39118e-07, -1.37717e-06, 0.00142459, -1.2061e-07, 0.00136524] },
3
- left_hip_pitch_joint_origin(pelvis): { Q: [0, 0.064452, -0.1027] },
4
- right_hip_pitch_joint_origin(pelvis): { Q: [0, -0.064452, -0.1027] },
5
- imu_in_pelvis_joint_origin(pelvis): { Q: [0.04525, 0, -0.08339] },
6
- waist_yaw_joint(pelvis): { joint: hingeZ, limits: [-2.618, 2.618], shape: mesh, color: [0.7, 0.7, 0.7, 1], mesh: <meshes/waist_yaw_link.h5>, mass: 0.168083, inertia: [8.83938e-05, -2.82438e-09, -9.9721e-06, 0.000103081, -2.02902e-09, 0.000150067] },
7
- left_hip_pitch_joint(left_hip_pitch_joint_origin): { joint: hingeY, limits: [-2.5307, 2.8798], shape: mesh, color: [0.2, 0.2, 0.2, 1], mesh: <meshes/left_hip_pitch_link.h5>, mass: 0.264573, inertia: [0.000474721, 4.31311e-06, 5.93997e-06, 0.000392354, 4.96908e-05, 0.000375138] },
8
- right_hip_pitch_joint(right_hip_pitch_joint_origin): { joint: hingeY, limits: [-2.5307, 2.8798], shape: mesh, color: [0.2, 0.2, 0.2, 1], mesh: <meshes/right_hip_pitch_link.h5>, mass: 0.264569, inertia: [0.000474711, -4.31398e-06, 5.94077e-06, 0.000392343, -4.96889e-05, 0.000375138] },
9
- imu_in_pelvis_joint(imu_in_pelvis_joint_origin): { joint: rigid },
10
- waist_roll_joint_origin(waist_yaw_joint): { Q: [-0.0039635, 0, 0.035] },
11
- left_hip_roll_joint_origin(left_hip_pitch_joint): { Q: [0, 0.052, -0.030465, 0.996179, 0, -0.0873386, 0] },
12
- right_hip_roll_joint_origin(right_hip_pitch_joint): { Q: [0, -0.052, -0.030465, 0.996179, 0, -0.0873386, 0] },
13
- waist_roll_joint(waist_roll_joint_origin): { joint: hingeX, limits: [-0.52, 0.52], shape: mesh, color: [0.7, 0.7, 0.7, 1], mesh: <meshes/waist_roll_link.h5>, mass: 0.0221562, inertia: [4.0451e-06, 7.41165e-11, -2.63317e-11, 3.67093e-06, 3.77707e-11, 2.32541e-06] },
14
- left_hip_roll_joint(left_hip_roll_joint_origin): { joint: hingeX, limits: [-0.5236, 2.9671], shape: mesh, color: [0.7, 0.7, 0.7, 1], mesh: <meshes/left_hip_roll_link.h5>, mass: 0.388504, inertia: [0.00122176, -2.52983e-06, -0.000212212, 0.00118448, -1.72307e-06, 0.00069136] },
15
- right_hip_roll_joint(right_hip_roll_joint_origin): { joint: hingeX, limits: [-2.9671, 0.5236], shape: mesh, color: [0.7, 0.7, 0.7, 1], mesh: <meshes/right_hip_roll_link.h5>, mass: 0.388501, inertia: [0.00122175, 2.52204e-06, -0.000212212, 0.00118447, 1.73174e-06, 0.000691349] },
16
- waist_pitch_joint_origin(waist_roll_joint): { Q: [0, 0, 0.019] },
17
- left_hip_yaw_joint_origin(left_hip_roll_joint): { Q: [0.025001, 0, -0.12412] },
18
- right_hip_yaw_joint_origin(right_hip_roll_joint): { Q: [0.025001, 0, -0.12412] },
19
- waist_pitch_joint(waist_pitch_joint_origin): { joint: hingeY, limits: [-0.52, 0.52], shape: mesh, color: [0.7, 0.7, 0.7, 1], mesh: <meshes/torso_link.h5>, mass: 3.72833, inertia: [0.0404695, -1.1264e-05, -0.000266539, 0.0333617, -1.24012e-05, 0.0221975] },
20
- left_hip_yaw_joint(left_hip_yaw_joint_origin): { joint: hingeZ, limits: [-2.7576, 2.7576], shape: mesh, color: [0.7, 0.7, 0.7, 1], mesh: <meshes/left_hip_yaw_link.h5>, mass: 0.681619, inertia: [0.0044275, -0.000108056, -0.00166275, 0.00545319, -0.000187376, 0.001876] },
21
- right_hip_yaw_joint(right_hip_yaw_joint_origin): { joint: hingeZ, limits: [-2.7576, 2.7576], shape: mesh, color: [0.7, 0.7, 0.7, 1], mesh: <meshes/right_hip_yaw_link.h5>, mass: 0.681613, inertia: [0.00442747, 0.000108056, -0.00166275, 0.00545319, 0.000187351, 0.00187597] },
22
- logo_joint_origin(waist_pitch_joint): { Q: [0.0039635, 0, -0.054] },
23
- head_joint_origin(waist_pitch_joint): { Q: [0.0039635, 0, -0.054] },
24
- waist_support_joint_origin(waist_pitch_joint): { Q: [0.0039635, 0, -0.054] },
25
- imu_in_torso_joint_origin(waist_pitch_joint): { Q: [-0.03959, -0.00224, 0.13792] },
26
- d435_joint_origin(waist_pitch_joint): { Q: [0.0576235, 0.01753, 0.41987, 0.91496, 0, 0.403545, 0] },
27
- mid360_joint_origin(waist_pitch_joint): { Q: [0.0002835, 3e-05, 0.40618, 0.999799, 0, 0.0200699, 0] },
28
- left_shoulder_pitch_joint_origin(waist_pitch_joint): { Q: [0.0039563, 0.10022, 0.23778, 0.990264, 0.139201, 4.05418e-05, -9.10379e-05] },
29
- right_shoulder_pitch_joint_origin(waist_pitch_joint): { Q: [0.0039563, -0.10021, 0.23778, 0.990264, -0.139201, 4.05418e-05, 9.10379e-05] },
30
- left_knee_joint_origin(left_hip_yaw_joint): { Q: [-0.078273, 0.0021489, -0.17734, 0.996179, 0, 0.0873386, 0] },
31
- right_knee_joint_origin(right_hip_yaw_joint): { Q: [-0.078273, -0.0021489, -0.17734, 0.996179, 0, 0.0873386, 0] },
32
- logo_joint(logo_joint_origin): { joint: rigid, shape: mesh, color: [0.2, 0.2, 0.2, 1], mesh: <meshes/logo_link.h5>, mass: 0.0575578, inertia: [0.000100919, -1.65034e-06, 1.03204e-06, 0.000279739, 5.60472e-08, 0.000376764] },
33
- head_joint(head_joint_origin): { joint: rigid, shape: mesh, color: [0.2, 0.2, 0.2, 1], mesh: <meshes/head_link.h5>, mass: 0.493975, inertia: [0.00295612, 1.28062e-08, -0.000167611, 0.00293932, 2.9539e-08, 0.0012706] },
34
- waist_support_joint(waist_support_joint_origin): { joint: rigid, shape: mesh, color: [0.7, 0.7, 0.7, 1], mesh: <meshes/waist_support_link.h5>, mass: 0.202405, inertia: [0.00046643, -1.24677e-07, -2.44136e-07, 0.000381836, -3.23169e-08, 0.000786744] },
35
- imu_in_torso_joint(imu_in_torso_joint_origin): { joint: rigid },
36
- d435_joint(d435_joint_origin): { joint: rigid },
37
- mid360_joint(mid360_joint_origin): { joint: rigid },
38
- left_shoulder_pitch_joint(left_shoulder_pitch_joint_origin): { joint: hingeY, limits: [-3.0892, 2.6704], shape: mesh, color: [0.7, 0.7, 0.7, 1], mesh: <meshes/left_shoulder_pitch_link.h5>, mass: 0.126023, inertia: [0.000160485, -1.66228e-07, 3.91865e-07, 0.000151496, 1.75614e-05, 0.000138798] },
39
- right_shoulder_pitch_joint(right_shoulder_pitch_joint_origin): { joint: hingeY, limits: [-3.0892, 2.6704], shape: mesh, color: [0.7, 0.7, 0.7, 1], mesh: <meshes/right_shoulder_pitch_link.h5>, mass: 0.126023, inertia: [0.000160483, 1.65124e-07, 3.90512e-07, 0.000151492, -1.75623e-05, 0.000138793] },
40
- left_knee_joint(left_knee_joint_origin): { joint: hingeY, limits: [-0.087267, 2.8798], shape: mesh, color: [0.7, 0.7, 0.7, 1], mesh: <meshes/left_knee_link.h5>, mass: 0.876712, inertia: [0.00648182, 3.3975e-05, -0.000127209, 0.00672925, -0.000358869, 0.00109586] },
41
- right_knee_joint(right_knee_joint_origin): { joint: hingeY, limits: [-0.087267, 2.8798], shape: mesh, color: [0.7, 0.7, 0.7, 1], mesh: <meshes/right_knee_link.h5>, mass: 0.876714, inertia: [0.00648176, -3.398e-05, -0.000127209, 0.00672918, 0.000358822, 0.00109587] },
42
- left_shoulder_roll_joint_origin(left_shoulder_pitch_joint): { Q: [0, 0.038, -0.013831, 0.990268, -0.139172, 0, 0] },
43
- right_shoulder_roll_joint_origin(right_shoulder_pitch_joint): { Q: [0, -0.038, -0.013831, 0.990268, 0.139172, 0, 0] },
44
- left_ankle_pitch_joint_origin(left_knee_joint): { Q: [0, -9.4445e-05, -0.30001] },
45
- right_ankle_pitch_joint_origin(right_knee_joint): { Q: [0, 9.4445e-05, -0.30001] },
46
- left_shoulder_roll_joint(left_shoulder_roll_joint_origin): { joint: hingeX, limits: [-1.5882, 2.2515], shape: mesh, color: [0.7, 0.7, 0.7, 1], mesh: <meshes/left_shoulder_roll_link.h5>, mass: 0.246281, inertia: [0.000394956, 2.09873e-08, -1.93073e-07, 0.000469736, 1.57454e-05, 0.000272781] },
47
- right_shoulder_roll_joint(right_shoulder_roll_joint_origin): { joint: hingeX, limits: [-2.2515, 1.5882], shape: mesh, color: [0.7, 0.7, 0.7, 1], mesh: <meshes/right_shoulder_roll_link.h5>, mass: 0.246283, inertia: [0.000394966, -1.6719e-08, -1.89014e-07, 0.000469741, -1.57405e-05, 0.000272773] },
48
- left_ankle_pitch_joint(left_ankle_pitch_joint_origin): { joint: hingeY, limits: [-0.87267, 0.5236], shape: mesh, color: [0.7, 0.7, 0.7, 1], mesh: <meshes/left_ankle_pitch_link.h5>, mass: 0.0197524, inertia: [2.78775e-06, -2.27316e-10, -5.8987e-07, 4.52084e-06, -3.84759e-10, 2.51425e-06] },
49
- right_ankle_pitch_joint(right_ankle_pitch_joint_origin): { joint: hingeY, limits: [-0.87267, 0.5236], shape: mesh, color: [0.7, 0.7, 0.7, 1], mesh: <meshes/right_ankle_pitch_link.h5>, mass: 0.0197524, inertia: [2.78777e-06, 2.213e-10, -5.89865e-07, 4.52084e-06, 3.98325e-10, 2.51424e-06] },
50
- left_shoulder_yaw_joint_origin(left_shoulder_roll_joint): { Q: [0, 0.00624, -0.1032] },
51
- right_shoulder_yaw_joint_origin(right_shoulder_roll_joint): { Q: [0, -0.00624, -0.1032] },
52
- left_ankle_roll_joint_origin(left_ankle_pitch_joint): { Q: [0, 0, -0.017558] },
53
- right_ankle_roll_joint_origin(right_ankle_pitch_joint): { Q: [0, 0, -0.017558] },
54
- left_shoulder_yaw_joint(left_shoulder_yaw_joint_origin): { joint: hingeZ, limits: [-2.618, 2.618], shape: mesh, color: [0.7, 0.7, 0.7, 1], mesh: <meshes/left_shoulder_yaw_link.h5>, mass: 0.330191, inertia: [0.00075724, 1.01914e-05, 0.000118153, 0.000781633, -6.07748e-05, 0.000303097] },
55
- right_shoulder_yaw_joint(right_shoulder_yaw_joint_origin): { joint: hingeZ, limits: [-2.618, 2.618], shape: mesh, color: [0.7, 0.7, 0.7, 1], mesh: <meshes/right_shoulder_yaw_link.h5>, mass: 0.330189, inertia: [0.000757238, -1.01934e-05, 0.000118161, 0.000781632, 6.07703e-05, 0.000303094] },
56
- left_ankle_roll_joint(left_ankle_roll_joint_origin): { joint: hingeX, limits: [-0.2618, 0.2618], shape: mesh, color: [0.2, 0.2, 0.2, 1], mesh: <meshes/left_ankle_roll_link.h5>, mass: 0.456098, inertia: [0.000287801, 6.50248e-08, 8.30648e-05, 0.00151895, -1.18792e-07, 0.0016069] },
57
- right_ankle_roll_joint(right_ankle_roll_joint_origin): { joint: hingeX, limits: [-0.2618, 0.2618], shape: mesh, color: [0.2, 0.2, 0.2, 1], mesh: <meshes/right_ankle_roll_link.h5>, mass: 0.45609, inertia: [0.0002878, -9.56202e-08, 8.30614e-05, 0.00151893, 1.13682e-07, 0.00160687] },
58
- left_elbow_joint_origin(left_shoulder_yaw_joint): { Q: [0.015783, 0, -0.080518] },
59
- right_elbow_joint_origin(right_shoulder_yaw_joint): { Q: [0.015783, 0, -0.080518] },
60
- left_elbow_joint(left_elbow_joint_origin): { joint: hingeY, limits: [-1.0472, 2.0944], shape: mesh, color: [0.7, 0.7, 0.7, 1], mesh: <meshes/left_elbow_link.h5>, mass: 0.133212, inertia: [0.000105606, 4.41256e-05, 1.51768e-05, 0.000221879, -4.66813e-06, 0.000221601] },
61
- right_elbow_joint(right_elbow_joint_origin): { joint: hingeY, limits: [-1.0472, 2.0944], shape: mesh, color: [0.7, 0.7, 0.7, 1], mesh: <meshes/right_elbow_link.h5>, mass: 0.133212, inertia: [0.000105601, -4.41257e-05, 1.5176e-05, 0.000221877, 4.66758e-06, 0.000221596] },
62
- left_wrist_roll_joint_origin(left_elbow_joint): { Q: [0.1, 0.00188791, -0.01] },
63
- right_wrist_roll_joint_origin(right_elbow_joint): { Q: [0.1, -0.00188791, -0.01] },
64
- left_wrist_roll_joint(left_wrist_roll_joint_origin): { joint: hingeX, limits: [-1.97222, 1.97222], shape: mesh, color: [0.7, 0.7, 0.7, 1], mesh: <meshes/left_wrist_roll_link.h5>, mass: 0.0819051, inertia: [5.76855e-05, -6.70778e-07, 1.09252e-09, 4.18275e-05, -1.21848e-09, 6.33789e-05] },
65
- right_wrist_roll_joint(right_wrist_roll_joint_origin): { joint: hingeX, limits: [-1.97222, 1.97222], shape: mesh, color: [0.7, 0.7, 0.7, 1], mesh: <meshes/right_wrist_roll_link.h5>, mass: 0.0819045, inertia: [5.76834e-05, 6.70746e-07, 8.73074e-10, 4.18274e-05, 8.19224e-10, 6.33769e-05] },
66
- left_wrist_pitch_joint_origin(left_wrist_roll_joint): { Q: [0.038, 0, 0] },
67
- right_wrist_pitch_joint_origin(right_wrist_roll_joint): { Q: [0.038, 0, 0] },
68
- left_wrist_pitch_joint(left_wrist_pitch_joint_origin): { joint: hingeY, limits: [-1.61443, 1.61443], shape: mesh, color: [0.7, 0.7, 0.7, 1], mesh: <meshes/left_wrist_pitch_link.h5>, mass: 0.102165, inertia: [6.54114e-05, -1.39886e-06, 1.39875e-06, 0.000133698, 1.78434e-08, 0.000133699] },
69
- right_wrist_pitch_joint(right_wrist_pitch_joint_origin): { joint: hingeY, limits: [-1.61443, 1.61443], shape: mesh, color: [0.7, 0.7, 0.7, 1], mesh: <meshes/right_wrist_pitch_link.h5>, mass: 0.102164, inertia: [6.54077e-05, 1.39993e-06, 1.3996e-06, 0.000133692, -1.67215e-08, 0.000133692] },
70
- left_wrist_yaw_joint_origin(left_wrist_pitch_joint): { Q: [0.046, 0, 0] },
71
- right_wrist_yaw_joint_origin(right_wrist_pitch_joint): { Q: [0.046, 0, 0] },
72
- left_wrist_yaw_joint(left_wrist_yaw_joint_origin): { joint: hingeZ, limits: [-1.61443, 1.61443], shape: mesh, color: [0.7, 0.7, 0.7, 1], mesh: <meshes/left_wrist_yaw_link.h5>, mass: 0.0806154, inertia: [5.53182e-05, -1.04206e-06, 7.04147e-07, 6.51217e-05, 2.05369e-08, 4.14947e-05] },
73
- right_wrist_yaw_joint(right_wrist_yaw_joint_origin): { joint: hingeZ, limits: [-1.61443, 1.61443], shape: mesh, color: [0.7, 0.7, 0.7, 1], mesh: <meshes/right_wrist_yaw_link.h5>, mass: 0.0806224, inertia: [5.53259e-05, 1.04209e-06, 7.04755e-07, 6.51361e-05, -2.11753e-08, 4.15045e-05] },
74
- left_hand_palm_joint_origin(left_wrist_yaw_joint): { Q: [0.0415, 0.003, 0] },
75
- right_hand_palm_joint_origin(right_wrist_yaw_joint): { Q: [0.0415, -0.003, 0] },
76
- left_hand_palm_joint(left_hand_palm_joint_origin): { joint: rigid, shape: mesh, color: [0.7, 0.7, 0.7, 1], mesh: <meshes/left_rubber_hand.h5>, mass: 0.154796, inertia: [0.000129099, 4.62168e-05, 5.26706e-06, 0.000313538, 2.47853e-06, 0.000241113] },
77
- right_hand_palm_joint(right_hand_palm_joint_origin): { joint: rigid, shape: mesh, color: [0.7, 0.7, 0.7, 1], mesh: <meshes/right_rubber_hand.h5>, mass: 0.154795, inertia: [0.0001291, -4.62179e-05, 5.26836e-06, 0.000313541, -2.47823e-06, 0.000241117] }
@@ -1,21 +0,0 @@
1
- robotiq_arg2f_base_link: { shape: mesh, color: [0.1, 0.1, 0.1, 1], mesh: <meshes/robotiq_arg2f_85_base_link.h5>, mass: 0.16309, inertia: [0.00022626, 6.22636e-10, 6.5573e-11, 0.000188087, -3.11813e-07, 0.000141097] },
2
- finger_joint_origin(robotiq_arg2f_base_link): { Q: [0, -0.0306011, 0.054904, 6.12323e-17, 0, 0, 1] },
3
- left_inner_knuckle_joint_origin(robotiq_arg2f_base_link): { Q: [0, -0.0127, 0.06142, 6.12323e-17, 0, 0, 1] },
4
- right_outer_knuckle_joint_origin(robotiq_arg2f_base_link): { Q: [0, 0.0306011, 0.054904] },
5
- right_inner_knuckle_joint_origin(robotiq_arg2f_base_link): { Q: [0, 0.0127, 0.06142] },
6
- finger_joint(finger_joint_origin): { joint: hingeX, limits: [0, 0.8], shape: mesh, color: [0.792157, 0.819608, 0.933333, 1], mesh: <meshes/robotiq_arg2f_85_outer_knuckle.h5>, mass: 0.0141429, inertia: [3.26716e-06, -5.23289e-17, 8.54928e-17, 3.03476e-06, 1.77988e-07, 8.59178e-07] },
7
- left_inner_knuckle_joint(left_inner_knuckle_joint_origin): { joint: hingeX, limits: [0, 0.8757], mimic: finger_joint, shape: mesh, color: [0.1, 0.1, 0.1, 1], mesh: <meshes/robotiq_arg2f_85_inner_knuckle.h5>, mass: 0.0293528, inertia: [1.18448e-05, -2.51482e-13, 9.42698e-14, 1.16071e-05, -5.32477e-06, 9.92039e-06] },
8
- right_outer_knuckle_joint(right_outer_knuckle_joint_origin): { joint: hingeX, limits: [0, 0.81], mimic: finger_joint, shape: mesh, color: [0.792157, 0.819608, 0.933333, 1], mesh: <meshes/robotiq_arg2f_85_outer_knuckle.h5>, mass: 0.0141429, inertia: [3.26716e-06, -5.23289e-17, 8.54928e-17, 3.03476e-06, 1.77988e-07, 8.59178e-07] },
9
- right_inner_knuckle_joint(right_inner_knuckle_joint_origin): { joint: hingeX, limits: [0, 0.8757], mimic: finger_joint, shape: mesh, color: [0.1, 0.1, 0.1, 1], mesh: <meshes/robotiq_arg2f_85_inner_knuckle.h5>, mass: 0.0293528, inertia: [1.18448e-05, -2.51482e-13, 9.42698e-14, 1.16071e-05, -5.32477e-06, 9.92039e-06] },
10
- left_outer_finger_joint_origin(finger_joint): { Q: [0, 0.0315, -0.0041] },
11
- right_outer_finger_joint_origin(right_outer_knuckle_joint): { Q: [0, 0.0315, -0.0041] },
12
- left_outer_finger_joint(left_outer_finger_joint_origin): { joint: rigid, shape: mesh, color: [0.1, 0.1, 0.1, 1], mesh: <meshes/robotiq_arg2f_85_outer_finger.h5>, mass: 0.0246725, inertia: [8.05877e-06, 5.27023e-16, -3.05353e-16, 9.48665e-06, -9.13935e-07, 2.56178e-06] },
13
- right_outer_finger_joint(right_outer_finger_joint_origin): { joint: rigid, shape: mesh, color: [0.1, 0.1, 0.1, 1], mesh: <meshes/robotiq_arg2f_85_outer_finger.h5>, mass: 0.0246725, inertia: [8.05877e-06, 5.27023e-16, -3.05353e-16, 9.48665e-06, -9.13935e-07, 2.56178e-06] },
14
- left_inner_finger_joint_origin(left_outer_finger_joint): { Q: [0, 0.0061, 0.0471] },
15
- right_inner_finger_joint_origin(right_outer_finger_joint): { Q: [0, 0.0061, 0.0471] },
16
- left_inner_finger_joint(left_inner_finger_joint_origin): { joint: hingeX, limits: [0, 0.8757], mimic: finger_joint, shape: mesh, color: [0.1, 0.1, 0.1, 1], mesh: <meshes/robotiq_arg2f_85_inner_finger.h5>, mass: 0.0205822, inertia: [5.68083e-06, -1.41221e-12, 4.89169e-12, 4.88007e-06, 1.15703e-06, 1.93071e-06] },
17
- right_inner_finger_joint(right_inner_finger_joint_origin): { joint: hingeX, limits: [0, 0.8757], mimic: finger_joint, shape: mesh, color: [0.1, 0.1, 0.1, 1], mesh: <meshes/robotiq_arg2f_85_inner_finger.h5>, mass: 0.0205822, inertia: [5.68083e-06, -1.41221e-12, 4.89169e-12, 4.88007e-06, 1.15703e-06, 1.93071e-06] },
18
- left_inner_finger_pad_joint_origin(left_inner_finger_joint): { Q: [0, -0.0220203, 0.03242] },
19
- right_inner_finger_pad_joint_origin(right_inner_finger_joint): { Q: [0, -0.0220203, 0.03242] },
20
- left_inner_finger_pad_joint(left_inner_finger_pad_joint_origin): { joint: rigid, shape: box, size: [0.022, 0.00635, 0.0375], color: [0.9, 0.9, 0.9, 1], mass: 0.0120282, inertia: [1.73997e-05, 2.27364e-05, 6.30668e-06] },
21
- right_inner_finger_pad_joint(right_inner_finger_pad_joint_origin): { joint: rigid, shape: box, size: [0.022, 0.00635, 0.0375], color: [0.9, 0.9, 0.9, 1], mass: 0.0120282, inertia: [1.73997e-05, 2.27364e-05, 6.30668e-06] }
robotic/ry-urdf2rai DELETED
@@ -1,222 +0,0 @@
1
- #!/usr/bin/env python3
2
-
3
- import sys
4
- from lxml import etree
5
- import argparse
6
-
7
- parser = argparse.ArgumentParser(description='convert urdf to yaml (rai convention)')
8
-
9
- parser.add_argument('urdf_file', type=str,
10
- help='required input file')
11
-
12
- parser.add_argument('-coll', type=bool, default=False,
13
- help='use collision shapes?')
14
-
15
- parser.add_argument('-meshRemove', type=str, default='package://',
16
- help='a prefix from the mesh files to be removed')
17
-
18
- parser.add_argument('-meshExt', type=str,
19
- help='overwrite the mesh file extension')
20
-
21
- args = parser.parse_args()
22
-
23
- inFile = args.urdf_file
24
- xmlData = etree.parse(inFile)
25
-
26
- useCollisionShapes = False
27
- if args.coll:
28
- useCollisionShapes = True
29
-
30
- def writeShape(link):
31
- elem = link.find('origin')
32
- if elem is not None:
33
- xyz = elem.attrib.get('xyz')
34
- rpy = elem.attrib.get('rpy')
35
- if rpy=='0 0 0':
36
- rpy=None
37
- if xyz=='0 0 0':
38
- xyz=None
39
- if xyz is not None and rpy is not None:
40
- print(' rel: "t(%s) E(%s)",' % (xyz, rpy), end='')
41
- else:
42
- if rpy is not None:
43
- print(' rel: "E(%s)",' % (rpy), end='')
44
- if xyz is not None:
45
- print(' rel: [%s],' % (xyz), end='')
46
-
47
- elem = link.find('geometry/box')
48
- if elem is not None:
49
- print(' shape: box\n size: [%s 0],' % elem.attrib['size'], end='')
50
-
51
- elem = link.find('geometry/sphere')
52
- if elem is not None:
53
- print(' shape: sphere\n size: [0 0 0 %s],' % elem.attrib['radius'], end='')
54
-
55
- elem = link.find('geometry/cylinder')
56
- if elem is not None:
57
- print(' shape: cylinder\n size: [0 0 %s %s],' % (elem.attrib['length'], elem.attrib['radius']), end='')
58
-
59
- elem = link.find('geometry/mesh')
60
- if elem is not None:
61
- filename = elem.attrib['filename'].replace(args.meshRemove,'',1)
62
- if args.meshExt is not None:
63
- filename = filename[:-3] + args.meshExt
64
- print(' mesh: <%s>,' % filename, end='')
65
- if elem.find('scale') is not None:
66
- print(' meshscale: [%s],' % elem.attrib['scale'], end='')
67
-
68
- elem = link.find('material/color')
69
- if elem is not None:
70
- print(' color: [%s],' % elem.attrib['rgba'], end='')
71
-
72
- # elem = link.find('material')
73
- # if elem is not None:
74
- # if elem.attrib['name'] is not None:
75
- # print('colorName:%s' % elem.attrib['name'])
76
-
77
-
78
- links = xmlData.findall('./link')
79
- for link in links:
80
- name = link.attrib['name']
81
- print('%s: {' % name, end='')
82
-
83
- elem = link.find('inertial/mass')
84
- if elem is not None:
85
- print(' mass: %s,' % elem.attrib['value'], end='')
86
-
87
- elem = link.find('inertial/inertia')
88
- if elem is not None:
89
- print(' inertia: [%s %s %s %s %s %s],' % (
90
- elem.attrib['ixx'],
91
- elem.attrib['ixy'],
92
- elem.attrib['ixz'],
93
- elem.attrib['iyy'],
94
- elem.attrib['iyz'],
95
- elem.attrib['izz']), end='')
96
-
97
- print('}') # end of body
98
-
99
- # visual shape
100
- for visual in link.findall('visual'):
101
- print('%s_0 (%s): {' % (name, name), end='')
102
- writeShape(visual)
103
- #if not useCollisionShapes:
104
- # print(' contact: -2,', end='')
105
- print(' visual: true }') # end of shape
106
-
107
- # collision shape
108
- if useCollisionShapes:
109
- for collision in link.findall('collision'):
110
- print('%s_1 (%s): {' % (name, name), end='')
111
- print(' color: [.8 .2 .2 .5],', end='')
112
- writeShape(collision)
113
- print(' contact: -2 }') # end of shape
114
-
115
-
116
- joints = xmlData.findall('./joint')
117
- for joint in joints:
118
- name = joint.attrib['name']
119
- if joint.find('child') is not None:
120
-
121
- parent = joint.find('parent').attrib['link']
122
-
123
- # add an origin frame as pre frame?
124
- elem = joint.find('origin')
125
- if elem is not None:
126
- xyz = elem.attrib.get('xyz')
127
- rpy = elem.attrib.get('rpy')
128
- if rpy=='0 0 0':
129
- rpy=None
130
- if xyz=='0 0 0':
131
- xyz=None
132
- if xyz is not None and rpy is not None:
133
- print('%s (%s): { Q: "t(%s) E(%s)" }' % (name+'_origin', parent, xyz, rpy))
134
- parent = name+'_origin'
135
- elif rpy is not None:
136
- print('%s (%s): { Q: "E(%s)" }' % (name+'_origin', parent, rpy))
137
- parent = name+'_origin'
138
- elif xyz is not None:
139
- print('%s (%s): { Q: [%s] }' % (name+'_origin', parent, xyz))
140
- parent = name+'_origin'
141
-
142
- #print('%s (%s): {' % (name, parent), end='')
143
- print('%s (%s %s): {' % (name, parent, joint.find('child').attrib['link']), end='')
144
-
145
- # figure out joint type
146
- att = joint.attrib.get('type')
147
-
148
- if att in ['revolute', 'continuous']:
149
- elem = joint.find('axis')
150
- if elem is not None:
151
- axis = elem.attrib['xyz']
152
- if axis=='1 0 0':
153
- print(' joint: hingeX,', end='')
154
- elif axis=='0 1 0':
155
- print(' joint: hingeY,', end='')
156
- elif axis=='0 0 1':
157
- print(' joint: hingeZ,', end='')
158
- elif axis=='0 0 -1':
159
- print(' joint: hingeZ, joint_scale: -1,', end='')
160
- else:
161
- raise Exception('CAN ONLY PROCESS X Y Z prismatic joints, not', axis)
162
- else:
163
- print(' joint: hingeX,', end='')
164
-
165
- if att == 'prismatic':
166
- elem = joint.find('axis')
167
- if elem is not None:
168
- axis = elem.attrib['xyz']
169
- if axis=='1 0 0':
170
- print(' joint: transX,', end='')
171
- elif axis=='0 1 0':
172
- print(' joint: transY,', end='')
173
- elif axis=='0 -1 0':
174
- print(' joint: transY, joint_scale: -1,', end='')
175
- elif axis=='0 0 1':
176
- print(' joint: transZ,', end='')
177
- elif axis=='0 0 -1':
178
- print(' joint: transZ, joint_scale: -1,', end='')
179
- else:
180
- raise Exception('CAN ONLY PROCESS X Y Z prismatic joints, not', axis)
181
- else:
182
- print(' joint: transX,', end='')
183
-
184
- if att == 'fixed':
185
- print(' joint: rigid,', end='')
186
-
187
- elem = joint.find('mimic')
188
- if elem is not None:
189
- print(' mimic: %s,' % elem.attrib['joint'], end='')
190
-
191
- #elem = joint.find('axis')
192
- #if elem is not None:
193
- # print('axis:[%s]' % elem.attrib['xyz'])
194
-
195
- elem = joint.find('limit')
196
- if elem is not None:
197
- lo = elem.attrib.get('lower')
198
- up = elem.attrib.get('upper')
199
- eff = elem.attrib.get('effort')
200
- vel = elem.attrib.get('velocity')
201
- if eff=='0':
202
- eff=None
203
- if vel=='0':
204
- vel=None
205
- if lo is not None:
206
- print(' limits: [%s %s],' % (lo, up), end='')
207
- if vel is not None:
208
- print(' ctrl_limits: [%s -1 %s],' % (vel, eff), end='') #the 2nd value is an acceleration limit
209
- else:
210
- elem = joint.find('safety_controller')
211
- if elem is not None:
212
- lo = elem.attrib.get('soft_lower_limit')
213
- up = elem.attrib.get('soft_upper_limit')
214
- if lo is not None:
215
- print(' limits: [%s %s],' % (lo, up), end='')
216
-
217
- print('}')
218
-
219
- #print('Edit %s (%s): {}' % (joint.find('child').attrib['link'], name) )
220
-
221
- #print(etree.tostring(links[22]))
222
- #print(etree.tostring(joints[0]))
robotic/ry-urdf2yaml DELETED
@@ -1,250 +0,0 @@
1
- #!/usr/bin/env python3
2
-
3
- import sys
4
- from lxml import etree
5
- import argparse
6
- import yaml
7
- #from ruamel import yaml
8
-
9
- parser = argparse.ArgumentParser(description='convert urdf to yaml (rai convention)')
10
-
11
- parser.add_argument('urdf_file', type=str,
12
- help='required input file')
13
-
14
- parser.add_argument('-coll', type=bool, default=False,
15
- help='use collision shapes?')
16
-
17
- parser.add_argument('-meshRemove', type=str, default='package://',
18
- help='a prefix from the mesh files to be removed')
19
-
20
- parser.add_argument('-meshExt', type=str,
21
- help='overwrite the mesh file extension')
22
-
23
- args = parser.parse_args()
24
-
25
- # yaml dump tweaks
26
- class noflow_dict(dict):
27
- pass
28
- def noflow_dict_rep(dumper, data):
29
- return dumper.represent_mapping("tag:yaml.org,2002:map", data, flow_style=False)
30
- yaml.add_representer(noflow_dict, noflow_dict_rep)
31
-
32
- class quoted_string(str):
33
- pass
34
- def quoted_string_rep(dumper, data):
35
- return dumper.represent_scalar("tag:yaml.org,2002:str", data, style='"')
36
- yaml.add_representer(quoted_string, quoted_string_rep)
37
-
38
- def writeShape(_elem, link):
39
- elem = link.find('origin')
40
- if elem is not None:
41
- xyz = elem.attrib.get('xyz')
42
- rpy = elem.attrib.get('rpy')
43
- if rpy=='0 0 0':
44
- rpy=None
45
- if xyz=='0 0 0':
46
- xyz=None
47
- if xyz is not None and rpy is not None:
48
- _elem['rel'] = quoted_string("t(%s) E(%s)" % (xyz, rpy))
49
- else:
50
- if rpy is not None:
51
- _elem['rel'] = quoted_string("E(%s)" % (rpy))
52
- if xyz is not None:
53
- _elem['rel'] = quoted_string("[%s]" % (xyz))
54
-
55
- elem = link.find('geometry/box')
56
- if elem is not None:
57
- _elem['shape']='box'
58
- _elem['size'] = [float(s) for s in elem.attrib['size'].split()]
59
-
60
- elem = link.find('geometry/sphere')
61
- if elem is not None:
62
- _elem['shape']='sphere'
63
- _elem['size'] = [float(elem.attrib['radius'])]
64
-
65
- elem = link.find('geometry/cylinder')
66
- if elem is not None:
67
- _elem['shape']='cylinder'
68
- _elem['size'] = [float(elem.attrib['length']), float(elem.attrib['radius'])]
69
-
70
- elem = link.find('geometry/mesh')
71
- if elem is not None:
72
- filename = elem.attrib['filename'].replace(args.meshRemove,'',1)
73
- if args.meshExt is not None:
74
- filename = filename[:-3] + args.meshExt
75
- _elem['mesh'] = '<%s>' % filename
76
- if elem.find('scale') is not None:
77
- _elem['meshscale'] = float(elem.attrib['scale'])
78
-
79
- elem = link.find('material/color')
80
- if elem is not None:
81
- _elem['color'] = elem.attrib['rgba']
82
-
83
- # elem = link.find('material')
84
- # if elem is not None:
85
- # if elem.attrib['name'] is not None:
86
- # print('colorName:%s' % elem.attrib['name'])
87
-
88
-
89
- def addLink(config, link, useCollisionShapes):
90
- name = link.attrib['name']
91
- _link = dict()
92
- config[name] = _link
93
-
94
- elem = link.find('inertial/mass')
95
- if elem is not None:
96
- _link['mass'] = float(elem.attrib['value'])
97
-
98
- elem = link.find('inertial/inertia')
99
- if elem is not None:
100
- _link['inertia'] = [float(elem.attrib['ixx']), float(elem.attrib['ixy']), float(elem.attrib['ixz']),
101
- float(elem.attrib['iyy']), float(elem.attrib['iyz']),
102
- float(elem.attrib['izz'])]
103
-
104
- # visual shape
105
- for visual in link.findall('visual'):
106
- _shape = dict()
107
- config[f'{name}_0 ({name})'] = _shape
108
- writeShape(_shape, visual)
109
- _shape['visual'] = True
110
-
111
- # collision shape
112
- if useCollisionShapes:
113
- for collision in link.findall('collision'):
114
- _shape = dict()
115
- config[f'{name}_1 ({name})'] = _shape
116
- _shape['color'] = [.8, .2, .2, .5]
117
- writeShape(_shape, collision)
118
- _shape['contact'] = -2
119
-
120
- def addJoint(config, joint):
121
- name = joint.attrib['name']
122
-
123
- if joint.find('child') is not None:
124
-
125
- parent = joint.find('parent').attrib['link']
126
-
127
- # add an origin frame as pre frame?
128
- elem = joint.find('origin')
129
- if elem is not None:
130
- xyz = elem.attrib.get('xyz')
131
- rpy = elem.attrib.get('rpy')
132
- if rpy=='0 0 0':
133
- rpy=None
134
- if xyz=='0 0 0':
135
- xyz=None
136
- if xyz is not None and rpy is not None:
137
- _joint = dict()
138
- config[f'{name+"_origin"} ({parent})'] = _joint
139
- _joint['Q'] = quoted_string("t(%s) E(%s)" % (xyz, rpy))
140
- parent = name+'_origin'
141
- elif rpy is not None:
142
- _joint = dict()
143
- config[f'{name+"_origin"} ({parent})'] = _joint
144
- _joint['Q'] = quoted_string("E(%s)" % (rpy))
145
- parent = name+'_origin'
146
- elif xyz is not None:
147
- _joint = dict()
148
- config[f'{name+"_origin"} ({parent})'] = _joint
149
- _joint['Q'] = quoted_string("t(%s)" % (xyz))
150
- parent = name+'_origin'
151
-
152
- _joint = dict()
153
- config[f'{name} ({parent} {joint.find("child").attrib["link"]})'] = _joint
154
-
155
- # figure out joint type
156
- att = joint.attrib.get('type')
157
-
158
- if att in ['revolute', 'continuous']:
159
- elem = joint.find('axis')
160
- if elem is not None:
161
- axis = elem.attrib['xyz']
162
- if axis=='1 0 0':
163
- _joint['joint'] = 'hingeX'
164
- elif axis=='0 1 0':
165
- _joint['joint'] = 'hingeY'
166
- elif axis=='0 0 1':
167
- _joint['joint'] = 'hingeZ'
168
- elif axis=='0 0 -1':
169
- _joint['joint'] = 'hingeZ'
170
- _joint['joint_scale'] = -1
171
- else:
172
- raise Exception('CAN ONLY PROCESS X Y Z prismatic joints, not', axis)
173
- else:
174
- _joint['joint'] = 'hingeX'
175
-
176
- if att == 'prismatic':
177
- elem = joint.find('axis')
178
- if elem is not None:
179
- axis = elem.attrib['xyz']
180
- if axis=='1 0 0':
181
- _joint['joint'] = 'transX'
182
- elif axis=='-1 0 0':
183
- _joint['joint'] = 'transX'
184
- _joint['joint_scale'] = -1
185
- elif axis=='0 1 0':
186
- _joint['joint'] = 'transY'
187
- elif axis=='0 -1 0':
188
- _joint['joint'] = 'transY'
189
- _joint['joint_scale'] = -1
190
- elif axis=='0 0 1':
191
- _joint['joint'] = 'transZ'
192
- elif axis=='0 0 -1':
193
- _joint['joint'] = 'transZ'
194
- _joint['joint_scale'] = -1
195
- else:
196
- raise Exception('CAN ONLY PROCESS X Y Z prismatic joints, not', axis)
197
- else:
198
- _joint['joint'] = 'transX'
199
-
200
- if att == 'fixed':
201
- _joint['joint'] = 'rigid'
202
-
203
- elem = joint.find('mimic')
204
- if elem is not None:
205
- _joint['mimic'] = elem.attrib['joint']
206
-
207
- elem = joint.find('limit')
208
- if elem is not None:
209
- lo = elem.attrib.get('lower')
210
- up = elem.attrib.get('upper')
211
- eff = elem.attrib.get('effort')
212
- vel = elem.attrib.get('velocity')
213
- if eff=='0':
214
- eff=None
215
- if vel=='0':
216
- vel=None
217
- if lo is not None:
218
- _joint['limits'] = [float(lo), float(up)]
219
- if vel is not None:
220
- _joint['ctrl_limits'] = [float(vel), -1, float(eff)] #the 2nd value is an acceleration limit
221
- else:
222
- elem = joint.find('safety_controller')
223
- if elem is not None:
224
- lo = float(elem.attrib.get('soft_lower_limit'))
225
- up = float(elem.attrib.get('soft_upper_limit'))
226
- if lo is not None:
227
- _joint['limits'] = [lo, up]
228
-
229
- #print(etree.tostring(links[22]))
230
- #print(etree.tostring(joints[0]))
231
-
232
- def main():
233
- inFile = args.urdf_file
234
- xmlData = etree.parse(inFile)
235
-
236
- config = dict()
237
-
238
- links = xmlData.findall('/link')
239
- for link in links:
240
- addLink(config, link, args.coll)
241
-
242
- joints = xmlData.findall('/joint')
243
- for joint in joints:
244
- addJoint(config, joint)
245
-
246
- with open('z.yaml', 'w') as fil:
247
- yaml.dump(noflow_dict(config), fil, default_flow_style=True, sort_keys=False, width=500)
248
-
249
- if __name__ == "__main__":
250
- main()