robotic 0.2.9.dev1__cp311-cp311-manylinux2014_x86_64.whl → 0.3.4.dev5__cp311-cp311-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 (416) hide show
  1. robotic/DataGen.pyi +11 -1
  2. robotic/__init__.py +8 -1
  3. robotic/_robotic.pyi +228 -110
  4. robotic/_robotic.so +0 -0
  5. robotic/algo.pyi +17 -0
  6. robotic/include/rai/{Geo → Algo}/Lewiner/MarchingCubes.h +0 -29
  7. robotic/include/rai/Algo/SplineCtrlFeed.h +1 -1
  8. robotic/include/rai/Algo/marching_cubes.h +9 -0
  9. robotic/include/rai/Algo/rungeKutta.h +2 -2
  10. robotic/include/rai/Algo/spline.h +4 -8
  11. robotic/include/rai/Algo/trilinear.h +10 -0
  12. robotic/include/rai/Control/CtrlSolver.h +1 -1
  13. robotic/include/rai/Control/TimingMPC.h +2 -2
  14. robotic/include/rai/Core/array.h +99 -64
  15. robotic/include/rai/Core/array.ipp +290 -139
  16. robotic/include/rai/Core/arrayDouble.h +36 -26
  17. robotic/include/rai/Core/defines.h +7 -9
  18. robotic/include/rai/Core/graph.h +27 -23
  19. robotic/include/rai/Core/h5.h +3 -1
  20. robotic/include/rai/Core/thread.h +12 -12
  21. robotic/include/rai/Core/util.h +58 -79
  22. robotic/include/rai/DataGen/rndStableConfigs.h +1 -0
  23. robotic/include/rai/DataGen/shapenetGrasps.h +5 -3
  24. robotic/include/rai/Geo/depth2PointCloud.h +2 -0
  25. robotic/include/rai/Geo/geo.h +23 -15
  26. robotic/include/rai/Geo/{fclInterface.h → i_fcl.h} +3 -1
  27. robotic/include/rai/Geo/mesh.h +18 -13
  28. robotic/include/rai/Geo/pairCollision.h +43 -43
  29. robotic/include/rai/Geo/signedDistanceFunctions.h +7 -5
  30. robotic/include/rai/Geo/stb_image.h +1 -1
  31. robotic/include/rai/Gui/RenderData.h +9 -7
  32. robotic/include/rai/Gui/opengl.h +6 -6
  33. robotic/include/rai/Gui/plot.h +1 -1
  34. robotic/include/rai/KOMO/komo.h +6 -3
  35. robotic/include/rai/KOMO/komo_NLP.h +2 -2
  36. robotic/include/rai/KOMO/manipTools.h +7 -2
  37. robotic/include/rai/KOMO/testProblems_KOMO.h +5 -9
  38. robotic/include/rai/Kin/F_forces.h +3 -3
  39. robotic/include/rai/Kin/cameraview.h +24 -36
  40. robotic/include/rai/Kin/dof_forceExchange.h +7 -7
  41. robotic/include/rai/Kin/feature.h +1 -1
  42. robotic/include/rai/Kin/frame.h +22 -24
  43. robotic/include/rai/Kin/{kin_physx.h → i_Physx.h} +10 -8
  44. robotic/include/rai/Kin/kin.h +29 -21
  45. robotic/include/rai/Kin/proxy.h +1 -1
  46. robotic/include/rai/Kin/simulation.h +20 -10
  47. robotic/include/rai/Kin/viewer.h +14 -1
  48. robotic/include/rai/LGP/LGP_TAMP_Abstraction.h +33 -0
  49. robotic/include/rai/LGP/LGP_Tool.h +4 -25
  50. robotic/include/rai/LGP/LGP_computers.h +1 -1
  51. robotic/include/rai/LGP/LGP_computers2.h +196 -0
  52. robotic/include/rai/LGP/NLP_Descriptor.h +5 -0
  53. robotic/include/rai/Logic/folWorld.h +1 -1
  54. robotic/include/rai/Logic/treeSearchDomain.h +2 -2
  55. robotic/include/rai/Optim/BayesOpt.h +13 -6
  56. robotic/include/rai/Optim/CMA/boundary_transformation.h +73 -0
  57. robotic/include/rai/Optim/CMA/cmaes.h +175 -0
  58. robotic/include/rai/Optim/CMA/cmaes_interface.h +68 -0
  59. robotic/include/rai/Optim/GlobalIterativeNewton.h +7 -3
  60. robotic/include/rai/Optim/NLP.h +23 -7
  61. robotic/include/rai/Optim/NLP_GraphSolver.h +1 -1
  62. robotic/include/rai/Optim/NLP_Solver.h +5 -5
  63. robotic/include/rai/Optim/constrained.h +4 -4
  64. robotic/include/rai/Optim/{opt-ceres.h → i_Ceres.h} +2 -2
  65. robotic/include/rai/Optim/{opt-nlopt.h → i_NLopt.h} +4 -0
  66. robotic/include/rai/Optim/lagrangian.h +7 -5
  67. robotic/include/rai/Optim/liblbfgs/liblbfgs.h +755 -0
  68. robotic/include/rai/Optim/m_EvoStrategies.h +114 -0
  69. robotic/include/rai/Optim/{gradient.h → m_Gradient.h} +13 -12
  70. robotic/include/rai/Optim/m_LBFGS.h +21 -0
  71. robotic/include/rai/Optim/m_LeastSquaresZeroOrder.h +104 -0
  72. robotic/include/rai/Optim/m_LocalGreedy.h +31 -0
  73. robotic/include/rai/Optim/m_NelderMead.h +23 -0
  74. robotic/include/rai/Optim/{newton.h → m_Newton.h} +7 -4
  75. robotic/include/rai/Optim/{SlackGaussNewton.h → m_SlackGaussNewton.h} +0 -10
  76. robotic/include/rai/Optim/options.h +8 -7
  77. robotic/include/rai/Optim/primalDual.h +10 -6
  78. robotic/include/rai/Optim/testProblems_Opt.h +25 -19
  79. robotic/include/rai/Optim/utils.h +16 -85
  80. robotic/include/rai/PathAlgos/ConfigurationProblem.h +3 -2
  81. robotic/include/rai/PathAlgos/RRT_PathFinder.h +2 -2
  82. robotic/include/rai/Perception/pcl.h +10 -10
  83. robotic/include/rai/Perception/surfels.h +1 -1
  84. robotic/include/rai/Search/TreeSearchNode.h +1 -1
  85. robotic/include/rai/ry/py-algo.h +17 -0
  86. robotic/include/rai/ry/types.h +4 -2
  87. robotic/librai.so +0 -0
  88. robotic/manipulation.py +5 -7
  89. robotic/meshTool +0 -0
  90. robotic/mujoco-import.py +8 -0
  91. robotic/rai-robotModels/g1/g1.g +11 -2
  92. robotic/rai-robotModels/g1/g1_29dof_conv.yml +64 -0
  93. robotic/rai-robotModels/g1/g1_clean.g +38 -73
  94. robotic/rai-robotModels/g1/meshes/head_link.h5 +0 -0
  95. robotic/rai-robotModels/g1/meshes/left_ankle_pitch_link.h5 +0 -0
  96. robotic/rai-robotModels/g1/meshes/left_ankle_roll_link.h5 +0 -0
  97. robotic/rai-robotModels/g1/meshes/left_elbow_link.h5 +0 -0
  98. robotic/rai-robotModels/g1/meshes/left_hip_pitch_link.h5 +0 -0
  99. robotic/rai-robotModels/g1/meshes/left_hip_roll_link.h5 +0 -0
  100. robotic/rai-robotModels/g1/meshes/left_hip_yaw_link.h5 +0 -0
  101. robotic/rai-robotModels/g1/meshes/left_knee_link.h5 +0 -0
  102. robotic/rai-robotModels/g1/meshes/left_rubber_hand.h5 +0 -0
  103. robotic/rai-robotModels/g1/meshes/left_shoulder_pitch_link.h5 +0 -0
  104. robotic/rai-robotModels/g1/meshes/left_shoulder_roll_link.h5 +0 -0
  105. robotic/rai-robotModels/g1/meshes/left_shoulder_yaw_link.h5 +0 -0
  106. robotic/rai-robotModels/g1/meshes/left_wrist_pitch_link.h5 +0 -0
  107. robotic/rai-robotModels/g1/meshes/left_wrist_roll_link.h5 +0 -0
  108. robotic/rai-robotModels/g1/meshes/left_wrist_yaw_link.h5 +0 -0
  109. robotic/rai-robotModels/g1/meshes/logo_link.h5 +0 -0
  110. robotic/rai-robotModels/g1/meshes/pelvis.h5 +0 -0
  111. robotic/rai-robotModels/g1/meshes/pelvis_contour_link.h5 +0 -0
  112. robotic/rai-robotModels/g1/meshes/right_ankle_pitch_link.h5 +0 -0
  113. robotic/rai-robotModels/g1/meshes/right_ankle_roll_link.h5 +0 -0
  114. robotic/rai-robotModels/g1/meshes/right_elbow_link.h5 +0 -0
  115. robotic/rai-robotModels/g1/meshes/right_hip_pitch_link.h5 +0 -0
  116. robotic/rai-robotModels/g1/meshes/right_hip_roll_link.h5 +0 -0
  117. robotic/rai-robotModels/g1/meshes/right_hip_yaw_link.h5 +0 -0
  118. robotic/rai-robotModels/g1/meshes/right_knee_link.h5 +0 -0
  119. robotic/rai-robotModels/g1/meshes/right_rubber_hand.h5 +0 -0
  120. robotic/rai-robotModels/g1/meshes/right_shoulder_pitch_link.h5 +0 -0
  121. robotic/rai-robotModels/g1/meshes/right_shoulder_roll_link.h5 +0 -0
  122. robotic/rai-robotModels/g1/meshes/right_shoulder_yaw_link.h5 +0 -0
  123. robotic/rai-robotModels/g1/meshes/right_wrist_pitch_link.h5 +0 -0
  124. robotic/rai-robotModels/g1/meshes/right_wrist_roll_link.h5 +0 -0
  125. robotic/rai-robotModels/g1/meshes/right_wrist_yaw_link.h5 +0 -0
  126. robotic/rai-robotModels/g1/meshes/torso_link.h5 +0 -0
  127. robotic/rai-robotModels/g1/meshes/waist_roll_link.h5 +0 -0
  128. robotic/rai-robotModels/g1/meshes/waist_support_link.h5 +0 -0
  129. robotic/rai-robotModels/g1/meshes/waist_yaw_link.h5 +0 -0
  130. robotic/rai-robotModels/objects/shelf.g +1 -1
  131. robotic/rai-robotModels/panda/meshes/finger.h5 +0 -0
  132. robotic/rai-robotModels/panda/meshes/hand.h5 +0 -0
  133. robotic/rai-robotModels/panda/meshes/link0.h5 +0 -0
  134. robotic/rai-robotModels/panda/meshes/link1.h5 +0 -0
  135. robotic/rai-robotModels/panda/meshes/link2.h5 +0 -0
  136. robotic/rai-robotModels/panda/meshes/link3.h5 +0 -0
  137. robotic/rai-robotModels/panda/meshes/link4.h5 +0 -0
  138. robotic/rai-robotModels/panda/meshes/link5.h5 +0 -0
  139. robotic/rai-robotModels/panda/meshes/link6.h5 +0 -0
  140. robotic/rai-robotModels/panda/meshes/link7.h5 +0 -0
  141. robotic/rai-robotModels/panda/panda.g +10 -10
  142. robotic/rai-robotModels/panda/panda_arm_hand_conv.g +24 -0
  143. robotic/rai-robotModels/panda/panda_arm_hand_conv.yml +24 -0
  144. robotic/rai-robotModels/panda/panda_clean.g +21 -45
  145. robotic/rai-robotModels/panda/panda_gripper.g +5 -7
  146. robotic/rai-robotModels/panda/panda_withoutCollisionModels.g +3 -11
  147. robotic/rai-robotModels/pr2/meshes/base.h5 +0 -0
  148. robotic/rai-robotModels/pr2/meshes/base_color.png +0 -0
  149. robotic/rai-robotModels/pr2/meshes/caster.h5 +0 -0
  150. robotic/rai-robotModels/pr2/meshes/elbow_flex.h5 +0 -0
  151. robotic/rai-robotModels/pr2/meshes/elbow_flex_color.png +0 -0
  152. robotic/rai-robotModels/pr2/meshes/forearm.h5 +0 -0
  153. robotic/rai-robotModels/pr2/meshes/forearm_color.png +0 -0
  154. robotic/rai-robotModels/pr2/meshes/forearm_roll.h5 +0 -0
  155. robotic/rai-robotModels/pr2/meshes/gripper_palm.h5 +0 -0
  156. robotic/rai-robotModels/pr2/meshes/gripper_palm_color.png +0 -0
  157. robotic/rai-robotModels/pr2/meshes/head_pan.h5 +0 -0
  158. robotic/rai-robotModels/pr2/meshes/head_pan_color.png +0 -0
  159. robotic/rai-robotModels/pr2/meshes/head_tilt.h5 +0 -0
  160. robotic/rai-robotModels/pr2/meshes/head_tilt_color.png +0 -0
  161. robotic/rai-robotModels/pr2/meshes/l_finger.h5 +0 -0
  162. robotic/rai-robotModels/pr2/meshes/l_finger_color.png +0 -0
  163. robotic/rai-robotModels/pr2/meshes/l_finger_tip.h5 +0 -0
  164. robotic/rai-robotModels/pr2/meshes/l_finger_tip_color.png +0 -0
  165. robotic/rai-robotModels/pr2/meshes/shoulder_lift.h5 +0 -0
  166. robotic/rai-robotModels/pr2/meshes/shoulder_lift_color.png +0 -0
  167. robotic/rai-robotModels/pr2/meshes/shoulder_pan.h5 +0 -0
  168. robotic/rai-robotModels/pr2/meshes/shoulder_pan_color.png +0 -0
  169. robotic/rai-robotModels/pr2/meshes/tilting_hokuyo.h5 +0 -0
  170. robotic/rai-robotModels/pr2/meshes/tilting_hokuyo_color.png +0 -0
  171. robotic/rai-robotModels/pr2/meshes/torso_lift.h5 +0 -0
  172. robotic/rai-robotModels/pr2/meshes/torso_lift_color.png +0 -0
  173. robotic/rai-robotModels/pr2/meshes/upper_arm.h5 +0 -0
  174. robotic/rai-robotModels/pr2/meshes/upper_arm_color.png +0 -0
  175. robotic/rai-robotModels/pr2/meshes/upper_arm_roll.h5 +0 -0
  176. robotic/rai-robotModels/pr2/meshes/upper_arm_roll_color.png +0 -0
  177. robotic/rai-robotModels/pr2/meshes/wheel.h5 +0 -0
  178. robotic/rai-robotModels/pr2/meshes/wheel_color.png +0 -0
  179. robotic/rai-robotModels/pr2/meshes/wrist_color.png +0 -0
  180. robotic/rai-robotModels/pr2/meshes/wrist_flex.h5 +0 -0
  181. robotic/rai-robotModels/pr2/meshes/wrist_roll.h5 +0 -0
  182. robotic/rai-robotModels/pr2/pr2.g +12 -12
  183. robotic/rai-robotModels/pr2/pr2_clean.g +122 -118
  184. robotic/rai-robotModels/pr2/pr2_conv.g +218 -0
  185. robotic/rai-robotModels/pr2/pr2_modifications.g +2 -2
  186. robotic/rai-robotModels/ranger/meshes/ranger_mini3.h5 +0 -0
  187. robotic/rai-robotModels/ranger/meshes/ranger_mini_v3_wheel.h5 +0 -0
  188. robotic/rai-robotModels/ranger/meshes/ranger_mini_v3_wheel_right.h5 +0 -0
  189. robotic/rai-robotModels/ranger/ranger.g +8 -8
  190. robotic/rai-robotModels/ranger/ranger_clean.g +5 -5
  191. robotic/rai-robotModels/ranger/ranger_mini_conv.g +14 -0
  192. robotic/rai-robotModels/robotiq/meshes/robotiq_arg2f_85_base_link.h5 +0 -0
  193. robotic/rai-robotModels/robotiq/meshes/robotiq_arg2f_85_inner_finger.h5 +0 -0
  194. robotic/rai-robotModels/robotiq/meshes/robotiq_arg2f_85_inner_knuckle.h5 +0 -0
  195. robotic/rai-robotModels/robotiq/meshes/robotiq_arg2f_85_outer_finger.h5 +0 -0
  196. robotic/rai-robotModels/robotiq/meshes/robotiq_arg2f_85_outer_knuckle.h5 +0 -0
  197. robotic/rai-robotModels/robotiq/robotiq.g +2 -2
  198. robotic/rai-robotModels/robotiq/robotiq_arg2f_85_model_conv.yml +19 -0
  199. robotic/rai-robotModels/robotiq/robotiq_clean.g +16 -16
  200. robotic/rai-robotModels/scenarios/ballFinger.g +2 -2
  201. robotic/rai-robotModels/scenarios/liftRing.g +2 -2
  202. robotic/rai-robotModels/scenarios/pandaFloatingGripper.g +1 -1
  203. robotic/rai-robotModels/scenarios/pandaSingle.g +1 -1
  204. robotic/rai-robotModels/scenarios/panda_fixRobotiq.g +3 -3
  205. robotic/rai-robotModels/tests/arm.g +18 -19
  206. robotic/rai-robotModels/tests/compound.g +3 -6
  207. robotic/rai-robotModels/ur10/meshes/base.h5 +0 -0
  208. robotic/rai-robotModels/ur10/meshes/forearm.h5 +0 -0
  209. robotic/rai-robotModels/ur10/meshes/shoulder.h5 +0 -0
  210. robotic/rai-robotModels/ur10/meshes/upperarm.h5 +0 -0
  211. robotic/rai-robotModels/ur10/meshes/wrist1.h5 +0 -0
  212. robotic/rai-robotModels/ur10/meshes/wrist2.h5 +0 -0
  213. robotic/rai-robotModels/ur10/meshes/wrist3.h5 +0 -0
  214. robotic/rai-robotModels/ur10/ur10.g +2 -2
  215. robotic/rai-robotModels/ur10/ur10_clean.g +8 -8
  216. robotic/rai-robotModels/ur10/ur10_conv.g +17 -0
  217. robotic/ry-h5info +3 -12
  218. robotic/ry-test +5 -4
  219. robotic/ry-urdfConvert.py +74 -0
  220. robotic/ry-view +28 -6
  221. robotic/src/cleanMeshes.py +59 -0
  222. robotic/src/h5_helper.py +46 -0
  223. robotic/src/h5_helper.py~ +42 -0
  224. robotic/src/mesh_helper.py +395 -0
  225. robotic/{rai-robotModels/ranger/meshes/cleanMeshes.mlx → src/meshlabFilters.mlx} +0 -3
  226. robotic/src/mujoco_io.py +242 -0
  227. robotic/src/urdf_io.py +237 -0
  228. robotic/src/yaml_helper.py +29 -0
  229. robotic/version.py +1 -1
  230. robotic-0.3.4.dev5.data/scripts/ry-h5info +23 -0
  231. {robotic-0.2.9.dev1.data → robotic-0.3.4.dev5.data}/scripts/ry-test +5 -4
  232. robotic-0.3.4.dev5.data/scripts/ry-urdfConvert.py +74 -0
  233. robotic-0.3.4.dev5.data/scripts/ry-view +46 -0
  234. {robotic-0.2.9.dev1.dist-info → robotic-0.3.4.dev5.dist-info}/METADATA +18 -22
  235. robotic-0.3.4.dev5.dist-info/RECORD +386 -0
  236. {robotic-0.2.9.dev1.dist-info → robotic-0.3.4.dev5.dist-info}/WHEEL +1 -1
  237. robotic/nlp.py +0 -113
  238. robotic/rai-robotModels/baxter/baxter.g +0 -49
  239. robotic/rai-robotModels/baxter/baxter_clean.g +0 -116
  240. robotic/rai-robotModels/baxter/baxter_clean2.g +0 -205
  241. robotic/rai-robotModels/baxter/baxter_clean3.g +0 -223
  242. robotic/rai-robotModels/baxter/baxter_description/meshes/base/PEDESTAL.ply +0 -0
  243. robotic/rai-robotModels/baxter/baxter_description/meshes/base/pedestal_link_collision.ply +0 -0
  244. robotic/rai-robotModels/baxter/baxter_description/meshes/head/H0.ply +0 -0
  245. robotic/rai-robotModels/baxter/baxter_description/meshes/head/H1.ply +0 -0
  246. robotic/rai-robotModels/baxter/baxter_description/meshes/lower_elbow/E1.ply +0 -0
  247. robotic/rai-robotModels/baxter/baxter_description/meshes/lower_forearm/W1.ply +0 -0
  248. robotic/rai-robotModels/baxter/baxter_description/meshes/lower_shoulder/S1.ply +0 -0
  249. robotic/rai-robotModels/baxter/baxter_description/meshes/torso/base_link.ply +0 -0
  250. robotic/rai-robotModels/baxter/baxter_description/meshes/torso/base_link_collision.ply +0 -0
  251. robotic/rai-robotModels/baxter/baxter_description/meshes/upper_elbow/E0.ply +0 -0
  252. robotic/rai-robotModels/baxter/baxter_description/meshes/upper_forearm/W0.ply +0 -0
  253. robotic/rai-robotModels/baxter/baxter_description/meshes/upper_shoulder/S0.ply +0 -0
  254. robotic/rai-robotModels/baxter/baxter_description/meshes/wrist/W2.ply +0 -0
  255. robotic/rai-robotModels/baxter/baxter_new.g +0 -53
  256. robotic/rai-robotModels/baxter/rethink_ee_description/meshes/electric_gripper/electric_gripper_base.ply +0 -0
  257. robotic/rai-robotModels/baxter/rethink_ee_description/meshes/electric_gripper/fingers/extended_narrow.ply +0 -0
  258. robotic/rai-robotModels/baxter/rethink_ee_description/meshes/electric_gripper/fingers/half_round_tip.ply +0 -0
  259. robotic/rai-robotModels/baxter/rethink_ee_description/meshes/electric_gripper/fingers/paddle_tip.ply +0 -0
  260. robotic/rai-robotModels/baxter/rethink_ee_description/meshes/pneumatic_gripper/pneumatic_gripper_base.ply +0 -0
  261. robotic/rai-robotModels/baxter/rethink_ee_description/meshes/pneumatic_gripper/pneumatic_gripper_w_cup.ply +0 -0
  262. robotic/rai-robotModels/g1/meshes/head_link.ply +0 -0
  263. robotic/rai-robotModels/g1/meshes/left_ankle_pitch_link.ply +0 -0
  264. robotic/rai-robotModels/g1/meshes/left_ankle_roll_link.ply +0 -0
  265. robotic/rai-robotModels/g1/meshes/left_elbow_link.ply +0 -0
  266. robotic/rai-robotModels/g1/meshes/left_hand_index_0_link.ply +0 -0
  267. robotic/rai-robotModels/g1/meshes/left_hand_index_1_link.ply +0 -0
  268. robotic/rai-robotModels/g1/meshes/left_hand_middle_0_link.ply +0 -0
  269. robotic/rai-robotModels/g1/meshes/left_hand_middle_1_link.ply +0 -0
  270. robotic/rai-robotModels/g1/meshes/left_hand_palm_link.ply +0 -0
  271. robotic/rai-robotModels/g1/meshes/left_hand_thumb_0_link.ply +0 -0
  272. robotic/rai-robotModels/g1/meshes/left_hand_thumb_1_link.ply +0 -0
  273. robotic/rai-robotModels/g1/meshes/left_hand_thumb_2_link.ply +0 -0
  274. robotic/rai-robotModels/g1/meshes/left_hip_pitch_link.ply +0 -0
  275. robotic/rai-robotModels/g1/meshes/left_hip_roll_link.ply +0 -0
  276. robotic/rai-robotModels/g1/meshes/left_hip_yaw_link.ply +0 -0
  277. robotic/rai-robotModels/g1/meshes/left_knee_link.ply +0 -0
  278. robotic/rai-robotModels/g1/meshes/left_rubber_hand.ply +0 -0
  279. robotic/rai-robotModels/g1/meshes/left_shoulder_pitch_link.ply +0 -0
  280. robotic/rai-robotModels/g1/meshes/left_shoulder_roll_link.ply +0 -0
  281. robotic/rai-robotModels/g1/meshes/left_shoulder_yaw_link.ply +0 -0
  282. robotic/rai-robotModels/g1/meshes/left_wrist_pitch_link.ply +0 -0
  283. robotic/rai-robotModels/g1/meshes/left_wrist_roll_link.ply +0 -0
  284. robotic/rai-robotModels/g1/meshes/left_wrist_roll_rubber_hand.ply +0 -0
  285. robotic/rai-robotModels/g1/meshes/left_wrist_yaw_link.ply +0 -0
  286. robotic/rai-robotModels/g1/meshes/logo_link.ply +0 -0
  287. robotic/rai-robotModels/g1/meshes/pelvis.ply +0 -0
  288. robotic/rai-robotModels/g1/meshes/pelvis_contour_link.ply +0 -0
  289. robotic/rai-robotModels/g1/meshes/right_ankle_pitch_link.ply +0 -0
  290. robotic/rai-robotModels/g1/meshes/right_ankle_roll_link.ply +0 -0
  291. robotic/rai-robotModels/g1/meshes/right_elbow_link.ply +0 -0
  292. robotic/rai-robotModels/g1/meshes/right_hand_index_0_link.ply +0 -0
  293. robotic/rai-robotModels/g1/meshes/right_hand_index_1_link.ply +0 -0
  294. robotic/rai-robotModels/g1/meshes/right_hand_middle_0_link.ply +0 -0
  295. robotic/rai-robotModels/g1/meshes/right_hand_middle_1_link.ply +0 -0
  296. robotic/rai-robotModels/g1/meshes/right_hand_palm_link.ply +0 -0
  297. robotic/rai-robotModels/g1/meshes/right_hand_thumb_0_link.ply +0 -0
  298. robotic/rai-robotModels/g1/meshes/right_hand_thumb_1_link.ply +0 -0
  299. robotic/rai-robotModels/g1/meshes/right_hand_thumb_2_link.ply +0 -0
  300. robotic/rai-robotModels/g1/meshes/right_hip_pitch_link.ply +0 -0
  301. robotic/rai-robotModels/g1/meshes/right_hip_roll_link.ply +0 -0
  302. robotic/rai-robotModels/g1/meshes/right_hip_yaw_link.ply +0 -0
  303. robotic/rai-robotModels/g1/meshes/right_knee_link.ply +0 -0
  304. robotic/rai-robotModels/g1/meshes/right_rubber_hand.ply +0 -0
  305. robotic/rai-robotModels/g1/meshes/right_shoulder_pitch_link.ply +0 -0
  306. robotic/rai-robotModels/g1/meshes/right_shoulder_roll_link.ply +0 -0
  307. robotic/rai-robotModels/g1/meshes/right_shoulder_yaw_link.ply +0 -0
  308. robotic/rai-robotModels/g1/meshes/right_wrist_pitch_link.ply +0 -0
  309. robotic/rai-robotModels/g1/meshes/right_wrist_roll_link.ply +0 -0
  310. robotic/rai-robotModels/g1/meshes/right_wrist_roll_rubber_hand.ply +0 -0
  311. robotic/rai-robotModels/g1/meshes/right_wrist_yaw_link.ply +0 -0
  312. robotic/rai-robotModels/g1/meshes/torso_constraint_L_link.ply +0 -0
  313. robotic/rai-robotModels/g1/meshes/torso_constraint_L_rod_link.ply +0 -0
  314. robotic/rai-robotModels/g1/meshes/torso_constraint_R_link.ply +0 -0
  315. robotic/rai-robotModels/g1/meshes/torso_constraint_R_rod_link.ply +0 -0
  316. robotic/rai-robotModels/g1/meshes/torso_link.ply +0 -0
  317. robotic/rai-robotModels/g1/meshes/waist_constraint_L.ply +0 -0
  318. robotic/rai-robotModels/g1/meshes/waist_constraint_R.ply +0 -0
  319. robotic/rai-robotModels/g1/meshes/waist_roll_link.ply +0 -0
  320. robotic/rai-robotModels/g1/meshes/waist_support_link.ply +0 -0
  321. robotic/rai-robotModels/g1/meshes/waist_yaw_link.ply +0 -0
  322. robotic/rai-robotModels/panda/franka_description/meshes/collision/finger.stl +0 -0
  323. robotic/rai-robotModels/panda/franka_description/meshes/collision/hand.stl +0 -0
  324. robotic/rai-robotModels/panda/franka_description/meshes/collision/link0.stl +0 -0
  325. robotic/rai-robotModels/panda/franka_description/meshes/collision/link1.stl +0 -0
  326. robotic/rai-robotModels/panda/franka_description/meshes/collision/link2.stl +0 -0
  327. robotic/rai-robotModels/panda/franka_description/meshes/collision/link3.stl +0 -0
  328. robotic/rai-robotModels/panda/franka_description/meshes/collision/link4.stl +0 -0
  329. robotic/rai-robotModels/panda/franka_description/meshes/collision/link5.stl +0 -0
  330. robotic/rai-robotModels/panda/franka_description/meshes/collision/link6.stl +0 -0
  331. robotic/rai-robotModels/panda/franka_description/meshes/collision/link7.stl +0 -0
  332. robotic/rai-robotModels/panda/franka_description/meshes/visual/HOWTO.sh +0 -10
  333. robotic/rai-robotModels/panda/franka_description/meshes/visual/HOWTO2.sh +0 -7
  334. robotic/rai-robotModels/panda/franka_description/meshes/visual/convMeshes.mlx +0 -38
  335. robotic/rai-robotModels/panda/franka_description/meshes/visual/finger.ply +0 -0
  336. robotic/rai-robotModels/panda/franka_description/meshes/visual/hand.ply +0 -0
  337. robotic/rai-robotModels/panda/franka_description/meshes/visual/link0.ply +0 -0
  338. robotic/rai-robotModels/panda/franka_description/meshes/visual/link1.ply +0 -0
  339. robotic/rai-robotModels/panda/franka_description/meshes/visual/link2.ply +0 -0
  340. robotic/rai-robotModels/panda/franka_description/meshes/visual/link3.ply +0 -0
  341. robotic/rai-robotModels/panda/franka_description/meshes/visual/link4.ply +0 -0
  342. robotic/rai-robotModels/panda/franka_description/meshes/visual/link5.ply +0 -0
  343. robotic/rai-robotModels/panda/franka_description/meshes/visual/link6.ply +0 -0
  344. robotic/rai-robotModels/panda/franka_description/meshes/visual/link7.ply +0 -0
  345. robotic/rai-robotModels/panda/franka_description/meshes/visual/script.mlx +0 -28
  346. robotic/rai-robotModels/pr2/pr2_description/meshes/base_v0/base.ply +0 -0
  347. robotic/rai-robotModels/pr2/pr2_description/meshes/base_v0/base_L.ply +0 -0
  348. robotic/rai-robotModels/pr2/pr2_description/meshes/base_v0/caster.ply +0 -0
  349. robotic/rai-robotModels/pr2/pr2_description/meshes/base_v0/caster_L.ply +0 -0
  350. robotic/rai-robotModels/pr2/pr2_description/meshes/base_v0/pr2_wheel.ply +0 -0
  351. robotic/rai-robotModels/pr2/pr2_description/meshes/base_v0/wheel.ply +0 -0
  352. robotic/rai-robotModels/pr2/pr2_description/meshes/forearm_v0/forearm.ply +0 -0
  353. robotic/rai-robotModels/pr2/pr2_description/meshes/forearm_v0/wrist_flex.ply +0 -0
  354. robotic/rai-robotModels/pr2/pr2_description/meshes/forearm_v0/wrist_roll.ply +0 -0
  355. robotic/rai-robotModels/pr2/pr2_description/meshes/forearm_v0/wrist_roll_L.ply +0 -0
  356. robotic/rai-robotModels/pr2/pr2_description/meshes/gripper_v0/gripper_palm.ply +0 -0
  357. robotic/rai-robotModels/pr2/pr2_description/meshes/gripper_v0/l_finger.ply +0 -0
  358. robotic/rai-robotModels/pr2/pr2_description/meshes/gripper_v0/l_finger_tip.ply +0 -0
  359. robotic/rai-robotModels/pr2/pr2_description/meshes/head_v0/head_pan.ply +0 -0
  360. robotic/rai-robotModels/pr2/pr2_description/meshes/head_v0/head_pan_L.ply +0 -0
  361. robotic/rai-robotModels/pr2/pr2_description/meshes/head_v0/head_tilt.ply +0 -0
  362. robotic/rai-robotModels/pr2/pr2_description/meshes/head_v0/head_tilt_L.ply +0 -0
  363. robotic/rai-robotModels/pr2/pr2_description/meshes/shoulder_v0/shoulder_lift.ply +0 -0
  364. robotic/rai-robotModels/pr2/pr2_description/meshes/shoulder_v0/shoulder_pan.ply +0 -0
  365. robotic/rai-robotModels/pr2/pr2_description/meshes/shoulder_v0/shoulder_yaw.ply +0 -0
  366. robotic/rai-robotModels/pr2/pr2_description/meshes/shoulder_v0/upper_arm_roll.ply +0 -0
  367. robotic/rai-robotModels/pr2/pr2_description/meshes/shoulder_v0/upper_arm_roll_L.ply +0 -0
  368. robotic/rai-robotModels/pr2/pr2_description/meshes/tilting_laser_v0/hok_tilt.ply +0 -0
  369. robotic/rai-robotModels/pr2/pr2_description/meshes/tilting_laser_v0/tilting_hokuyo.ply +0 -0
  370. robotic/rai-robotModels/pr2/pr2_description/meshes/tilting_laser_v0/tilting_hokuyo_L.ply +0 -0
  371. robotic/rai-robotModels/pr2/pr2_description/meshes/torso_v0/torso.ply +0 -0
  372. robotic/rai-robotModels/pr2/pr2_description/meshes/torso_v0/torso_lift.ply +0 -0
  373. robotic/rai-robotModels/pr2/pr2_description/meshes/torso_v0/torso_lift_L.ply +0 -0
  374. robotic/rai-robotModels/pr2/pr2_description/meshes/upper_arm_v0/elbow_flex.ply +0 -0
  375. robotic/rai-robotModels/pr2/pr2_description/meshes/upper_arm_v0/forearm_roll.ply +0 -0
  376. robotic/rai-robotModels/pr2/pr2_description/meshes/upper_arm_v0/forearm_roll_L.ply +0 -0
  377. robotic/rai-robotModels/pr2/pr2_description/meshes/upper_arm_v0/upper_arm.ply +0 -0
  378. robotic/rai-robotModels/ranger/meshes/cleanMeshes.sh +0 -8
  379. robotic/rai-robotModels/ranger/meshes/ranger_mini3.ply +0 -0
  380. robotic/rai-robotModels/ranger/meshes/ranger_mini_v3_wheel.ply +0 -0
  381. robotic/rai-robotModels/ranger/meshes/ranger_mini_v3_wheel_right.ply +0 -0
  382. robotic/rai-robotModels/robotiq/meshes/visual/robotiq_arg2f_85_base_link.ply +0 -0
  383. robotic/rai-robotModels/robotiq/meshes/visual/robotiq_arg2f_85_base_link_x.ply +0 -10
  384. robotic/rai-robotModels/robotiq/meshes/visual/robotiq_arg2f_85_inner_finger.ply +0 -0
  385. robotic/rai-robotModels/robotiq/meshes/visual/robotiq_arg2f_85_inner_knuckle.ply +0 -0
  386. robotic/rai-robotModels/robotiq/meshes/visual/robotiq_arg2f_85_outer_finger.ply +0 -0
  387. robotic/rai-robotModels/robotiq/meshes/visual/robotiq_arg2f_85_outer_knuckle.ply +0 -0
  388. robotic/rai-robotModels/robotiq/meshes/visual/robotiq_arg2f_85_pad.ply +0 -0
  389. robotic/rai-robotModels/robotiq/meshes/visual/robotiq_gripper_coupling.ply +0 -0
  390. robotic/rai-robotModels/ur10/ur_description/meshes/ur10/visual/Base.ply +0 -0
  391. robotic/rai-robotModels/ur10/ur_description/meshes/ur10/visual/Forearm.ply +0 -0
  392. robotic/rai-robotModels/ur10/ur_description/meshes/ur10/visual/Shoulder.ply +0 -0
  393. robotic/rai-robotModels/ur10/ur_description/meshes/ur10/visual/UpperArm.ply +0 -0
  394. robotic/rai-robotModels/ur10/ur_description/meshes/ur10/visual/Wrist1.ply +0 -0
  395. robotic/rai-robotModels/ur10/ur_description/meshes/ur10/visual/Wrist2.ply +0 -0
  396. robotic/rai-robotModels/ur10/ur_description/meshes/ur10/visual/Wrist3.ply +0 -0
  397. robotic/ry-urdf2rai +0 -222
  398. robotic/ry-urdf2yaml +0 -250
  399. robotic-0.2.9.dev1.data/scripts/ry-h5info +0 -32
  400. robotic-0.2.9.dev1.data/scripts/ry-urdf2rai +0 -222
  401. robotic-0.2.9.dev1.data/scripts/ry-urdf2yaml +0 -250
  402. robotic-0.2.9.dev1.data/scripts/ry-view +0 -24
  403. robotic-0.2.9.dev1.dist-info/RECORD +0 -421
  404. /robotic/include/rai/{Geo → Algo}/Lewiner/LookUpTable.h +0 -0
  405. /robotic/include/rai/Geo/{assimpInterface.h → i_assimp.h} +0 -0
  406. /robotic/include/rai/Kin/{kin_bullet.h → i_Bullet.h} +0 -0
  407. /robotic/include/rai/Kin/{kin_feather.h → i_Feather.h} +0 -0
  408. /robotic/include/rai/Kin/{kin_ode.h → i_Ode.h} +0 -0
  409. /robotic/include/rai/Optim/{opt-ipopt.h → i_Ipopt.h} +0 -0
  410. /robotic/rai-robotModels/robotiq/meshes/{visual/robotiq_ft300.ply → robotiq_ft300.ply} +0 -0
  411. /robotic/{import.py → src/__init__.py} +0 -0
  412. {robotic-0.2.9.dev1.data → robotic-0.3.4.dev5.data}/scripts/ry-bot +0 -0
  413. {robotic-0.2.9.dev1.data → robotic-0.3.4.dev5.data}/scripts/ry-info +0 -0
  414. {robotic-0.2.9.dev1.data → robotic-0.3.4.dev5.data}/scripts/ry-meshTool +0 -0
  415. {robotic-0.2.9.dev1.dist-info → robotic-0.3.4.dev5.dist-info}/licenses/LICENSE +0 -0
  416. {robotic-0.2.9.dev1.dist-info → robotic-0.3.4.dev5.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,196 @@
1
+ /* ------------------------------------------------------------------
2
+ Copyright (c) 2011-2024 Marc Toussaint
3
+ email: toussaint@tu-berlin.de
4
+
5
+ This code is distributed under the MIT License.
6
+ Please see <root-path>/LICENSE for details.
7
+ -------------------------------------------------------------- */
8
+
9
+ #pragma once
10
+
11
+ #include "../Search/ComputeNode.h"
12
+ #include "../Search/AStar.h"
13
+ #include "../Logic/folWorld.h"
14
+ #include "../Optim/NLP_GraphSolver.h"
15
+ #include "../PathAlgos/RRT_PathFinder.h"
16
+ #include "LGP_TAMP_Abstraction.h"
17
+
18
+ namespace rai {
19
+
20
+ //===========================================================================
21
+
22
+ struct LGP2_GlobalInfo {
23
+ RAI_PARAM("LGP/", int, verbose, 1)
24
+ RAI_PARAM("LGP/", double, skeleton_w0, 1.)
25
+ RAI_PARAM("LGP/", double, skeleton_wP, 2.)
26
+ RAI_PARAM("LGP/", double, waypoint_w0, 10.)
27
+ RAI_PARAM("LGP/", double, waypoint_wP, 2.)
28
+ RAI_PARAM("LGP/", int, waypointStopEvals, 1000)
29
+ RAI_PARAM("LGP/", int, rrtStopEvals, 10000)
30
+ RAI_PARAM("LGP/", double, rrtStepsize, .05)
31
+ RAI_PARAM("LGP/", double, rrtTolerance, .03)
32
+ RAI_PARAM("LGP/", double, pathCtrlCosts, 1.)
33
+ RAI_PARAM("LGP/", int, pathStepsPerPhase, 30)
34
+ RAI_PARAM("LGP/", double, collScale, 1e1)
35
+ RAI_PARAM("LGP/", bool, useSequentialWaypointSolver, false)
36
+ };
37
+
38
+ //===========================================================================
39
+
40
+ struct LGPComp2_root : ComputeNode {
41
+ // FOL_World& L;
42
+ Configuration& C;
43
+ LGP_TAMP_Abstraction& tamp;
44
+ // bool useBroadCollisions=false;
45
+ // StringA explicitCollisions;
46
+ // StringA explicitLift;
47
+ // String explicitTerminalSkeleton;
48
+ // std::shared_ptr<rai::AStar> fol_astar;
49
+ std::shared_ptr<LGP2_GlobalInfo> info;
50
+ bool fixedSkeleton=false;
51
+
52
+ LGPComp2_root(Configuration& _C, LGP_TAMP_Abstraction& _tamp, const StringA& explicitLift, const String& explicitTerminalSkeleton);
53
+
54
+ virtual void untimedCompute() {}
55
+ virtual int getNumDecisions() { return -1.; }
56
+ // virtual double effortHeuristic(){ return 11.+10.; }
57
+ virtual double branchingPenalty_child(int i);
58
+
59
+ virtual std::shared_ptr<ComputeNode> createNewChild(int i);
60
+
61
+ int verbose() { return info->verbose; }
62
+ };
63
+
64
+ //===========================================================================
65
+
66
+ struct LGPComp2_Skeleton : ComputeNode {
67
+ LGPComp2_root* root=0;
68
+ int num=0;
69
+ // Skeleton skeleton;
70
+ //shared_ptr<SkeletonSolver> sol;
71
+ // StringA actionSequence;
72
+ Array<StringA> actionSequence;
73
+ // Array<Graph*> states;
74
+ // arr times;
75
+
76
+ LGPComp2_Skeleton(LGPComp2_root* _root, int num);
77
+ // LGPComp2_Skeleton(LGPComp2_root* _root, const Skeleton& _skeleton);
78
+
79
+ void createNLPs(const rai::Configuration& C);
80
+
81
+ virtual void untimedCompute();
82
+
83
+ virtual int getNumDecisions() { return -1.; }
84
+ // virtual double branchingHeuristic(){ return root->info->waypoint_w0; }
85
+ // virtual double effortHeuristic(){ return 10.+10.; }
86
+ virtual double branchingPenalty_child(int i);
87
+
88
+ virtual std::shared_ptr<ComputeNode> createNewChild(int i);
89
+ };
90
+
91
+ //===========================================================================
92
+
93
+ struct LGPComp2_FactorBounds: ComputeNode {
94
+ LGPComp2_Skeleton* sket;
95
+ int seed=0;
96
+ KOMO komoWaypoints;
97
+ std::shared_ptr<NLP_Factored> nlp;
98
+ uint t=0;
99
+
100
+ LGPComp2_FactorBounds(LGPComp2_Skeleton* _sket, int rndSeed);
101
+
102
+ virtual void untimedCompute();
103
+ // virtual double effortHeuristic(){ return 10.+1.*(komoWaypoints.T); }
104
+ virtual int getNumDecisions() { return 1; }
105
+ virtual std::shared_ptr<ComputeNode> createNewChild(int i);
106
+ };
107
+
108
+ //===========================================================================
109
+
110
+ struct LGPComp2_PoseBounds: ComputeNode {
111
+ LGPComp2_Skeleton* sket;
112
+ int seed=0;
113
+ uint t=0;
114
+
115
+ LGPComp2_PoseBounds(LGPComp2_Skeleton* _sket, int rndSeed);
116
+
117
+ virtual void untimedCompute();
118
+ // virtual double effortHeuristic(){ return 10.+1.*(sket->states.N); }
119
+ virtual int getNumDecisions() { return 1; }
120
+ virtual std::shared_ptr<ComputeNode> createNewChild(int i);
121
+ };
122
+
123
+ //===========================================================================
124
+
125
+ struct LGPComp2_Waypoints : ComputeNode {
126
+ LGPComp2_Skeleton* sket;
127
+ int seed=0;
128
+ std::shared_ptr<KOMO> komoWaypoints;
129
+ NLP_Solver sol;
130
+ NLP_GraphSolver gsol;
131
+
132
+ LGPComp2_Waypoints(LGPComp2_Skeleton* _sket, int rndSeed);
133
+
134
+ virtual void untimedCompute();
135
+ // virtual double effortHeuristic(){ return 10.+1.*(komoWaypoints->T); }
136
+ virtual int getNumDecisions();
137
+ virtual std::shared_ptr<ComputeNode> createNewChild(int i);
138
+ };
139
+
140
+ //===========================================================================
141
+
142
+ struct LGPComp2_RRTpath : ComputeNode {
143
+ LGPComp2_Waypoints* ways=0;
144
+ LGPComp2_RRTpath* prev=0;
145
+
146
+ shared_ptr<Configuration> C;
147
+ uint t;
148
+ shared_ptr<RRT_PathFinder> rrt;
149
+ arr q0, qT;
150
+ arr path;
151
+
152
+ LGPComp2_RRTpath(ComputeNode* _par, LGPComp2_Waypoints* _ways, uint _t);
153
+
154
+ virtual void untimedCompute();
155
+ // virtual double effortHeuristic(){ return 10.+1.*(ways->komoWaypoints->T-t-1); }
156
+
157
+ virtual int getNumDecisions() { return 1; }
158
+ virtual std::shared_ptr<ComputeNode> createNewChild(int i);
159
+ };
160
+
161
+ //===========================================================================
162
+
163
+ struct LGPComp2_OptimizePath : ComputeNode {
164
+ LGPComp2_Skeleton* sket=0;
165
+ LGPComp2_Waypoints* ways=0;
166
+
167
+ shared_ptr<KOMO> komoPath;
168
+ NLP_Solver sol;
169
+
170
+ LGPComp2_OptimizePath(LGPComp2_Skeleton* _sket); //compute path from skeleton directly, without waypoints first
171
+ LGPComp2_OptimizePath(LGPComp2_Waypoints* _ways); //compute path initialized from waypoints
172
+ LGPComp2_OptimizePath(LGPComp2_RRTpath* _par, LGPComp2_Waypoints* _ways); //compute path initialized from series of RRT solutions
173
+
174
+ virtual void untimedCompute();
175
+ // virtual double effortHeuristic(){ return 0.; }
176
+
177
+ virtual double sample() {
178
+ CHECK(sol.ret, "");
179
+ CHECK(sol.ret->done, "");
180
+ if(sol.ret->ineq>1. || sol.ret->eq>4.) return 1e10;
181
+ return sol.ret->ineq+sol.ret->eq;
182
+ }
183
+
184
+ // if(opt.verbose>0) LOG(0) <<*ret;
185
+ // if(opt.verbose>1) cout <<komoPath.report(false, true, opt.verbose>2);
186
+ // if(opt.verbose>0) komoPath.view(opt.verbose>1, STRING("optimized path\n" <<*ret));
187
+ // //komoPath.checkGradients();
188
+ // if(opt.verbose>1) komoPath.view_play(opt.verbose>2);
189
+
190
+ virtual int getNumDecisions() { return 0; }
191
+ virtual std::shared_ptr<ComputeNode> createNewChild(int i) { HALT("is terminal"); }
192
+ };
193
+
194
+ //===========================================================================
195
+
196
+ }//namespace
@@ -0,0 +1,5 @@
1
+ #pragma once
2
+
3
+ #include "../KOMO/komo.h"
4
+
5
+ rai::Graph getDescriptor(KOMO& komo, int verbose);
@@ -129,7 +129,7 @@ struct FOL_World : TreeSearchDomain {
129
129
  void addObject(const char* name);
130
130
  template<class T> void addValuedFact(const StringA& symbols, const T& x) {
131
131
  NodeL parents;
132
- for(const String& s:symbols) parents.append(KB[s]);
132
+ for(const String& s:symbols) parents.append(KB.findNode(s));
133
133
  start_state->add<T>(0, x, parents);
134
134
  }
135
135
  void addTerminalRule(const char* literals);
@@ -65,7 +65,7 @@ struct TreeSearchDomain {
65
65
  virtual const Handle get_stateCopy() = 0;
66
66
 
67
67
  /// Get the current state
68
- virtual void set_state(const Handle& stateCopy) { std::cerr <<"not implemented for world of type " <<typeid(this).name() <<std::endl; exit(-1); }
68
+ virtual void set_state(const Handle& stateCopy) { std::cout <<"not implemented for world of type " <<typeid(this).name() <<std::endl; exit(-1); }
69
69
 
70
70
  /// Return whether the current state is a terminal state
71
71
  virtual bool is_terminal_state() const = 0;
@@ -81,7 +81,7 @@ struct TreeSearchDomain {
81
81
  virtual bool get_info(InfoTag tag) const = 0;
82
82
  virtual double get_info_value(InfoTag tag) const = 0;
83
83
 
84
- virtual void write(std::ostream& os) const { std::cerr <<"NOT OVERLOADED!" <<std::endl; }
84
+ virtual void write(std::ostream& os) const { std::cout <<"NOT OVERLOADED!" <<std::endl; }
85
85
  };
86
86
  inline std::ostream& operator<<(std::ostream& os, const TreeSearchDomain& E) { E.write(os); return os; }
87
87
  inline std::ostream& operator<<(std::ostream& os, const TreeSearchDomain::SAO& x) { x.write(os); return os; }
@@ -11,6 +11,11 @@
11
11
  #include "GlobalIterativeNewton.h"
12
12
  #include "../Core/array.h"
13
13
 
14
+ struct KernelRidgeRegression;
15
+ struct DefaultKernelFunction;
16
+
17
+ namespace rai {
18
+
14
19
  struct BayesOpt {
15
20
  ScalarFunction f;
16
21
  arr bounds;
@@ -18,23 +23,23 @@ struct BayesOpt {
18
23
  arr data_X;
19
24
  arr data_y;
20
25
 
21
- struct KernelRidgeRegression* f_now;
22
- struct KernelRidgeRegression* f_smaller;
26
+ KernelRidgeRegression* f_now;
27
+ KernelRidgeRegression* f_smaller;
23
28
 
24
29
  GlobalIterativeNewton alphaMinima_now;
25
30
  GlobalIterativeNewton alphaMinima_smaller;
26
31
 
27
- struct DefaultKernelFunction* kernel_now;
28
- struct DefaultKernelFunction* kernel_smaller;
32
+ DefaultKernelFunction* kernel_now;
33
+ DefaultKernelFunction* kernel_smaller;
29
34
  double lengthScale;
30
35
 
31
36
  //lengthScale is always relative to hi-lo
32
- BayesOpt(const ScalarFunction& f, const arr& bounds, rai::OptOptions& opt, double init_lengthScale=1., double prior_var=1.);
37
+ BayesOpt(ScalarFunction f, const arr& bounds, shared_ptr<OptOptions> opt, double init_lengthScale=1., double prior_var=1.);
33
38
  ~BayesOpt();
34
39
 
35
40
  void step();
36
41
  void run(uint maxIt=10);
37
- void report(bool display=true, const ScalarFunction& f=ScalarFunction());
42
+ void report(bool display, ScalarFunction f);
38
43
 
39
44
  private:
40
45
  void addDataPoint(const arr& x, double y); //and update the regressions
@@ -42,3 +47,5 @@ struct BayesOpt {
42
47
  arr pickNextPoint();
43
48
  void reduceLengthScale();
44
49
  };
50
+
51
+ } //namespace
@@ -0,0 +1,73 @@
1
+ /*
2
+ * INTERFACE: the relevant functions are
3
+ *
4
+ * * cmaes_boundary_transformation_init(this, l_bound, u_bound, len)
5
+ * * cmaes_boundary_transformation_exit(this)
6
+ * * cmaes_boundary_transformation(this, x, y, len)
7
+ *
8
+ * implements a smooth mapping double *x -> double *y that guarantees
9
+ * elements of y to be within specified boundaries. The mapping is piecewise
10
+ * either linear or quadratic and can achieve values arbitrarily close to and
11
+ * on the boundaries. The middle of the domain l_bound + (u_bound-l_bound) / 2.0
12
+ * always maps to itself. Typically, 90% of feasible values (those not close
13
+ * to the boundaries) are mapped to themselves, preventing any numerical subtleties.
14
+ * Specifically, al, au > 0 are internally chosen offsets. The mapping
15
+ * [l_bound - al, u_bound + au] <-> [l_bound, u_bound] is monotonous, bijective
16
+ * and invertible. It is the identity within [l_bound + al, u_bound - au] and
17
+ * quadratic for [l_bound - 3*al, l_bound + al] (with l_bound - al -> l_bound)
18
+ * and for [u_bound - au, u_bound + 3*au] (with u_bound + au -> u_bound).
19
+ *
20
+ * The method is robust against very small/large boundary values, say
21
+ * -1e99 and/or 1e99, to emulated unbounded variables. In this case values
22
+ * between -1e98 and 1e98 are never changed, i.e. mapped to itself.
23
+ *
24
+ */
25
+
26
+ typedef struct {
27
+ double const *lower_bounds; /* array of size len_of_bounds */
28
+ double const *upper_bounds; /* array of size len_of_bounds */
29
+ unsigned long len_of_bounds; /* in case, last value is recycled */
30
+ double *al; /* "add"-on to lower boundary preimage, same length as bounds */
31
+ double *au; /* add-on to upper boundary preimage, same length as bounds */
32
+ } cmaes_boundary_transformation_t;
33
+
34
+ /* set lower and upper bounds, the values lower_bounds[len_of_bounds - 1] and
35
+ * upper_bounds[len_of_bounds - 1] are recycled for any element >= len_of_bounds.
36
+ * If len_of_bounds == 0, no bounds are assumed. If len_of_bounds == 1, the
37
+ * zero pointer is allowed for lower_bounds or upper_bounds and indicates no
38
+ * respective bounds. "no bounds" is "emulated" using the very small/large value
39
+ * of DBL_MAX / -1e2 and DBL_MAX / 1e2, respectively. */
40
+ void cmaes_boundary_transformation_init(cmaes_boundary_transformation_t *,
41
+ double const *lower_bounds, double const *upper_bounds, unsigned long len_of_bounds);
42
+
43
+ /* release memory */
44
+ void cmaes_boundary_transformation_exit(cmaes_boundary_transformation_t *);
45
+
46
+ /* on return, y is guaranteed to have all values within the boundaries.
47
+ * The caller inputs x and is responsible for having allocated y in that
48
+ * y[len-1] = x[len-1] is a valid operation. x==y is valid input, but
49
+ * will fail together with cmaes when x is an element of the population
50
+ * returned by cmaes_SamplePopulation (these elements are of type
51
+ * double const * for a reason).
52
+ * */
53
+ void cmaes_boundary_transformation(cmaes_boundary_transformation_t *,
54
+ double const *x, double *y, unsigned long len); /* new value into y */
55
+
56
+ /* after
57
+ * cmaes_boundary_transformation(b,x,y,l) ;
58
+ * the two consecutive calls
59
+ * cmaes_boundary_transformation_inverse(b,y,x,l) ; cmaes_boundary_transformation(b,x,y,l) ;
60
+ * have no effect on y anymore (but they might change x!).
61
+ * */
62
+ void cmaes_boundary_transformation_inverse(cmaes_boundary_transformation_t *t,
63
+ double const *y, double *x, unsigned long len); /* new value into x */
64
+
65
+ /* used by function cmaes_boundary_transformation. After applying the shift,
66
+ * cmaes_boundary_transformation_shift_into_feasible_preimage(b,x,x,l)
67
+ * the two consecutive calls
68
+ * cmaes_boundary_transformation(b,x,y,l) ; cmaes_boundary_transformation_inverse(b,y,x,l) ;
69
+ * have no effect on x anymore */
70
+ void cmaes_boundary_transformation_shift_into_feasible_preimage(cmaes_boundary_transformation_t *t,
71
+ double const *x, double *x_shifted, unsigned long len); /* new value into x_shifted */
72
+
73
+
@@ -0,0 +1,175 @@
1
+ /* --------------------------------------------------------- */
2
+ /* --- File: cmaes.h ----------- Author: Nikolaus Hansen --- */
3
+ /* ---------------------- last modified: IX 2010 --- */
4
+ /* --------------------------------- by: Nikolaus Hansen --- */
5
+ /* --------------------------------------------------------- */
6
+ /*
7
+ CMA-ES for non-linear function minimization.
8
+
9
+ Copyright (C) 1996, 2003-2010 Nikolaus Hansen.
10
+ e-mail: nikolaus.hansen (you know what) inria.fr
11
+
12
+ License: see file cmaes.c
13
+
14
+ */
15
+ #ifndef NH_cmaes_h /* only include ones */
16
+ #define NH_cmaes_h
17
+
18
+ #include <time.h>
19
+
20
+ typedef struct
21
+ /* cmaes_random_t
22
+ * sets up a pseudo random number generator instance
23
+ */
24
+ {
25
+ /* Variables for Uniform() */
26
+ long int startseed;
27
+ long int aktseed;
28
+ long int aktrand;
29
+ long int *rgrand;
30
+
31
+ /* Variables for Gauss() */
32
+ short flgstored;
33
+ double hold;
34
+ } cmaes_random_t;
35
+
36
+ typedef struct
37
+ /* cmaes_timings_t
38
+ * time measurement, used to time eigendecomposition
39
+ */
40
+ {
41
+ /* for outside use */
42
+ double totaltime; /* zeroed by calling re-calling cmaes_timings_start */
43
+ double totaltotaltime;
44
+ double tictoctime;
45
+ double lasttictoctime;
46
+
47
+ /* local fields */
48
+ clock_t lastclock;
49
+ time_t lasttime;
50
+ clock_t ticclock;
51
+ time_t tictime;
52
+ short istic;
53
+ short isstarted;
54
+
55
+ double lastdiff;
56
+ double tictoczwischensumme;
57
+ } cmaes_timings_t;
58
+
59
+ typedef struct
60
+ /* cmaes_readpara_t
61
+ * collects all parameters, in particular those that are read from
62
+ * a file before to start. This should split in future?
63
+ */
64
+ {
65
+ char * filename; /* keep record of the file that was taken to read parameters */
66
+ short flgsupplemented;
67
+
68
+ /* input parameters */
69
+ int N; /* problem dimension, must stay constant, should be unsigned or long? */
70
+ unsigned int seed;
71
+ double * xstart;
72
+ double * typicalX;
73
+ int typicalXcase;
74
+ double * rgInitialStds;
75
+ double * rgDiffMinChange;
76
+
77
+ /* termination parameters */
78
+ double stopMaxFunEvals;
79
+ double facmaxeval;
80
+ double stopMaxIter;
81
+ struct { int flg; double val; } stStopFitness;
82
+ double stopTolFun;
83
+ double stopTolFunHist;
84
+ double stopTolX;
85
+ double stopTolUpXFactor;
86
+
87
+ /* internal evolution strategy parameters */
88
+ int lambda; /* -> mu, <- N */
89
+ int mu; /* -> weights, (lambda) */
90
+ double mucov, mueff; /* <- weights */
91
+ double *weights; /* <- mu, -> mueff, mucov, ccov */
92
+ double damps; /* <- cs, maxeval, lambda */
93
+ double cs; /* -> damps, <- N */
94
+ double ccumcov; /* <- N */
95
+ double ccov; /* <- mucov, <- N */
96
+ double diagonalCov; /* number of initial iterations */
97
+ struct { int flgalways; double modulo; double maxtime; } updateCmode;
98
+ double facupdateCmode;
99
+
100
+ /* supplementary variables */
101
+
102
+ char *weigkey;
103
+ char resumefile[99];
104
+ const char **rgsformat;
105
+ void **rgpadr;
106
+ const char **rgskeyar;
107
+ double ***rgp2adr;
108
+ int n1para, n1outpara;
109
+ int n2para;
110
+ } cmaes_readpara_t;
111
+
112
+ typedef struct
113
+ /* cmaes_t
114
+ * CMA-ES "object"
115
+ */
116
+ {
117
+ const char *version;
118
+ /* char *signalsFilename; */
119
+ cmaes_readpara_t sp;
120
+ cmaes_random_t rand; /* random number generator */
121
+
122
+ double sigma; /* step size */
123
+
124
+ double *rgxmean; /* mean x vector, "parent" */
125
+ double *rgxbestever;
126
+ double **rgrgx; /* range of x-vectors, lambda offspring */
127
+ int *index; /* sorting index of sample pop. */
128
+ double *arFuncValueHist;
129
+
130
+ short flgIniphase; /* not really in use anymore */
131
+ short flgStop;
132
+
133
+ double chiN;
134
+ double **C; /* lower triangular matrix: i>=j for C[i][j] */
135
+ double **B; /* matrix with normalize eigenvectors in columns */
136
+ double *rgD; /* axis lengths */
137
+
138
+ double *rgpc;
139
+ double *rgps;
140
+ double *rgxold;
141
+ double *rgout;
142
+ double *rgBDz; /* for B*D*z */
143
+ double *rgdTmp; /* temporary (random) vector used in different places */
144
+ double *rgFuncValue;
145
+ double *publicFitness; /* returned by cmaes_init() */
146
+
147
+ double gen; /* Generation number */
148
+ double countevals;
149
+ double state; /* 1 == sampled, 2 == not in use anymore, 3 == updated */
150
+
151
+ double maxdiagC; /* repeatedly used for output */
152
+ double mindiagC;
153
+ double maxEW;
154
+ double minEW;
155
+
156
+ char sOutString[330]; /* 4x80 */
157
+
158
+ short flgEigensysIsUptodate;
159
+ short flgCheckEigen; /* control via cmaes_signals.par */
160
+ double genOfEigensysUpdate;
161
+ cmaes_timings_t eigenTimings;
162
+
163
+ double dMaxSignifKond;
164
+ double dLastMinEWgroesserNull;
165
+
166
+ short flgresumedone;
167
+
168
+ time_t printtime;
169
+ time_t writetime; /* ideally should keep track for each output file */
170
+ time_t firstwritetime;
171
+ time_t firstprinttime;
172
+
173
+ } cmaes_t;
174
+
175
+ #endif
@@ -0,0 +1,68 @@
1
+ /* --------------------------------------------------------- */
2
+ /* --- File: cmaes_interface.h - Author: Nikolaus Hansen --- */
3
+ /* ---------------------- last modified: IV 2007 --- */
4
+ /* --------------------------------- by: Nikolaus Hansen --- */
5
+ /* --------------------------------------------------------- */
6
+ /*
7
+ CMA-ES for non-linear function minimization.
8
+
9
+ Copyright (C) 1996, 2003, 2007 Nikolaus Hansen.
10
+ e-mail: hansen AT lri.fr
11
+
12
+ Documentation: see file docfunctions.txt
13
+
14
+ License: see file cmaes.c
15
+ */
16
+ #include "cmaes.h"
17
+
18
+ /* --------------------------------------------------------- */
19
+ /* ------------------ Interface ---------------------------- */
20
+ /* --------------------------------------------------------- */
21
+
22
+ #ifdef __cplusplus
23
+ extern "C" {
24
+ #endif
25
+
26
+ /* --- initialization, constructors, destructors --- */
27
+ double * cmaes_init(cmaes_t *, int dimension , double *xstart,
28
+ double *stddev, long seed, int lambda,
29
+ const char *input_parameter_filename);
30
+ void cmaes_init_para(cmaes_t *, int dimension , double *xstart,
31
+ double *stddev, long seed, int lambda,
32
+ const char *input_parameter_filename);
33
+ double * cmaes_init_final(cmaes_t *);
34
+ void cmaes_resume_distribution(cmaes_t *evo_ptr, char *filename);
35
+ void cmaes_exit(cmaes_t *);
36
+
37
+ /* --- core functions --- */
38
+ double * const * cmaes_SamplePopulation(cmaes_t *);
39
+ double * cmaes_UpdateDistribution(cmaes_t *,
40
+ const double *rgFitnessValues);
41
+ const char * cmaes_TestForTermination(cmaes_t *);
42
+
43
+ /* --- additional functions --- */
44
+ double * const * cmaes_ReSampleSingle( cmaes_t *t, int index);
45
+ double const * cmaes_ReSampleSingle_old(cmaes_t *, double *rgx);
46
+ double * cmaes_SampleSingleInto( cmaes_t *t, double *rgx);
47
+ void cmaes_UpdateEigensystem(cmaes_t *, int flgforce);
48
+
49
+ /* --- getter functions --- */
50
+ double cmaes_Get(cmaes_t *, char const *keyword);
51
+ const double * cmaes_GetPtr(cmaes_t *, char const *keyword); /* e.g. "xbestever" */
52
+ double * cmaes_GetNew( cmaes_t *t, char const *keyword); /* user is responsible to free */
53
+ double * cmaes_GetInto( cmaes_t *t, char const *keyword, double *mem); /* allocs if mem==NULL, user is responsible to free */
54
+
55
+ /* --- online control and output --- */
56
+ void cmaes_ReadSignals(cmaes_t *, char const *filename);
57
+ void cmaes_WriteToFile(cmaes_t *, const char *szKeyWord,
58
+ const char *output_filename);
59
+ char * cmaes_SayHello(cmaes_t *);
60
+ /* --- misc --- */
61
+ double * cmaes_NewDouble(int n); /* user is responsible to free */
62
+ void cmaes_FATAL(char const *s1, char const *s2, char const *s3,
63
+ char const *s4);
64
+
65
+ #ifdef __cplusplus
66
+ } // end extern "C"
67
+ #endif
68
+
@@ -8,8 +8,10 @@
8
8
 
9
9
  #pragma once
10
10
 
11
- #include "newton.h"
12
- #include "gradient.h"
11
+ #include "m_Newton.h"
12
+ #include "m_Gradient.h"
13
+
14
+ namespace rai {
13
15
 
14
16
  struct GlobalIterativeNewton {
15
17
  arr x;
@@ -21,7 +23,7 @@ struct GlobalIterativeNewton {
21
23
  rai::Array<LocalMinimum> localMinima;
22
24
  LocalMinimum* best;
23
25
 
24
- GlobalIterativeNewton(const ScalarFunction& f, const arr& bounds, rai::OptOptions& opt);
26
+ GlobalIterativeNewton(ScalarFunction f, const arr& bounds, std::shared_ptr<OptOptions> opt=make_shared<OptOptions>());
25
27
  ~GlobalIterativeNewton();
26
28
 
27
29
  void step();
@@ -30,3 +32,5 @@ struct GlobalIterativeNewton {
30
32
 
31
33
  void reOptimizeAllPoints();
32
34
  };
35
+
36
+ } //namespace