robotic 0.2.8.dev4__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.
- robotic/DataGen.pyi +11 -1
- robotic/__init__.py +8 -1
- robotic/_robotic.pyi +236 -114
- robotic/_robotic.so +0 -0
- robotic/algo.pyi +17 -0
- robotic/include/rai/{Geo → Algo}/Lewiner/MarchingCubes.h +0 -29
- robotic/include/rai/Algo/SplineCtrlFeed.h +1 -1
- robotic/include/rai/Algo/marching_cubes.h +9 -0
- robotic/include/rai/Algo/rungeKutta.h +2 -2
- robotic/include/rai/Algo/spline.h +4 -8
- robotic/include/rai/Algo/trilinear.h +10 -0
- robotic/include/rai/Control/CtrlSolver.h +1 -1
- robotic/include/rai/Control/TimingMPC.h +2 -2
- robotic/include/rai/Core/array.h +99 -64
- robotic/include/rai/Core/array.ipp +290 -136
- robotic/include/rai/Core/arrayDouble.h +36 -26
- robotic/include/rai/Core/defines.h +7 -9
- robotic/include/rai/Core/graph.h +33 -37
- robotic/include/rai/Core/h5.h +3 -1
- robotic/include/rai/Core/thread.h +12 -12
- robotic/include/rai/Core/util.h +58 -79
- robotic/include/rai/DataGen/rndStableConfigs.h +1 -0
- robotic/include/rai/DataGen/shapenetGrasps.h +5 -3
- robotic/include/rai/Geo/depth2PointCloud.h +2 -0
- robotic/include/rai/Geo/geo.h +24 -16
- robotic/include/rai/Geo/{fclInterface.h → i_fcl.h} +3 -1
- robotic/include/rai/Geo/mesh.h +22 -16
- robotic/include/rai/Geo/pairCollision.h +43 -43
- robotic/include/rai/Geo/signedDistanceFunctions.h +7 -5
- robotic/include/rai/Geo/stb_image.h +1 -1
- robotic/include/rai/Gui/RenderData.h +12 -9
- robotic/include/rai/Gui/opengl.h +6 -6
- robotic/include/rai/Gui/plot.h +1 -1
- robotic/include/rai/KOMO/komo.h +6 -3
- robotic/include/rai/KOMO/komo_NLP.h +2 -2
- robotic/include/rai/KOMO/manipTools.h +7 -2
- robotic/include/rai/KOMO/testProblems_KOMO.h +5 -9
- robotic/include/rai/Kin/F_forces.h +3 -3
- robotic/include/rai/Kin/cameraview.h +24 -36
- robotic/include/rai/Kin/dof_forceExchange.h +7 -7
- robotic/include/rai/Kin/feature.h +1 -1
- robotic/include/rai/Kin/frame.h +24 -26
- robotic/include/rai/Kin/{kin_physx.h → i_Physx.h} +11 -10
- robotic/include/rai/Kin/kin.h +30 -20
- robotic/include/rai/Kin/proxy.h +1 -1
- robotic/include/rai/Kin/simulation.h +20 -10
- robotic/include/rai/Kin/viewer.h +14 -1
- robotic/include/rai/LGP/LGP_TAMP_Abstraction.h +33 -0
- robotic/include/rai/LGP/LGP_Tool.h +4 -25
- robotic/include/rai/LGP/LGP_computers.h +1 -1
- robotic/include/rai/LGP/LGP_computers2.h +196 -0
- robotic/include/rai/LGP/NLP_Descriptor.h +5 -0
- robotic/include/rai/Logic/folWorld.h +1 -1
- robotic/include/rai/Logic/treeSearchDomain.h +2 -2
- robotic/include/rai/Optim/BayesOpt.h +13 -6
- robotic/include/rai/Optim/CMA/boundary_transformation.h +73 -0
- robotic/include/rai/Optim/CMA/cmaes.h +175 -0
- robotic/include/rai/Optim/CMA/cmaes_interface.h +68 -0
- robotic/include/rai/Optim/GlobalIterativeNewton.h +7 -3
- robotic/include/rai/Optim/NLP.h +23 -7
- robotic/include/rai/Optim/NLP_GraphSolver.h +1 -1
- robotic/include/rai/Optim/NLP_Solver.h +5 -5
- robotic/include/rai/Optim/constrained.h +4 -4
- robotic/include/rai/Optim/{opt-ceres.h → i_Ceres.h} +2 -2
- robotic/include/rai/Optim/{opt-nlopt.h → i_NLopt.h} +4 -0
- robotic/include/rai/Optim/lagrangian.h +7 -5
- robotic/include/rai/Optim/liblbfgs/liblbfgs.h +755 -0
- robotic/include/rai/Optim/m_EvoStrategies.h +114 -0
- robotic/include/rai/Optim/{gradient.h → m_Gradient.h} +13 -12
- robotic/include/rai/Optim/m_LBFGS.h +21 -0
- robotic/include/rai/Optim/m_LeastSquaresZeroOrder.h +104 -0
- robotic/include/rai/Optim/m_LocalGreedy.h +31 -0
- robotic/include/rai/Optim/m_NelderMead.h +23 -0
- robotic/include/rai/Optim/{newton.h → m_Newton.h} +7 -4
- robotic/include/rai/Optim/{SlackGaussNewton.h → m_SlackGaussNewton.h} +0 -10
- robotic/include/rai/Optim/options.h +8 -7
- robotic/include/rai/Optim/primalDual.h +10 -6
- robotic/include/rai/Optim/testProblems_Opt.h +25 -19
- robotic/include/rai/Optim/utils.h +16 -85
- robotic/include/rai/PathAlgos/ConfigurationProblem.h +3 -2
- robotic/include/rai/PathAlgos/RRT_PathFinder.h +2 -2
- robotic/include/rai/Perception/pcl.h +10 -10
- robotic/include/rai/Perception/surfels.h +1 -1
- robotic/include/rai/Search/TreeSearchNode.h +1 -1
- robotic/include/rai/ry/py-algo.h +17 -0
- robotic/include/rai/ry/types.h +4 -2
- robotic/librai.so +0 -0
- robotic/manipulation.py +5 -7
- robotic/meshTool +0 -0
- robotic/mujoco-import.py +8 -0
- robotic/rai-robotModels/g1/g1.g +11 -2
- robotic/rai-robotModels/g1/g1_29dof_conv.yml +64 -0
- robotic/rai-robotModels/g1/g1_clean.g +38 -73
- robotic/rai-robotModels/g1/meshes/head_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/left_ankle_pitch_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/left_ankle_roll_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/left_elbow_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/left_hip_pitch_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/left_hip_roll_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/left_hip_yaw_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/left_knee_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/left_rubber_hand.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/left_shoulder_pitch_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/left_shoulder_roll_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/left_shoulder_yaw_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/left_wrist_pitch_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/left_wrist_roll_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/left_wrist_yaw_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/logo_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/pelvis.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/pelvis_contour_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/right_ankle_pitch_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/right_ankle_roll_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/right_elbow_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/right_hip_pitch_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/right_hip_roll_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/right_hip_yaw_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/right_knee_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/right_rubber_hand.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/right_shoulder_pitch_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/right_shoulder_roll_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/right_shoulder_yaw_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/right_wrist_pitch_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/right_wrist_roll_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/right_wrist_yaw_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/torso_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/waist_roll_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/waist_support_link.h5 +0 -0
- robotic/rai-robotModels/g1/meshes/waist_yaw_link.h5 +0 -0
- robotic/rai-robotModels/objects/shelf.g +1 -1
- robotic/rai-robotModels/panda/meshes/finger.h5 +0 -0
- robotic/rai-robotModels/panda/meshes/hand.h5 +0 -0
- robotic/rai-robotModels/panda/meshes/link0.h5 +0 -0
- robotic/rai-robotModels/panda/meshes/link1.h5 +0 -0
- robotic/rai-robotModels/panda/meshes/link2.h5 +0 -0
- robotic/rai-robotModels/panda/meshes/link3.h5 +0 -0
- robotic/rai-robotModels/panda/meshes/link4.h5 +0 -0
- robotic/rai-robotModels/panda/meshes/link5.h5 +0 -0
- robotic/rai-robotModels/panda/meshes/link6.h5 +0 -0
- robotic/rai-robotModels/panda/meshes/link7.h5 +0 -0
- robotic/rai-robotModels/panda/panda.g +10 -10
- robotic/rai-robotModels/panda/panda_arm_hand_conv.g +24 -0
- robotic/rai-robotModels/panda/panda_arm_hand_conv.yml +24 -0
- robotic/rai-robotModels/panda/panda_clean.g +21 -45
- robotic/rai-robotModels/panda/panda_gripper.g +5 -7
- robotic/rai-robotModels/panda/panda_withoutCollisionModels.g +3 -11
- robotic/rai-robotModels/pr2/meshes/base.h5 +0 -0
- robotic/rai-robotModels/pr2/meshes/base_color.png +0 -0
- robotic/rai-robotModels/pr2/meshes/caster.h5 +0 -0
- robotic/rai-robotModels/pr2/meshes/elbow_flex.h5 +0 -0
- robotic/rai-robotModels/pr2/meshes/elbow_flex_color.png +0 -0
- robotic/rai-robotModels/pr2/meshes/forearm.h5 +0 -0
- robotic/rai-robotModels/pr2/meshes/forearm_color.png +0 -0
- robotic/rai-robotModels/pr2/meshes/forearm_roll.h5 +0 -0
- robotic/rai-robotModels/pr2/meshes/gripper_palm.h5 +0 -0
- robotic/rai-robotModels/pr2/meshes/gripper_palm_color.png +0 -0
- robotic/rai-robotModels/pr2/meshes/head_pan.h5 +0 -0
- robotic/rai-robotModels/pr2/meshes/head_pan_color.png +0 -0
- robotic/rai-robotModels/pr2/meshes/head_tilt.h5 +0 -0
- robotic/rai-robotModels/pr2/meshes/head_tilt_color.png +0 -0
- robotic/rai-robotModels/pr2/meshes/l_finger.h5 +0 -0
- robotic/rai-robotModels/pr2/meshes/l_finger_color.png +0 -0
- robotic/rai-robotModels/pr2/meshes/l_finger_tip.h5 +0 -0
- robotic/rai-robotModels/pr2/meshes/l_finger_tip_color.png +0 -0
- robotic/rai-robotModels/pr2/meshes/shoulder_lift.h5 +0 -0
- robotic/rai-robotModels/pr2/meshes/shoulder_lift_color.png +0 -0
- robotic/rai-robotModels/pr2/meshes/shoulder_pan.h5 +0 -0
- robotic/rai-robotModels/pr2/meshes/shoulder_pan_color.png +0 -0
- robotic/rai-robotModels/pr2/meshes/tilting_hokuyo.h5 +0 -0
- robotic/rai-robotModels/pr2/meshes/tilting_hokuyo_color.png +0 -0
- robotic/rai-robotModels/pr2/meshes/torso_lift.h5 +0 -0
- robotic/rai-robotModels/pr2/meshes/torso_lift_color.png +0 -0
- robotic/rai-robotModels/pr2/meshes/upper_arm.h5 +0 -0
- robotic/rai-robotModels/pr2/meshes/upper_arm_color.png +0 -0
- robotic/rai-robotModels/pr2/meshes/upper_arm_roll.h5 +0 -0
- robotic/rai-robotModels/pr2/meshes/upper_arm_roll_color.png +0 -0
- robotic/rai-robotModels/pr2/meshes/wheel.h5 +0 -0
- robotic/rai-robotModels/pr2/meshes/wheel_color.png +0 -0
- robotic/rai-robotModels/pr2/meshes/wrist_color.png +0 -0
- robotic/rai-robotModels/pr2/meshes/wrist_flex.h5 +0 -0
- robotic/rai-robotModels/pr2/meshes/wrist_roll.h5 +0 -0
- robotic/rai-robotModels/pr2/pr2.g +12 -12
- robotic/rai-robotModels/pr2/pr2_clean.g +122 -118
- robotic/rai-robotModels/pr2/pr2_conv.g +218 -0
- robotic/rai-robotModels/pr2/pr2_modifications.g +2 -2
- robotic/rai-robotModels/ranger/meshes/ranger_mini3.h5 +0 -0
- robotic/rai-robotModels/ranger/meshes/ranger_mini_v3_wheel.h5 +0 -0
- robotic/rai-robotModels/ranger/meshes/ranger_mini_v3_wheel_right.h5 +0 -0
- robotic/rai-robotModels/ranger/ranger.g +33 -0
- robotic/rai-robotModels/ranger/ranger_clean.g +18 -0
- robotic/rai-robotModels/ranger/ranger_mini_conv.g +14 -0
- robotic/rai-robotModels/robotiq/meshes/robotiq_arg2f_85_base_link.h5 +0 -0
- robotic/rai-robotModels/robotiq/meshes/robotiq_arg2f_85_inner_finger.h5 +0 -0
- robotic/rai-robotModels/robotiq/meshes/robotiq_arg2f_85_inner_knuckle.h5 +0 -0
- robotic/rai-robotModels/robotiq/meshes/robotiq_arg2f_85_outer_finger.h5 +0 -0
- robotic/rai-robotModels/robotiq/meshes/robotiq_arg2f_85_outer_knuckle.h5 +0 -0
- robotic/rai-robotModels/robotiq/robotiq.g +2 -2
- robotic/rai-robotModels/robotiq/robotiq_arg2f_85_model_conv.yml +19 -0
- robotic/rai-robotModels/robotiq/robotiq_clean.g +16 -16
- robotic/rai-robotModels/scenarios/ballFinger.g +2 -2
- robotic/rai-robotModels/scenarios/liftRing.g +2 -2
- robotic/rai-robotModels/scenarios/pandaFloatingGripper.g +1 -1
- robotic/rai-robotModels/scenarios/pandaSingle.g +1 -1
- robotic/rai-robotModels/scenarios/panda_fixRobotiq.g +3 -3
- robotic/rai-robotModels/tests/arm.g +18 -19
- robotic/rai-robotModels/tests/compound.g +3 -6
- robotic/rai-robotModels/ur10/meshes/base.h5 +0 -0
- robotic/rai-robotModels/ur10/meshes/forearm.h5 +0 -0
- robotic/rai-robotModels/ur10/meshes/shoulder.h5 +0 -0
- robotic/rai-robotModels/ur10/meshes/upperarm.h5 +0 -0
- robotic/rai-robotModels/ur10/meshes/wrist1.h5 +0 -0
- robotic/rai-robotModels/ur10/meshes/wrist2.h5 +0 -0
- robotic/rai-robotModels/ur10/meshes/wrist3.h5 +0 -0
- robotic/rai-robotModels/ur10/ur10.g +2 -2
- robotic/rai-robotModels/ur10/ur10_clean.g +8 -8
- robotic/rai-robotModels/ur10/ur10_conv.g +17 -0
- robotic/ry-h5info +3 -8
- robotic/ry-test +6 -5
- robotic/ry-urdfConvert.py +74 -0
- robotic/ry-view +28 -6
- robotic/src/__init__.py +0 -0
- robotic/src/cleanMeshes.py +59 -0
- robotic/src/h5_helper.py +46 -0
- robotic/src/h5_helper.py~ +42 -0
- robotic/src/mesh_helper.py +395 -0
- robotic/src/meshlabFilters.mlx +20 -0
- robotic/src/mujoco_io.py +242 -0
- robotic/src/urdf_io.py +237 -0
- robotic/src/yaml_helper.py +29 -0
- robotic/version.py +1 -1
- {robotic-0.2.8.dev4.data → robotic-0.3.4.dev5.data}/scripts/ry-h5info +3 -8
- {robotic-0.2.8.dev4.data → robotic-0.3.4.dev5.data}/scripts/ry-test +6 -5
- robotic-0.3.4.dev5.data/scripts/ry-urdfConvert.py +74 -0
- robotic-0.3.4.dev5.data/scripts/ry-view +46 -0
- {robotic-0.2.8.dev4.dist-info → robotic-0.3.4.dev5.dist-info}/METADATA +20 -23
- robotic-0.3.4.dev5.dist-info/RECORD +386 -0
- {robotic-0.2.8.dev4.dist-info → robotic-0.3.4.dev5.dist-info}/WHEEL +1 -1
- robotic/nlp.py +0 -113
- robotic/rai-robotModels/baxter/baxter.g +0 -49
- robotic/rai-robotModels/baxter/baxter_clean.g +0 -116
- robotic/rai-robotModels/baxter/baxter_clean2.g +0 -205
- robotic/rai-robotModels/baxter/baxter_clean3.g +0 -223
- robotic/rai-robotModels/baxter/baxter_description/meshes/base/PEDESTAL.ply +0 -0
- robotic/rai-robotModels/baxter/baxter_description/meshes/base/pedestal_link_collision.ply +0 -0
- robotic/rai-robotModels/baxter/baxter_description/meshes/head/H0.ply +0 -0
- robotic/rai-robotModels/baxter/baxter_description/meshes/head/H1.ply +0 -0
- robotic/rai-robotModels/baxter/baxter_description/meshes/lower_elbow/E1.ply +0 -0
- robotic/rai-robotModels/baxter/baxter_description/meshes/lower_forearm/W1.ply +0 -0
- robotic/rai-robotModels/baxter/baxter_description/meshes/lower_shoulder/S1.ply +0 -0
- robotic/rai-robotModels/baxter/baxter_description/meshes/torso/base_link.ply +0 -0
- robotic/rai-robotModels/baxter/baxter_description/meshes/torso/base_link_collision.ply +0 -0
- robotic/rai-robotModels/baxter/baxter_description/meshes/upper_elbow/E0.ply +0 -0
- robotic/rai-robotModels/baxter/baxter_description/meshes/upper_forearm/W0.ply +0 -0
- robotic/rai-robotModels/baxter/baxter_description/meshes/upper_shoulder/S0.ply +0 -0
- robotic/rai-robotModels/baxter/baxter_description/meshes/wrist/W2.ply +0 -0
- robotic/rai-robotModels/baxter/baxter_new.g +0 -53
- robotic/rai-robotModels/baxter/rethink_ee_description/meshes/electric_gripper/electric_gripper_base.ply +0 -0
- robotic/rai-robotModels/baxter/rethink_ee_description/meshes/electric_gripper/fingers/extended_narrow.ply +0 -0
- robotic/rai-robotModels/baxter/rethink_ee_description/meshes/electric_gripper/fingers/half_round_tip.ply +0 -0
- robotic/rai-robotModels/baxter/rethink_ee_description/meshes/electric_gripper/fingers/paddle_tip.ply +0 -0
- robotic/rai-robotModels/baxter/rethink_ee_description/meshes/pneumatic_gripper/pneumatic_gripper_base.ply +0 -0
- robotic/rai-robotModels/baxter/rethink_ee_description/meshes/pneumatic_gripper/pneumatic_gripper_w_cup.ply +0 -0
- robotic/rai-robotModels/g1/meshes/head_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_ankle_pitch_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_ankle_roll_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_elbow_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_hand_index_0_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_hand_index_1_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_hand_middle_0_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_hand_middle_1_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_hand_palm_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_hand_thumb_0_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_hand_thumb_1_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_hand_thumb_2_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_hip_pitch_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_hip_roll_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_hip_yaw_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_knee_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_rubber_hand.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_shoulder_pitch_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_shoulder_roll_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_shoulder_yaw_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_wrist_pitch_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_wrist_roll_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_wrist_roll_rubber_hand.ply +0 -0
- robotic/rai-robotModels/g1/meshes/left_wrist_yaw_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/logo_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/pelvis.ply +0 -0
- robotic/rai-robotModels/g1/meshes/pelvis_contour_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_ankle_pitch_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_ankle_roll_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_elbow_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_hand_index_0_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_hand_index_1_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_hand_middle_0_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_hand_middle_1_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_hand_palm_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_hand_thumb_0_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_hand_thumb_1_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_hand_thumb_2_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_hip_pitch_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_hip_roll_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_hip_yaw_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_knee_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_rubber_hand.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_shoulder_pitch_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_shoulder_roll_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_shoulder_yaw_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_wrist_pitch_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_wrist_roll_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_wrist_roll_rubber_hand.ply +0 -0
- robotic/rai-robotModels/g1/meshes/right_wrist_yaw_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/torso_constraint_L_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/torso_constraint_L_rod_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/torso_constraint_R_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/torso_constraint_R_rod_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/torso_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/waist_constraint_L.ply +0 -0
- robotic/rai-robotModels/g1/meshes/waist_constraint_R.ply +0 -0
- robotic/rai-robotModels/g1/meshes/waist_roll_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/waist_support_link.ply +0 -0
- robotic/rai-robotModels/g1/meshes/waist_yaw_link.ply +0 -0
- robotic/rai-robotModels/panda/franka_description/meshes/collision/finger.stl +0 -0
- robotic/rai-robotModels/panda/franka_description/meshes/collision/hand.stl +0 -0
- robotic/rai-robotModels/panda/franka_description/meshes/collision/link0.stl +0 -0
- robotic/rai-robotModels/panda/franka_description/meshes/collision/link1.stl +0 -0
- robotic/rai-robotModels/panda/franka_description/meshes/collision/link2.stl +0 -0
- robotic/rai-robotModels/panda/franka_description/meshes/collision/link3.stl +0 -0
- robotic/rai-robotModels/panda/franka_description/meshes/collision/link4.stl +0 -0
- robotic/rai-robotModels/panda/franka_description/meshes/collision/link5.stl +0 -0
- robotic/rai-robotModels/panda/franka_description/meshes/collision/link6.stl +0 -0
- robotic/rai-robotModels/panda/franka_description/meshes/collision/link7.stl +0 -0
- robotic/rai-robotModels/panda/franka_description/meshes/visual/HOWTO.sh +0 -10
- robotic/rai-robotModels/panda/franka_description/meshes/visual/HOWTO2.sh +0 -7
- robotic/rai-robotModels/panda/franka_description/meshes/visual/convMeshes.mlx +0 -38
- robotic/rai-robotModels/panda/franka_description/meshes/visual/finger.ply +0 -0
- robotic/rai-robotModels/panda/franka_description/meshes/visual/hand.ply +0 -0
- robotic/rai-robotModels/panda/franka_description/meshes/visual/link0.ply +0 -0
- robotic/rai-robotModels/panda/franka_description/meshes/visual/link1.ply +0 -0
- robotic/rai-robotModels/panda/franka_description/meshes/visual/link2.ply +0 -0
- robotic/rai-robotModels/panda/franka_description/meshes/visual/link3.ply +0 -0
- robotic/rai-robotModels/panda/franka_description/meshes/visual/link4.ply +0 -0
- robotic/rai-robotModels/panda/franka_description/meshes/visual/link5.ply +0 -0
- robotic/rai-robotModels/panda/franka_description/meshes/visual/link6.ply +0 -0
- robotic/rai-robotModels/panda/franka_description/meshes/visual/link7.ply +0 -0
- robotic/rai-robotModels/panda/franka_description/meshes/visual/script.mlx +0 -28
- robotic/rai-robotModels/pr2/pr2_description/meshes/base_v0/base.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/base_v0/base_L.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/base_v0/caster.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/base_v0/caster_L.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/base_v0/pr2_wheel.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/base_v0/wheel.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/forearm_v0/forearm.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/forearm_v0/wrist_flex.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/forearm_v0/wrist_roll.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/forearm_v0/wrist_roll_L.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/gripper_v0/gripper_palm.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/gripper_v0/l_finger.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/gripper_v0/l_finger_tip.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/head_v0/head_pan.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/head_v0/head_pan_L.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/head_v0/head_tilt.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/head_v0/head_tilt_L.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/shoulder_v0/shoulder_lift.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/shoulder_v0/shoulder_pan.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/shoulder_v0/shoulder_yaw.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/shoulder_v0/upper_arm_roll.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/shoulder_v0/upper_arm_roll_L.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/tilting_laser_v0/hok_tilt.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/tilting_laser_v0/tilting_hokuyo.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/tilting_laser_v0/tilting_hokuyo_L.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/torso_v0/torso.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/torso_v0/torso_lift.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/torso_v0/torso_lift_L.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/upper_arm_v0/elbow_flex.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/upper_arm_v0/forearm_roll.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/upper_arm_v0/forearm_roll_L.ply +0 -0
- robotic/rai-robotModels/pr2/pr2_description/meshes/upper_arm_v0/upper_arm.ply +0 -0
- robotic/rai-robotModels/robotiq/meshes/visual/robotiq_arg2f_85_base_link.ply +0 -0
- robotic/rai-robotModels/robotiq/meshes/visual/robotiq_arg2f_85_base_link_x.ply +0 -10
- robotic/rai-robotModels/robotiq/meshes/visual/robotiq_arg2f_85_inner_finger.ply +0 -0
- robotic/rai-robotModels/robotiq/meshes/visual/robotiq_arg2f_85_inner_knuckle.ply +0 -0
- robotic/rai-robotModels/robotiq/meshes/visual/robotiq_arg2f_85_outer_finger.ply +0 -0
- robotic/rai-robotModels/robotiq/meshes/visual/robotiq_arg2f_85_outer_knuckle.ply +0 -0
- robotic/rai-robotModels/robotiq/meshes/visual/robotiq_arg2f_85_pad.ply +0 -0
- robotic/rai-robotModels/robotiq/meshes/visual/robotiq_gripper_coupling.ply +0 -0
- robotic/rai-robotModels/ur10/ur_description/meshes/ur10/visual/Base.ply +0 -0
- robotic/rai-robotModels/ur10/ur_description/meshes/ur10/visual/Forearm.ply +0 -0
- robotic/rai-robotModels/ur10/ur_description/meshes/ur10/visual/Shoulder.ply +0 -0
- robotic/rai-robotModels/ur10/ur_description/meshes/ur10/visual/UpperArm.ply +0 -0
- robotic/rai-robotModels/ur10/ur_description/meshes/ur10/visual/Wrist1.ply +0 -0
- robotic/rai-robotModels/ur10/ur_description/meshes/ur10/visual/Wrist2.ply +0 -0
- robotic/rai-robotModels/ur10/ur_description/meshes/ur10/visual/Wrist3.ply +0 -0
- robotic/ry-urdf2rai +0 -222
- robotic/ry-urdf2yaml +0 -250
- robotic-0.2.8.dev4.data/scripts/ry-urdf2rai +0 -222
- robotic-0.2.8.dev4.data/scripts/ry-urdf2yaml +0 -250
- robotic-0.2.8.dev4.data/scripts/ry-view +0 -24
- robotic-0.2.8.dev4.dist-info/RECORD +0 -413
- /robotic/include/rai/{Geo → Algo}/Lewiner/LookUpTable.h +0 -0
- /robotic/include/rai/Geo/{assimpInterface.h → i_assimp.h} +0 -0
- /robotic/include/rai/Kin/{kin_bullet.h → i_Bullet.h} +0 -0
- /robotic/include/rai/Kin/{kin_feather.h → i_Feather.h} +0 -0
- /robotic/include/rai/Kin/{kin_ode.h → i_Ode.h} +0 -0
- /robotic/include/rai/Optim/{opt-ipopt.h → i_Ipopt.h} +0 -0
- /robotic/rai-robotModels/robotiq/meshes/{visual/robotiq_ft300.ply → robotiq_ft300.ply} +0 -0
- {robotic-0.2.8.dev4.data → robotic-0.3.4.dev5.data}/scripts/ry-bot +0 -0
- {robotic-0.2.8.dev4.data → robotic-0.3.4.dev5.data}/scripts/ry-info +0 -0
- {robotic-0.2.8.dev4.data → robotic-0.3.4.dev5.data}/scripts/ry-meshTool +0 -0
- {robotic-0.2.8.dev4.dist-info → robotic-0.3.4.dev5.dist-info/licenses}/LICENSE +0 -0
- {robotic-0.2.8.dev4.dist-info → robotic-0.3.4.dev5.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include "NLP.h"
|
|
4
|
+
#include "options.h"
|
|
5
|
+
#include "../Core/util.h"
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
|
|
9
|
+
Implement:
|
|
10
|
+
HillClimbing (with fixed exploration; with adaptive exploration)
|
|
11
|
+
DifferentialHillClimbing (with adaptive exploration distribution on delta)
|
|
12
|
+
classical model-based optim
|
|
13
|
+
|
|
14
|
+
Greedy local search (6:5) Stochastic local search (6:6) Simulated annealing (6:7)
|
|
15
|
+
Random restarts (6:10) Iterated local search (6:11) Variable neighborhood search
|
|
16
|
+
(6:13) Coordinate search (6:14) Pattern search (6:15) Nelder-Mead simplex method
|
|
17
|
+
(6:16) General stochastic search (6:20) Evolutionary algorithms (6:23) Covariance Matrix
|
|
18
|
+
Adaptation (CMAES) (6:24) Estimation of Distribution Algorithms (EDAs) (6:28)
|
|
19
|
+
Model-based optimization (6:31) Implicit filtering (6:34)
|
|
20
|
+
|
|
21
|
+
Improvement (5:24) Maximal Probability of Improvement
|
|
22
|
+
(5:24) GP-UCB (5:24)
|
|
23
|
+
|
|
24
|
+
Generic globalization: Iterated Local Optim: check when converged multiply to same local opt
|
|
25
|
+
|
|
26
|
+
Require bound constraints!
|
|
27
|
+
|
|
28
|
+
*
|
|
29
|
+
Twiddle
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
namespace rai {
|
|
33
|
+
|
|
34
|
+
std::tuple<arr, arr> select_best_mu(const arr& samples, const arr& values, uint mu);
|
|
35
|
+
uintA pick_best_mu(const arr& samples, const arr& values, uint mu);
|
|
36
|
+
|
|
37
|
+
//===========================================================================
|
|
38
|
+
|
|
39
|
+
struct EvolutionStrategy {
|
|
40
|
+
ScalarFunction f;
|
|
41
|
+
shared_ptr<OptOptions> opt;
|
|
42
|
+
arr x;
|
|
43
|
+
double f_x=1e10;
|
|
44
|
+
int evals=0, steps=0, rejectedSteps=0, tinySteps=0;
|
|
45
|
+
|
|
46
|
+
EvolutionStrategy(ScalarFunction _f, const arr& x_init, shared_ptr<OptOptions> _opt): f(_f), opt(_opt), x(x_init) {}
|
|
47
|
+
|
|
48
|
+
//virtuals that define a method
|
|
49
|
+
virtual arr generateNewSamples() = 0;
|
|
50
|
+
virtual void update(arr& samples, arr& values) = 0;
|
|
51
|
+
|
|
52
|
+
//generic stepping & looping
|
|
53
|
+
bool step();
|
|
54
|
+
shared_ptr<SolverReturn> solve();
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
//===========================================================================
|
|
58
|
+
|
|
59
|
+
struct CMAES : EvolutionStrategy {
|
|
60
|
+
unique_ptr<struct CMA_self> self;
|
|
61
|
+
RAI_PARAM("CMA/", int, lambda, 20)
|
|
62
|
+
RAI_PARAM("CMA/", double, sigmaInit, .1)
|
|
63
|
+
|
|
64
|
+
CMAES(ScalarFunction f, const arr& x_init, shared_ptr<OptOptions> opt = make_shared<OptOptions>());
|
|
65
|
+
~CMAES();
|
|
66
|
+
|
|
67
|
+
virtual arr generateNewSamples();
|
|
68
|
+
virtual void update(arr& samples, arr& values);
|
|
69
|
+
|
|
70
|
+
arr getBestEver();
|
|
71
|
+
arr getCurrentMean();
|
|
72
|
+
|
|
73
|
+
void overwriteSamples(const arr& X, arr& Xold);
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
//===========================================================================
|
|
77
|
+
|
|
78
|
+
struct ES_mu_plus_lambda : EvolutionStrategy {
|
|
79
|
+
arr mean;
|
|
80
|
+
arr elite_X, elite_y;
|
|
81
|
+
RAI_PARAM("ES/", double, sigma, .1)
|
|
82
|
+
RAI_PARAM("ES/", double, sigmaDecay, .001)
|
|
83
|
+
RAI_PARAM("ES/", uint, lambda, 20)
|
|
84
|
+
RAI_PARAM("ES/", uint, mu, 5)
|
|
85
|
+
|
|
86
|
+
ES_mu_plus_lambda(ScalarFunction f, const arr& x_init, shared_ptr<OptOptions> opt = make_shared<OptOptions>())
|
|
87
|
+
: EvolutionStrategy(f, x_init, opt) { mean = x_init; }
|
|
88
|
+
|
|
89
|
+
virtual arr generateNewSamples();
|
|
90
|
+
|
|
91
|
+
virtual void update(arr& X, arr& y);
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
//===========================================================================
|
|
95
|
+
|
|
96
|
+
struct GaussEDA : EvolutionStrategy {
|
|
97
|
+
arr mean;
|
|
98
|
+
arr cov;
|
|
99
|
+
arr elite_X, elite_y;
|
|
100
|
+
RAI_PARAM("GaussEDA/", double, sigmaInit, .1)
|
|
101
|
+
RAI_PARAM("GaussEDA/", double, momentum, .5)
|
|
102
|
+
RAI_PARAM("GaussEDA/", double, beta, .1)
|
|
103
|
+
RAI_PARAM("ES/", double, sigmaDecay, .001)
|
|
104
|
+
RAI_PARAM("ES/", uint, lambda, 20)
|
|
105
|
+
RAI_PARAM("ES/", uint, mu, 5)
|
|
106
|
+
|
|
107
|
+
GaussEDA(ScalarFunction f, const arr& x_init, shared_ptr<OptOptions> opt = make_shared<OptOptions>());
|
|
108
|
+
|
|
109
|
+
virtual arr generateNewSamples();
|
|
110
|
+
|
|
111
|
+
virtual void update(arr& X, arr& y);
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
} //namespace
|
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
#include "options.h"
|
|
12
12
|
#include "../Core/array.h"
|
|
13
13
|
|
|
14
|
+
namespace rai {
|
|
15
|
+
|
|
14
16
|
//===========================================================================
|
|
15
17
|
//
|
|
16
18
|
// proper (monotone) plain gradient descent with line search
|
|
@@ -19,27 +21,23 @@
|
|
|
19
21
|
struct OptGrad {
|
|
20
22
|
arr& x;
|
|
21
23
|
ScalarFunction f;
|
|
22
|
-
|
|
24
|
+
shared_ptr<OptOptions> opt;
|
|
23
25
|
|
|
24
26
|
enum StopCriterion { stopNone=0, stopCrit1, stopCrit2, stopCritLineSteps, stopCritEvals, stopStepFailed };
|
|
25
|
-
double
|
|
26
|
-
arr
|
|
27
|
+
double f_x;
|
|
28
|
+
arr g_x;
|
|
27
29
|
double alpha;
|
|
28
30
|
uint it, evals, numTinySteps;
|
|
29
31
|
StopCriterion stopCriterion;
|
|
30
32
|
ofstream fil;
|
|
31
33
|
|
|
32
|
-
OptGrad(arr& x,
|
|
34
|
+
OptGrad(arr& x, ScalarFunction f, std::shared_ptr<OptOptions> _opt);
|
|
33
35
|
~OptGrad();
|
|
34
36
|
StopCriterion step();
|
|
35
37
|
StopCriterion run(uint maxIt = 1000);
|
|
36
38
|
void reinit(const arr& _x=NoArr);
|
|
37
39
|
};
|
|
38
40
|
|
|
39
|
-
inline int optGrad(arr& x, const ScalarFunction& f, rai::OptOptions opt=DEFAULT_OPTIONS) {
|
|
40
|
-
return OptGrad(x, f, opt).run();
|
|
41
|
-
}
|
|
42
|
-
|
|
43
41
|
//===========================================================================
|
|
44
42
|
//
|
|
45
43
|
// Rprop
|
|
@@ -48,14 +46,17 @@ inline int optGrad(arr& x, const ScalarFunction& f, rai::OptOptions opt=DEFAULT_
|
|
|
48
46
|
/** Rprop, a fast gradient-based minimization */
|
|
49
47
|
struct Rprop {
|
|
50
48
|
unique_ptr<struct sRprop> self;
|
|
49
|
+
double fx;
|
|
50
|
+
uint evals;
|
|
51
51
|
Rprop();
|
|
52
52
|
~Rprop();
|
|
53
53
|
void init(double initialStepSize=1., double minStepSize=1e-6, double stepMaxSize=50.);
|
|
54
|
-
bool step(arr& x,
|
|
55
|
-
uint loop(arr& x,
|
|
54
|
+
bool step(arr& x, ScalarFunction f);
|
|
55
|
+
uint loop(arr& x, ScalarFunction f, double stoppingTolerance=1e-2, double initialStepSize=1., uint maxIterations=1000, int verbose=0);
|
|
56
56
|
};
|
|
57
57
|
|
|
58
|
-
inline uint optRprop(arr& x,
|
|
59
|
-
return Rprop().loop(x, f, opt
|
|
58
|
+
inline uint optRprop(arr& x, ScalarFunction f, shared_ptr<OptOptions> opt) {
|
|
59
|
+
return Rprop().loop(x, f, opt->stopTolerance, opt->stepInit, opt->stopEvals, opt->verbose);
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
+
} //namespace
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include "NLP.h"
|
|
4
|
+
#include "options.h"
|
|
5
|
+
|
|
6
|
+
namespace rai {
|
|
7
|
+
|
|
8
|
+
struct LBFGS{
|
|
9
|
+
ScalarFunction f;
|
|
10
|
+
shared_ptr<rai::OptOptions> opt;
|
|
11
|
+
arr x;
|
|
12
|
+
|
|
13
|
+
LBFGS(ScalarFunction _f, const arr& x_init, std::shared_ptr<OptOptions> _opt);
|
|
14
|
+
|
|
15
|
+
std::shared_ptr<SolverReturn> solve();
|
|
16
|
+
|
|
17
|
+
//private:
|
|
18
|
+
arr g;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
} //namespace
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include "NLP.h"
|
|
4
|
+
#include "options.h"
|
|
5
|
+
#include "../Core/util.h"
|
|
6
|
+
#include "m_EvoStrategies.h"
|
|
7
|
+
|
|
8
|
+
namespace rai {
|
|
9
|
+
|
|
10
|
+
struct LeastSquaresDerivativeFree{
|
|
11
|
+
shared_ptr<NLP> P;
|
|
12
|
+
std::shared_ptr<OptOptions> opt;
|
|
13
|
+
|
|
14
|
+
//-- parameters
|
|
15
|
+
str method="rank1";
|
|
16
|
+
double alpha = .5;
|
|
17
|
+
RAI_PARAM("LSZO/", double, alpha_min, .001)
|
|
18
|
+
RAI_PARAM("LSZO/", double, damping, 1e-2)
|
|
19
|
+
RAI_PARAM("LSZO/", double, noiseRatio, .2)
|
|
20
|
+
RAI_PARAM("LSZO/", double, noiseAbs, .0)
|
|
21
|
+
RAI_PARAM("LSZO/", double, dataRatio, 1.)
|
|
22
|
+
RAI_PARAM("LSZO/", bool, pruneData, false)
|
|
23
|
+
RAI_PARAM("LSZO/", bool, covariantNoise, false)
|
|
24
|
+
RAI_PARAM("LSZO/", double, stepInc, 1.5)
|
|
25
|
+
RAI_PARAM("LSZO/", double, stepDec, .5)
|
|
26
|
+
RAI_PARAM("LSZO/", int, lambda, 1)
|
|
27
|
+
RAI_PARAM("LSZO/", int, mu, 1)
|
|
28
|
+
|
|
29
|
+
//-- state and data
|
|
30
|
+
arr x;
|
|
31
|
+
arr elite_X, elite_Phi;
|
|
32
|
+
arr J, phi0, Hinv;
|
|
33
|
+
arr phi_x;
|
|
34
|
+
double phi2_x=-1.;
|
|
35
|
+
arr data_X, data_Phi;
|
|
36
|
+
|
|
37
|
+
uint evals=0, steps=0, tinySteps=0, rejectedSteps=0;
|
|
38
|
+
|
|
39
|
+
LeastSquaresDerivativeFree(shared_ptr<NLP> P, const arr& x_init, std::shared_ptr<OptOptions> _opt=make_shared<OptOptions>());
|
|
40
|
+
|
|
41
|
+
shared_ptr<SolverReturn> solve(){
|
|
42
|
+
while(!step()){}
|
|
43
|
+
shared_ptr<SolverReturn> ret = make_shared<SolverReturn>();
|
|
44
|
+
ret->x = x;
|
|
45
|
+
arr err = P->summarizeErrors(phi_x);
|
|
46
|
+
ret->f = err(OT_f);
|
|
47
|
+
ret->sos = err(OT_sos);
|
|
48
|
+
ret->eq = err(OT_eq);
|
|
49
|
+
ret->ineq = err(OT_ineq);
|
|
50
|
+
ret->feasible=true;
|
|
51
|
+
return ret;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
bool step();
|
|
55
|
+
|
|
56
|
+
void updateJ_rank1(arr& J, const arr& x, const arr& x_last, const arr& phi, const arr& phi_last);
|
|
57
|
+
|
|
58
|
+
arr generateNewSamples(uint lambda);
|
|
59
|
+
void update(arr& y, arr& Phi);
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
//===========================================================================
|
|
64
|
+
|
|
65
|
+
std::tuple<arr,arr> updateJ_linReg(const arr& Xraw, const arr& Y, const arr& x_now, double dataRatio);
|
|
66
|
+
|
|
67
|
+
//===========================================================================
|
|
68
|
+
|
|
69
|
+
struct LS_CMA{
|
|
70
|
+
shared_ptr<NLP> P;
|
|
71
|
+
std::shared_ptr<OptOptions> opt;
|
|
72
|
+
|
|
73
|
+
CMAES cma;
|
|
74
|
+
LeastSquaresDerivativeFree lsdf;
|
|
75
|
+
arr x_best, phi_best;
|
|
76
|
+
|
|
77
|
+
RAI_PARAM("LS_CMA/", int, ls_lambda, 1)
|
|
78
|
+
|
|
79
|
+
uint evals=0, steps=0, tinySteps=0, rejectedSteps=0;
|
|
80
|
+
|
|
81
|
+
LS_CMA(shared_ptr<NLP> P, const arr& x_init, std::shared_ptr<OptOptions> _opt=make_shared<OptOptions>());
|
|
82
|
+
|
|
83
|
+
virtual arr generateNewSamples();
|
|
84
|
+
virtual void update(arr& X, arr& Phi);
|
|
85
|
+
|
|
86
|
+
bool step();
|
|
87
|
+
|
|
88
|
+
shared_ptr<SolverReturn> solve(){
|
|
89
|
+
while(!step()){}
|
|
90
|
+
shared_ptr<SolverReturn> ret = make_shared<SolverReturn>();
|
|
91
|
+
ret->x = x_best;
|
|
92
|
+
arr err = P->summarizeErrors(phi_best);
|
|
93
|
+
ret->f = err(OT_f);
|
|
94
|
+
ret->sos = err(OT_sos);
|
|
95
|
+
ret->eq = err(OT_eq);
|
|
96
|
+
ret->ineq = err(OT_ineq);
|
|
97
|
+
ret->feasible=true;
|
|
98
|
+
return ret;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
} //namespace
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include "NLP.h"
|
|
4
|
+
#include "../Core/util.h"
|
|
5
|
+
|
|
6
|
+
struct LocalGreedy {
|
|
7
|
+
RAI_PARAM("LocalGreedy/", double, sigma, .1)
|
|
8
|
+
|
|
9
|
+
ScalarFunction f;
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
//-- buffers to avoid re-evaluating points
|
|
13
|
+
arr x; ///< point where P was last evaluated
|
|
14
|
+
double f_x=0.;
|
|
15
|
+
|
|
16
|
+
//-- counters
|
|
17
|
+
uint steps=0, tinySteps=0, maxSteps=300;
|
|
18
|
+
|
|
19
|
+
LocalGreedy(ScalarFunction _f, const arr& x_init={});
|
|
20
|
+
|
|
21
|
+
shared_ptr<SolverReturn> solve(){
|
|
22
|
+
while(!step()){}
|
|
23
|
+
shared_ptr<SolverReturn> ret = make_shared<SolverReturn>();
|
|
24
|
+
ret->x = x;
|
|
25
|
+
ret->f = f_x;
|
|
26
|
+
ret->feasible=true;
|
|
27
|
+
return ret;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
bool step();
|
|
31
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include "NLP.h"
|
|
4
|
+
#include "options.h"
|
|
5
|
+
#include "../Core/util.h"
|
|
6
|
+
|
|
7
|
+
namespace rai {
|
|
8
|
+
|
|
9
|
+
struct NelderMead {
|
|
10
|
+
ScalarFunction f;
|
|
11
|
+
shared_ptr<OptOptions> opt;
|
|
12
|
+
arr x;
|
|
13
|
+
double f_x=0.;
|
|
14
|
+
|
|
15
|
+
//-- counters
|
|
16
|
+
uint steps=0, tinySteps=0, maxSteps=300;
|
|
17
|
+
|
|
18
|
+
NelderMead(ScalarFunction _f, const arr& x_init={}, shared_ptr<OptOptions> opt = make_shared<OptOptions>());
|
|
19
|
+
|
|
20
|
+
shared_ptr<SolverReturn> solve();
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
} //namespace
|
|
@@ -9,24 +9,25 @@
|
|
|
9
9
|
#pragma once
|
|
10
10
|
|
|
11
11
|
#include "options.h"
|
|
12
|
+
#include "NLP.h"
|
|
12
13
|
#include "../Core/array.h"
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
namespace rai {
|
|
15
16
|
|
|
16
17
|
struct OptNewton {
|
|
17
18
|
ScalarFunction f;
|
|
19
|
+
shared_ptr<rai::OptOptions> opt;
|
|
18
20
|
arr& x;
|
|
19
|
-
rai::OptOptions opt;
|
|
20
21
|
|
|
21
22
|
enum StopCriterion { stopNone=0, stopDeltaConverge, stopTinyFSteps, stopTinyXSteps, stopCritEvals, stopStepFailed, stopLineSearchSteps };
|
|
22
23
|
|
|
23
|
-
OptNewton(arr& _x,
|
|
24
|
+
OptNewton(arr& _x, ScalarFunction _f, std::shared_ptr<OptOptions> _opt = make_shared<OptOptions>());
|
|
24
25
|
~OptNewton();
|
|
25
26
|
OptNewton& setBounds(const arr& _bounds);
|
|
26
27
|
void reinit(const arr& _x);
|
|
27
28
|
|
|
28
29
|
StopCriterion step();
|
|
29
|
-
|
|
30
|
+
shared_ptr<SolverReturn> run(uint maxIt = 1000);
|
|
30
31
|
|
|
31
32
|
public:
|
|
32
33
|
arr bounds;
|
|
@@ -38,3 +39,5 @@ struct OptNewton {
|
|
|
38
39
|
bool rootFinding=false;
|
|
39
40
|
double timeNewton=0., timeEval=0.;
|
|
40
41
|
};
|
|
42
|
+
|
|
43
|
+
} //namespace
|
|
@@ -16,16 +16,6 @@
|
|
|
16
16
|
|
|
17
17
|
namespace rai {
|
|
18
18
|
|
|
19
|
-
struct SlackGaussNewton_Options {
|
|
20
|
-
RAI_PARAM("sam/", double, tolerance, .01)
|
|
21
|
-
RAI_PARAM("sam/", double, margin, .0)
|
|
22
|
-
RAI_PARAM("sam/", int, verbose, 2)
|
|
23
|
-
|
|
24
|
-
RAI_PARAM("sam/", int, maxEvals, 50)
|
|
25
|
-
RAI_PARAM("sam/", double, stepMax, .1)
|
|
26
|
-
RAI_PARAM("sam/", double, damping, 1e-2)
|
|
27
|
-
};
|
|
28
|
-
|
|
29
19
|
struct SlackGaussNewton {
|
|
30
20
|
OptOptions opt;
|
|
31
21
|
std::shared_ptr<NLP> nlp;
|
|
@@ -13,10 +13,12 @@
|
|
|
13
13
|
namespace rai {
|
|
14
14
|
|
|
15
15
|
enum OptMethod { M_none=0,
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
M_GradientDescent, M_Rprop, M_LBFGS, M_Newton,
|
|
17
|
+
M_AugmentedLag, M_LogBarrier, M_slackGN_logBarrier, M_SquaredPenalty, M_singleSquaredPenalty,
|
|
18
18
|
M_slackGN,
|
|
19
|
-
M_NLopt, M_Ipopt, M_Ceres
|
|
19
|
+
M_NLopt, M_Ipopt, M_slackGN_Ipopt, M_Ceres,
|
|
20
|
+
M_LSZO, M_greedy, M_NelderMead,
|
|
21
|
+
M_CMA, M_ES };
|
|
20
22
|
|
|
21
23
|
|
|
22
24
|
struct OptOptions {
|
|
@@ -44,12 +46,11 @@ struct OptOptions {
|
|
|
44
46
|
RAI_PARAM("opt/", double, lambdaMax, -1.)
|
|
45
47
|
RAI_PARAM("opt/", double, interiorPadding, 1e-2)
|
|
46
48
|
RAI_PARAM("opt/", bool, boundedNewton, true)
|
|
47
|
-
RAI_PARAM_ENUM("opt/", OptMethod, method,
|
|
48
|
-
|
|
49
|
+
RAI_PARAM_ENUM("opt/", OptMethod, method, M_AugmentedLag)
|
|
50
|
+
RAI_PARAM("opt/", double, finiteDifference, -1.)
|
|
49
51
|
};
|
|
50
|
-
//stdOutPipe(OptOptions)
|
|
51
52
|
|
|
52
|
-
OptOptions
|
|
53
|
+
std::shared_ptr<OptOptions> globalOptOptions();
|
|
53
54
|
|
|
54
55
|
} //namespace
|
|
55
56
|
|
|
@@ -9,10 +9,12 @@
|
|
|
9
9
|
#pragma once
|
|
10
10
|
|
|
11
11
|
#include "options.h"
|
|
12
|
-
#include "
|
|
12
|
+
#include "m_Newton.h"
|
|
13
13
|
#include "lagrangian.h"
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
namespace rai {
|
|
16
|
+
|
|
17
|
+
struct PrimalDualProblem : NLP_Scalar {
|
|
16
18
|
rai::LagrangianProblem L;
|
|
17
19
|
|
|
18
20
|
//duality gap parameter (log barrier parameter) of the primal dual equation system
|
|
@@ -23,9 +25,9 @@ struct PrimalDualProblem : ScalarFunction {
|
|
|
23
25
|
double dualityMeasure=1.;
|
|
24
26
|
bool primalFeasible=false;
|
|
25
27
|
|
|
26
|
-
PrimalDualProblem(const arr& x, const shared_ptr<NLP>& P,
|
|
28
|
+
PrimalDualProblem(const arr& x, const shared_ptr<NLP>& P, std::shared_ptr<OptOptions> opt);
|
|
27
29
|
|
|
28
|
-
double
|
|
30
|
+
double f(arr& r, arr& R, const arr& x); ///< CORE METHOD: the unconstrained scalar function F
|
|
29
31
|
|
|
30
32
|
void updateMu();
|
|
31
33
|
};
|
|
@@ -39,10 +41,12 @@ struct OptPrimalDual {
|
|
|
39
41
|
arr& x;
|
|
40
42
|
PrimalDualProblem PD;
|
|
41
43
|
OptNewton newton;
|
|
42
|
-
|
|
44
|
+
std::shared_ptr<OptOptions> opt;
|
|
43
45
|
uint its=0;
|
|
44
46
|
|
|
45
|
-
OptPrimalDual(arr& x, arr& dual, const shared_ptr<NLP>& P,
|
|
47
|
+
OptPrimalDual(arr& x, arr& dual, const shared_ptr<NLP>& P, std::shared_ptr<OptOptions> _opt);
|
|
46
48
|
~OptPrimalDual();
|
|
47
49
|
uint run(uint maxIt=1000);
|
|
48
50
|
};
|
|
51
|
+
|
|
52
|
+
} //namespace
|
|
@@ -11,17 +11,11 @@
|
|
|
11
11
|
#include "NLP.h"
|
|
12
12
|
#include "../Core/util.h"
|
|
13
13
|
|
|
14
|
-
extern ScalarFunction RosenbrockFunction();
|
|
15
|
-
extern ScalarFunction RastriginFunction();
|
|
16
|
-
extern ScalarFunction SquareFunction();
|
|
17
|
-
extern ScalarFunction SumFunction();
|
|
18
|
-
extern ScalarFunction HoleFunction();
|
|
19
|
-
extern ScalarFunction ChoiceFunction();
|
|
20
|
-
|
|
21
14
|
std::shared_ptr<NLP> getBenchmarkFromCfg();
|
|
22
15
|
|
|
23
16
|
//===========================================================================
|
|
24
17
|
|
|
18
|
+
#if 0
|
|
25
19
|
struct ScalarUnconstrainedProgram : NLP {
|
|
26
20
|
double forsythAlpha = -1.;
|
|
27
21
|
shared_ptr<ScalarFunction> S;
|
|
@@ -47,9 +41,10 @@ struct ScalarUnconstrainedProgram : NLP {
|
|
|
47
41
|
}
|
|
48
42
|
virtual double f(arr& g, arr& H, const arr& x) {
|
|
49
43
|
CHECK(S, "no scalar function given in the constructor");
|
|
50
|
-
return
|
|
44
|
+
return S->f(g, H, x);
|
|
51
45
|
}
|
|
52
46
|
};
|
|
47
|
+
#endif
|
|
53
48
|
|
|
54
49
|
//===========================================================================
|
|
55
50
|
|
|
@@ -75,7 +70,7 @@ struct NLP_TrivialSquareFunction : NLP {
|
|
|
75
70
|
struct NLP_RandomLP : NLP {
|
|
76
71
|
arr randomG;
|
|
77
72
|
|
|
78
|
-
NLP_RandomLP(uint dim);
|
|
73
|
+
NLP_RandomLP(uint dim=2);
|
|
79
74
|
|
|
80
75
|
virtual void evaluate(arr& phi, arr& J, const arr& x);
|
|
81
76
|
|
|
@@ -107,12 +102,12 @@ struct SimpleConstraintFunction : NLP {
|
|
|
107
102
|
virtual void evaluate(arr& phi, arr& J, const arr& _x) {
|
|
108
103
|
CHECK_EQ(_x.N, 2, "");
|
|
109
104
|
phi.resize(4);
|
|
110
|
-
if(!!J) { J.resize(4, 2)
|
|
105
|
+
if(!!J) { J.resize(4, 2).setZero(); }
|
|
111
106
|
|
|
112
107
|
//simple squared potential, displaced by 1
|
|
113
108
|
arr x(_x);
|
|
114
109
|
x(0) -= 1.;
|
|
115
|
-
phi({0, 1}) = x;
|
|
110
|
+
phi({0, 1+1}) = x;
|
|
116
111
|
if(!!J) J.setMatrixBlock(eye(2), 0, 0);
|
|
117
112
|
x(0) += 1.;
|
|
118
113
|
|
|
@@ -126,24 +121,32 @@ struct SimpleConstraintFunction : NLP {
|
|
|
126
121
|
struct NLP_RastriginSOS : NLP {
|
|
127
122
|
double a;
|
|
128
123
|
double condition;
|
|
129
|
-
NLP_RastriginSOS()
|
|
130
|
-
a = rai::getParameter<double>("Rastrigin/a");
|
|
131
|
-
condition = rai::getParameter<double>("benchmark/condition");
|
|
132
|
-
|
|
133
|
-
dimension=2;
|
|
134
|
-
featureTypes = rai::consts<ObjectiveType>(OT_sos, 4);
|
|
135
|
-
}
|
|
124
|
+
NLP_RastriginSOS();
|
|
136
125
|
virtual void evaluate(arr& phi, arr& J, const arr& x);
|
|
137
126
|
};
|
|
138
127
|
|
|
139
128
|
//===========================================================================
|
|
140
129
|
|
|
130
|
+
struct NLP_Rastrigin : NLP_Scalar {
|
|
131
|
+
NLP_Rastrigin(uint _dim) { dimension=_dim; }
|
|
132
|
+
virtual double f(arr& g, arr& H, const arr& x);
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
//===========================================================================
|
|
136
|
+
|
|
137
|
+
struct NLP_Rosenbrock : NLP_Scalar {
|
|
138
|
+
NLP_Rosenbrock(uint _dim) { dimension=_dim; }
|
|
139
|
+
virtual double f(arr& g, arr& H, const arr& x);
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
//===========================================================================
|
|
143
|
+
|
|
141
144
|
/// $f(x) = x^T C x$ where C has eigen values ranging from 1 to 'condition'
|
|
142
145
|
struct NLP_Squared : NLP {
|
|
143
146
|
arr C; /// $A = C^T C $
|
|
144
147
|
uint n; /// dimensionality of $x$
|
|
145
148
|
|
|
146
|
-
NLP_Squared(uint n, double condition=100., bool random=true);
|
|
149
|
+
NLP_Squared(uint n=2, double condition=100., bool random=true);
|
|
147
150
|
|
|
148
151
|
virtual void evaluate(arr& phi, arr& J, const arr& x) { phi=C*x; if(!!J) J=C; }
|
|
149
152
|
// virtual arr getInitializationSample(){ return ones(n); }
|
|
@@ -156,6 +159,7 @@ struct NLP_Wedge : NLP {
|
|
|
156
159
|
dimension=2;
|
|
157
160
|
featureTypes = { OT_f };
|
|
158
161
|
featureTypes.append(rai::consts(OT_ineq, 2));
|
|
162
|
+
bounds = arr{-2.,-2.,2.,2.}.reshape(2,2);
|
|
159
163
|
}
|
|
160
164
|
|
|
161
165
|
virtual void evaluate(arr& phi, arr& J, const arr& x) {
|
|
@@ -174,6 +178,7 @@ struct NLP_HalfCircle : NLP {
|
|
|
174
178
|
dimension=2;
|
|
175
179
|
featureTypes = { OT_f };
|
|
176
180
|
featureTypes.append(rai::consts(OT_ineq, 2));
|
|
181
|
+
bounds = arr{-2.,-2.,2.,2.}.reshape(2,2);
|
|
177
182
|
}
|
|
178
183
|
|
|
179
184
|
virtual void evaluate(arr& phi, arr& J, const arr& x) {
|
|
@@ -211,6 +216,7 @@ struct ChoiceConstraintFunction : NLP {
|
|
|
211
216
|
enum WhichConstraint { none=0, wedge2D=1, halfcircle2D, randomLinear, circleLine2D, boundConstrained, boundConstrainedIneq } which;
|
|
212
217
|
uint n;
|
|
213
218
|
arr randomG;
|
|
219
|
+
ScalarFunction f_uc;
|
|
214
220
|
ChoiceConstraintFunction();
|
|
215
221
|
|
|
216
222
|
void evaluate(arr& phi, arr& J, const arr& x);
|