robotic 0.2.6__cp38-cp38-manylinux2014_x86_64.whl → 0.2.7__cp38-cp38-manylinux2014_x86_64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of robotic might be problematic. Click here for more details.
- robotic/_robotic.pyi +58 -23
- robotic/_robotic.so +0 -0
- robotic/include/rai/Control/CtrlTargets.h +3 -3
- robotic/include/rai/Core/array.h +3 -3
- robotic/include/rai/Core/arrayDouble.h +0 -3
- robotic/include/rai/DataGen/rndStableConfigs.h +0 -1
- robotic/include/rai/Geo/mesh.h +1 -1
- robotic/include/rai/Geo/signedDistanceFunctions.h +1 -1
- robotic/include/rai/Gui/RenderData.h +2 -1
- robotic/include/rai/KOMO/komo.h +1 -0
- robotic/include/rai/KOMO/manipTools.h +12 -10
- robotic/include/rai/KOMO/{opt-benchmarks.h → testProblems_KOMO.h} +36 -0
- robotic/include/rai/Kin/F_geometrics.h +9 -0
- robotic/include/rai/Kin/featureSymbols.h +6 -1
- robotic/include/rai/Kin/frame.h +1 -1
- robotic/include/rai/Kin/kin.h +1 -0
- robotic/include/rai/Kin/simulation.h +1 -0
- robotic/include/rai/Kin/viewer.h +1 -1
- robotic/include/rai/LGP/LGP_Tool.h +6 -6
- robotic/include/rai/Optim/NLP_Sampler.h +4 -4
- robotic/include/rai/Optim/NLP_Solver.h +1 -0
- robotic/include/rai/Optim/SlackGaussNewton.h +54 -0
- robotic/include/rai/Optim/gradient.h +2 -2
- robotic/include/rai/Optim/opt-ipopt.h +1 -1
- robotic/include/rai/Optim/options.h +8 -7
- robotic/include/rai/Optim/{benchmarks.h → testProblems_Opt.h} +33 -16
- robotic/librai.so +0 -0
- robotic/manipulation.py +139 -145
- robotic/meshTool +0 -0
- robotic/rai-robotModels/panda/panda.g +3 -2
- robotic/rai-robotModels/scenarios/ballFinger.g +3 -3
- robotic/rai-robotModels/scenarios/mobilePanda.g +3 -0
- robotic/rai-robotModels/scenarios/pendulum.g +3 -2
- robotic/rai-robotModels/tests/arm.g +7 -7
- robotic/ry-h5info.py +28 -0
- robotic/version.py +1 -1
- {robotic-0.2.6.dist-info → robotic-0.2.7.dist-info}/METADATA +1 -1
- {robotic-0.2.6.dist-info → robotic-0.2.7.dist-info}/RECORD +49 -53
- robotic/include/rai/MCTS/env_robert.h +0 -106
- robotic/include/rai/MCTS/problem_BlindBranch.h +0 -47
- robotic/include/rai/MCTS/solver_AStar.h +0 -90
- robotic/include/rai/MCTS/solver_MBTS.h +0 -109
- robotic/include/rai/MCTS/solver_PlainMC.h +0 -58
- robotic/include/rai/MCTS/solver_marc.h +0 -63
- /robotic/include/rai/Geo/{geoOptim.h → testProblems_Geo.h} +0 -0
- {robotic-0.2.6.data → robotic-0.2.7.data}/scripts/ry-bot +0 -0
- {robotic-0.2.6.data → robotic-0.2.7.data}/scripts/ry-info +0 -0
- {robotic-0.2.6.data → robotic-0.2.7.data}/scripts/ry-meshTool +0 -0
- {robotic-0.2.6.data → robotic-0.2.7.data}/scripts/ry-test +0 -0
- {robotic-0.2.6.data → robotic-0.2.7.data}/scripts/ry-urdf2rai +0 -0
- {robotic-0.2.6.data → robotic-0.2.7.data}/scripts/ry-urdf2yaml +0 -0
- {robotic-0.2.6.data → robotic-0.2.7.data}/scripts/ry-view +0 -0
- {robotic-0.2.6.dist-info → robotic-0.2.7.dist-info}/LICENSE +0 -0
- {robotic-0.2.6.dist-info → robotic-0.2.7.dist-info}/WHEEL +0 -0
- {robotic-0.2.6.dist-info → robotic-0.2.7.dist-info}/top_level.txt +0 -0
robotic/_robotic.pyi
CHANGED
|
@@ -6,7 +6,14 @@ import numpy
|
|
|
6
6
|
import typing
|
|
7
7
|
from . import DataGen
|
|
8
8
|
from . import test
|
|
9
|
-
__all__ = ['ArgWord', 'BSpline', 'BotOp', 'CameraView', 'CameraViewSensor', 'Config', 'ConfigurationViewer', 'ControlMode', 'DataGen', 'FS', 'Frame', 'JT', 'KOMO', 'KOMO_Objective', 'LGP_Tool', '
|
|
9
|
+
__all__ = ['Actions2KOMO_Translator', 'ArgWord', 'BSpline', 'BotOp', 'CameraView', 'CameraViewSensor', 'Config', 'ConfigurationViewer', 'ControlMode', 'DataGen', 'FS', 'Frame', 'JT', 'KOMO', 'KOMO_Objective', 'LGP_Tool', 'NLP', 'NLP_Factory', 'NLP_Sampler', 'NLP_Solver', 'NLP_SolverID', 'NLP_SolverOptions', 'OT', 'OptBench_Skeleton_Handover', 'OptBench_Skeleton_Pick', 'OptBench_Skeleton_StackAndBalance', 'OptBenchmark_InvKin_Endeff', 'RRT_PathFinder', 'ST', 'SY', 'Simulation', 'SimulationEngine', 'Skeleton', 'SolverReturn', 'TAMP_Provider', 'compiled', 'default_Actions2KOMO_Translator', 'default_TAMP_Provider', 'depthImage2PointCloud', 'params_add', 'params_clear', 'params_file', 'params_print', 'raiPath', 'setRaiPath', 'test']
|
|
10
|
+
class Actions2KOMO_Translator:
|
|
11
|
+
"""
|
|
12
|
+
Actions2KOMO_Translator
|
|
13
|
+
"""
|
|
14
|
+
@staticmethod
|
|
15
|
+
def _pybind11_conduit_v1_(*args, **kwargs):
|
|
16
|
+
...
|
|
10
17
|
class ArgWord:
|
|
11
18
|
"""
|
|
12
19
|
[todo: replace by str]
|
|
@@ -330,6 +337,10 @@ class Config:
|
|
|
330
337
|
"""
|
|
331
338
|
get the total number of degrees of freedom
|
|
332
339
|
"""
|
|
340
|
+
def getJointIDs(self) -> uintA:
|
|
341
|
+
"""
|
|
342
|
+
get indeces (which are the indices of their frames) of all joints
|
|
343
|
+
"""
|
|
333
344
|
def getJointLimits(self) -> arr:
|
|
334
345
|
"""
|
|
335
346
|
get the joint limits as a n-by-2 matrix; for dofs that do not have limits defined, the entries are [0,-1] (i.e. upper limit < lower limit)
|
|
@@ -587,8 +598,20 @@ class FS:
|
|
|
587
598
|
transAccelerations
|
|
588
599
|
|
|
589
600
|
transVelocities
|
|
601
|
+
|
|
602
|
+
qQuaternionNorms
|
|
603
|
+
|
|
604
|
+
opposeCentral
|
|
605
|
+
|
|
606
|
+
linangVel
|
|
607
|
+
|
|
608
|
+
AlignXWithDiff
|
|
609
|
+
|
|
610
|
+
AlignYWithDiff
|
|
590
611
|
"""
|
|
591
|
-
|
|
612
|
+
AlignXWithDiff: typing.ClassVar[FS] # value = <FS.AlignXWithDiff: 49>
|
|
613
|
+
AlignYWithDiff: typing.ClassVar[FS] # value = <FS.AlignYWithDiff: 50>
|
|
614
|
+
__members__: typing.ClassVar[dict[str, FS]] # value = {'position': <FS.position: 0>, 'positionDiff': <FS.positionDiff: 1>, 'positionRel': <FS.positionRel: 2>, 'quaternion': <FS.quaternion: 3>, 'quaternionDiff': <FS.quaternionDiff: 4>, 'quaternionRel': <FS.quaternionRel: 5>, 'pose': <FS.pose: 6>, 'poseDiff': <FS.poseDiff: 7>, 'poseRel': <FS.poseRel: 8>, 'vectorX': <FS.vectorX: 9>, 'vectorXDiff': <FS.vectorXDiff: 10>, 'vectorXRel': <FS.vectorXRel: 11>, 'vectorY': <FS.vectorY: 12>, 'vectorYDiff': <FS.vectorYDiff: 13>, 'vectorYRel': <FS.vectorYRel: 14>, 'vectorZ': <FS.vectorZ: 15>, 'vectorZDiff': <FS.vectorZDiff: 16>, 'vectorZRel': <FS.vectorZRel: 17>, 'scalarProductXX': <FS.scalarProductXX: 18>, 'scalarProductXY': <FS.scalarProductXY: 19>, 'scalarProductXZ': <FS.scalarProductXZ: 20>, 'scalarProductYX': <FS.scalarProductYX: 21>, 'scalarProductYY': <FS.scalarProductYY: 22>, 'scalarProductYZ': <FS.scalarProductYZ: 23>, 'scalarProductZZ': <FS.scalarProductZZ: 24>, 'gazeAt': <FS.gazeAt: 25>, 'angularVel': <FS.angularVel: 26>, 'accumulatedCollisions': <FS.accumulatedCollisions: 27>, 'jointLimits': <FS.jointLimits: 28>, 'distance': <FS.distance: 29>, 'negDistance': <FS.distance: 29>, 'oppose': <FS.oppose: 30>, 'qItself': <FS.qItself: 31>, 'jointState': <FS.qItself: 31>, 'aboveBox': <FS.aboveBox: 33>, 'insideBox': <FS.insideBox: 34>, 'pairCollision_negScalar': <FS.pairCollision_negScalar: 35>, 'pairCollision_vector': <FS.pairCollision_vector: 36>, 'pairCollision_normal': <FS.pairCollision_normal: 37>, 'pairCollision_p1': <FS.pairCollision_p1: 38>, 'pairCollision_p2': <FS.pairCollision_p2: 39>, 'standingAbove': <FS.standingAbove: 40>, 'physics': <FS.physics: 41>, 'contactConstraints': <FS.contactConstraints: 42>, 'energy': <FS.energy: 43>, 'transAccelerations': <FS.transAccelerations: 44>, 'transVelocities': <FS.transVelocities: 45>, 'qQuaternionNorms': <FS.qQuaternionNorms: 46>, 'opposeCentral': <FS.opposeCentral: 47>, 'linangVel': <FS.linangVel: 48>, 'AlignXWithDiff': <FS.AlignXWithDiff: 49>, 'AlignYWithDiff': <FS.AlignYWithDiff: 50>}
|
|
592
615
|
aboveBox: typing.ClassVar[FS] # value = <FS.aboveBox: 33>
|
|
593
616
|
accumulatedCollisions: typing.ClassVar[FS] # value = <FS.accumulatedCollisions: 27>
|
|
594
617
|
angularVel: typing.ClassVar[FS] # value = <FS.angularVel: 26>
|
|
@@ -599,8 +622,10 @@ class FS:
|
|
|
599
622
|
insideBox: typing.ClassVar[FS] # value = <FS.insideBox: 34>
|
|
600
623
|
jointLimits: typing.ClassVar[FS] # value = <FS.jointLimits: 28>
|
|
601
624
|
jointState: typing.ClassVar[FS] # value = <FS.qItself: 31>
|
|
625
|
+
linangVel: typing.ClassVar[FS] # value = <FS.linangVel: 48>
|
|
602
626
|
negDistance: typing.ClassVar[FS] # value = <FS.distance: 29>
|
|
603
627
|
oppose: typing.ClassVar[FS] # value = <FS.oppose: 30>
|
|
628
|
+
opposeCentral: typing.ClassVar[FS] # value = <FS.opposeCentral: 47>
|
|
604
629
|
pairCollision_negScalar: typing.ClassVar[FS] # value = <FS.pairCollision_negScalar: 35>
|
|
605
630
|
pairCollision_normal: typing.ClassVar[FS] # value = <FS.pairCollision_normal: 37>
|
|
606
631
|
pairCollision_p1: typing.ClassVar[FS] # value = <FS.pairCollision_p1: 38>
|
|
@@ -614,6 +639,7 @@ class FS:
|
|
|
614
639
|
positionDiff: typing.ClassVar[FS] # value = <FS.positionDiff: 1>
|
|
615
640
|
positionRel: typing.ClassVar[FS] # value = <FS.positionRel: 2>
|
|
616
641
|
qItself: typing.ClassVar[FS] # value = <FS.qItself: 31>
|
|
642
|
+
qQuaternionNorms: typing.ClassVar[FS] # value = <FS.qQuaternionNorms: 46>
|
|
617
643
|
quaternion: typing.ClassVar[FS] # value = <FS.quaternion: 3>
|
|
618
644
|
quaternionDiff: typing.ClassVar[FS] # value = <FS.quaternionDiff: 4>
|
|
619
645
|
quaternionRel: typing.ClassVar[FS] # value = <FS.quaternionRel: 5>
|
|
@@ -669,7 +695,6 @@ class Frame:
|
|
|
669
695
|
"""
|
|
670
696
|
A (coordinate) frame of a configuration, which can have a parent, and associated shape, joint, and/or inertia
|
|
671
697
|
"""
|
|
672
|
-
name: ...
|
|
673
698
|
@staticmethod
|
|
674
699
|
def _pybind11_conduit_v1_(*args, **kwargs):
|
|
675
700
|
...
|
|
@@ -773,10 +798,23 @@ class Frame:
|
|
|
773
798
|
...
|
|
774
799
|
def setTensorShape(self, data: ..., size: arr) -> Frame:
|
|
775
800
|
...
|
|
776
|
-
def transformToDiagInertia(self) ->
|
|
801
|
+
def transformToDiagInertia(self) -> ...:
|
|
777
802
|
...
|
|
778
803
|
def unLink(self) -> Frame:
|
|
779
804
|
...
|
|
805
|
+
@property
|
|
806
|
+
def ID(self) -> int:
|
|
807
|
+
"""
|
|
808
|
+
the unique ID of the frame, which is also its index in lists/arrays (e.g. when the frameState is returned as matrix) (readonly)
|
|
809
|
+
"""
|
|
810
|
+
@property
|
|
811
|
+
def name(self) -> ...:
|
|
812
|
+
"""
|
|
813
|
+
the name of the frame (editable)
|
|
814
|
+
"""
|
|
815
|
+
@name.setter
|
|
816
|
+
def name(self, arg0: ...) -> None:
|
|
817
|
+
...
|
|
780
818
|
class JT:
|
|
781
819
|
"""
|
|
782
820
|
Members:
|
|
@@ -932,8 +970,10 @@ class KOMO:
|
|
|
932
970
|
...
|
|
933
971
|
def getFrameState(self, arg0: int) -> arr:
|
|
934
972
|
...
|
|
935
|
-
def getPath(self) -> arr:
|
|
936
|
-
|
|
973
|
+
def getPath(self, dofIndices: uintA = ...) -> arr:
|
|
974
|
+
"""
|
|
975
|
+
get path for selected dofs (default: all original config dofs)
|
|
976
|
+
"""
|
|
937
977
|
def getPathFrames(self) -> arr:
|
|
938
978
|
...
|
|
939
979
|
def getPathTau(self) -> arr:
|
|
@@ -1017,7 +1057,7 @@ class LGP_Tool:
|
|
|
1017
1057
|
@staticmethod
|
|
1018
1058
|
def _pybind11_conduit_v1_(*args, **kwargs):
|
|
1019
1059
|
...
|
|
1020
|
-
def __init__(self, arg0: Config, arg1: TAMP_Provider, arg2:
|
|
1060
|
+
def __init__(self, arg0: Config, arg1: TAMP_Provider, arg2: Actions2KOMO_Translator) -> None:
|
|
1021
1061
|
"""
|
|
1022
1062
|
initialization
|
|
1023
1063
|
"""
|
|
@@ -1055,13 +1095,6 @@ class LGP_Tool:
|
|
|
1055
1095
|
"""
|
|
1056
1096
|
view last computed solution
|
|
1057
1097
|
"""
|
|
1058
|
-
class Logic2KOMO_Translator:
|
|
1059
|
-
"""
|
|
1060
|
-
Logic2KOMO_Translator
|
|
1061
|
-
"""
|
|
1062
|
-
@staticmethod
|
|
1063
|
-
def _pybind11_conduit_v1_(*args, **kwargs):
|
|
1064
|
-
...
|
|
1065
1098
|
class NLP:
|
|
1066
1099
|
"""
|
|
1067
1100
|
A Nonlinear Mathematical Program (bindings to the c++ object - distinct from the python template nlp.NLP
|
|
@@ -1171,7 +1204,7 @@ class NLP_Solver:
|
|
|
1171
1204
|
"""
|
|
1172
1205
|
def setInitialization(self, arg0: arr) -> NLP_Solver:
|
|
1173
1206
|
...
|
|
1174
|
-
def setOptions(self, verbose: int = 1, stopTolerance: float = 0.01, stopFTolerance: float = -1.0, stopGTolerance: float = -1.0, stopEvals: int = 1000, stopInners: int = 1000, stopOuters: int = 1000,
|
|
1207
|
+
def setOptions(self, verbose: int = 1, stopTolerance: float = 0.01, stopFTolerance: float = -1.0, stopGTolerance: float = -1.0, stopEvals: int = 1000, stopInners: int = 1000, stopOuters: int = 1000, stepMax: float = 0.2, damping: float = 1.0, stepInc: float = 1.5, stepDec: float = 0.5, wolfe: float = 0.01, muInit: float = 1.0, muInc: float = 5.0, muMax: float = 10000.0, muLBInit: float = 0.1, muLBDec: float = 0.2, lambdaMax: float = -1.0) -> NLP_Solver:
|
|
1175
1208
|
"""
|
|
1176
1209
|
set solver options
|
|
1177
1210
|
"""
|
|
@@ -1213,11 +1246,11 @@ class NLP_SolverID:
|
|
|
1213
1246
|
|
|
1214
1247
|
Ceres
|
|
1215
1248
|
"""
|
|
1216
|
-
Ceres: typing.ClassVar[NLP_SolverID] # value = <NLP_SolverID.Ceres:
|
|
1217
|
-
Ipopt: typing.ClassVar[NLP_SolverID] # value = <NLP_SolverID.Ipopt:
|
|
1249
|
+
Ceres: typing.ClassVar[NLP_SolverID] # value = <NLP_SolverID.Ceres: 11>
|
|
1250
|
+
Ipopt: typing.ClassVar[NLP_SolverID] # value = <NLP_SolverID.Ipopt: 10>
|
|
1218
1251
|
LBFGS: typing.ClassVar[NLP_SolverID] # value = <NLP_SolverID.LBFGS: 2>
|
|
1219
|
-
NLopt: typing.ClassVar[NLP_SolverID] # value = <NLP_SolverID.NLopt:
|
|
1220
|
-
__members__: typing.ClassVar[dict[str, NLP_SolverID]] # value = {'gradientDescent': <NLP_SolverID.gradientDescent: 0>, 'rprop': <NLP_SolverID.rprop: 1>, 'LBFGS': <NLP_SolverID.LBFGS: 2>, 'newton': <NLP_SolverID.newton: 3>, 'augmentedLag': <NLP_SolverID.augmentedLag: 4>, 'squaredPenalty': <NLP_SolverID.squaredPenalty: 5>, 'logBarrier': <NLP_SolverID.logBarrier: 6>, 'singleSquaredPenalty': <NLP_SolverID.singleSquaredPenalty: 7>, 'NLopt': <NLP_SolverID.NLopt:
|
|
1252
|
+
NLopt: typing.ClassVar[NLP_SolverID] # value = <NLP_SolverID.NLopt: 9>
|
|
1253
|
+
__members__: typing.ClassVar[dict[str, NLP_SolverID]] # value = {'gradientDescent': <NLP_SolverID.gradientDescent: 0>, 'rprop': <NLP_SolverID.rprop: 1>, 'LBFGS': <NLP_SolverID.LBFGS: 2>, 'newton': <NLP_SolverID.newton: 3>, 'augmentedLag': <NLP_SolverID.augmentedLag: 4>, 'squaredPenalty': <NLP_SolverID.squaredPenalty: 5>, 'logBarrier': <NLP_SolverID.logBarrier: 6>, 'singleSquaredPenalty': <NLP_SolverID.singleSquaredPenalty: 7>, 'NLopt': <NLP_SolverID.NLopt: 9>, 'Ipopt': <NLP_SolverID.Ipopt: 10>, 'Ceres': <NLP_SolverID.Ceres: 11>}
|
|
1221
1254
|
augmentedLag: typing.ClassVar[NLP_SolverID] # value = <NLP_SolverID.augmentedLag: 4>
|
|
1222
1255
|
gradientDescent: typing.ClassVar[NLP_SolverID] # value = <NLP_SolverID.gradientDescent: 0>
|
|
1223
1256
|
logBarrier: typing.ClassVar[NLP_SolverID] # value = <NLP_SolverID.logBarrier: 6>
|
|
@@ -1267,9 +1300,7 @@ class NLP_SolverOptions:
|
|
|
1267
1300
|
...
|
|
1268
1301
|
def set_damping(self, arg0: float) -> NLP_SolverOptions:
|
|
1269
1302
|
...
|
|
1270
|
-
def
|
|
1271
|
-
...
|
|
1272
|
-
def set_maxStep(self, arg0: float) -> NLP_SolverOptions:
|
|
1303
|
+
def set_lambdaMax(self, arg0: float) -> NLP_SolverOptions:
|
|
1273
1304
|
...
|
|
1274
1305
|
def set_muInc(self, arg0: float) -> NLP_SolverOptions:
|
|
1275
1306
|
...
|
|
@@ -1285,6 +1316,8 @@ class NLP_SolverOptions:
|
|
|
1285
1316
|
...
|
|
1286
1317
|
def set_stepInc(self, arg0: float) -> NLP_SolverOptions:
|
|
1287
1318
|
...
|
|
1319
|
+
def set_stepMax(self, arg0: float) -> NLP_SolverOptions:
|
|
1320
|
+
...
|
|
1288
1321
|
def set_stopEvals(self, arg0: int) -> NLP_SolverOptions:
|
|
1289
1322
|
...
|
|
1290
1323
|
def set_stopFTolerance(self, arg0: float) -> NLP_SolverOptions:
|
|
@@ -1692,6 +1725,8 @@ class Simulation:
|
|
|
1692
1725
|
"""
|
|
1693
1726
|
def getTimeToSplineEnd(self) -> float:
|
|
1694
1727
|
...
|
|
1728
|
+
def get_frameVelocities(self) -> arr:
|
|
1729
|
+
...
|
|
1695
1730
|
def get_q(self) -> arr:
|
|
1696
1731
|
...
|
|
1697
1732
|
def get_qDot(self) -> arr:
|
|
@@ -1821,7 +1856,7 @@ def compiled() -> str:
|
|
|
1821
1856
|
"""
|
|
1822
1857
|
return a compile date+time version string
|
|
1823
1858
|
"""
|
|
1824
|
-
def
|
|
1859
|
+
def default_Actions2KOMO_Translator() -> Actions2KOMO_Translator:
|
|
1825
1860
|
...
|
|
1826
1861
|
def default_TAMP_Provider(C: Config, lgp_config_file: str) -> TAMP_Provider:
|
|
1827
1862
|
...
|
robotic/_robotic.so
CHANGED
|
Binary file
|
|
@@ -58,14 +58,14 @@ struct CtrlTarget_MaxCarrot : CtrlMovingTarget {
|
|
|
58
58
|
//===========================================================================
|
|
59
59
|
|
|
60
60
|
struct CtrlTarget_PathCarrot: CtrlMovingTarget {
|
|
61
|
-
double
|
|
61
|
+
double stepMax;
|
|
62
62
|
rai::BSpline spline;
|
|
63
63
|
double endTime;
|
|
64
64
|
double time=0.;
|
|
65
65
|
uint countInRange=0;
|
|
66
66
|
uint countBlocked=0;
|
|
67
|
-
CtrlTarget_PathCarrot(const arr& path, double
|
|
68
|
-
CtrlTarget_PathCarrot(const arr& path, double
|
|
67
|
+
CtrlTarget_PathCarrot(const arr& path, double stepMax, double _endTime=1.);
|
|
68
|
+
CtrlTarget_PathCarrot(const arr& path, double stepMax, const arr& times);
|
|
69
69
|
virtual ActStatus step(double tau, CtrlObjective* o, const arr& y_real);
|
|
70
70
|
virtual void setTimeScale(double d) { endTime = d; }
|
|
71
71
|
virtual void resetState() { time=0.; countInRange=0.; }
|
robotic/include/rai/Core/array.h
CHANGED
|
@@ -291,7 +291,7 @@ template<class T> struct Array {
|
|
|
291
291
|
|
|
292
292
|
//===========================================================================
|
|
293
293
|
/// @}
|
|
294
|
-
/// @name
|
|
294
|
+
/// @name Array operators
|
|
295
295
|
/// @{
|
|
296
296
|
|
|
297
297
|
template<class T> Array<T> operator, (const Array<T>& y, const Array<T>& z); //concat
|
|
@@ -668,8 +668,8 @@ uint product(const uintA& x);
|
|
|
668
668
|
uint max(const uintA& x);
|
|
669
669
|
uint sum(const uintA& x);
|
|
670
670
|
float sum(const floatA& x);
|
|
671
|
-
|
|
672
|
-
|
|
671
|
+
template<class T> Array<T> integral(const Array<T>& x);
|
|
672
|
+
template<class T> Array<T> differencing(const Array<T>& x, uint width=1);
|
|
673
673
|
|
|
674
674
|
template<class T>
|
|
675
675
|
void tensorPermutation(Array<T>& Y, const Array<T>& X, const uintA& Yid);
|
|
@@ -188,7 +188,6 @@ arr operator*(double y, const arr& z);
|
|
|
188
188
|
arr operator/(int mustBeOne, const arr& z_tobeinverted);
|
|
189
189
|
arr operator/(const arr& y, double z);
|
|
190
190
|
arr operator/(const arr& y, const arr& z); //element-wise devision
|
|
191
|
-
arr operator, (const arr& y, const arr& z); //concat
|
|
192
191
|
|
|
193
192
|
arr& operator<<(arr& x, const double& y); //append
|
|
194
193
|
arr& operator<<(arr& x, const arr& y); //append
|
|
@@ -469,8 +468,6 @@ inline arr diag(const arr& x) { arr y; y.setDiag(x); return y; }
|
|
|
469
468
|
arr skew(const arr& x);
|
|
470
469
|
arr inverse2d(const arr& A);
|
|
471
470
|
arr replicate(const arr& A, uint d0);
|
|
472
|
-
arr integral(const arr& x);
|
|
473
|
-
arr differencing(const arr& x, uint width=1);
|
|
474
471
|
|
|
475
472
|
void checkNan(const arr& x);
|
|
476
473
|
|
robotic/include/rai/Geo/mesh.h
CHANGED
|
@@ -139,7 +139,7 @@ struct Mesh {
|
|
|
139
139
|
/// @name IO
|
|
140
140
|
void write(std::ostream&) const; ///< only writes generic info
|
|
141
141
|
void read(std::istream&, const char* fileExtension, const char* filename=nullptr);
|
|
142
|
-
|
|
142
|
+
Mesh& readFile(const char* filename);
|
|
143
143
|
void readTriFile(std::istream& is);
|
|
144
144
|
void readOffFile(std::istream& is);
|
|
145
145
|
void readPlyFile(std::istream& is);
|
|
@@ -34,7 +34,7 @@ struct SDF : ScalarFunction {
|
|
|
34
34
|
void animateSlices(const arr& lo, const arr& hi, double wait=0.);
|
|
35
35
|
void view(double wait=0.);
|
|
36
36
|
|
|
37
|
-
arr projectNewton(const arr& x0, double
|
|
37
|
+
arr projectNewton(const arr& x0, double stepMax=.1, double regularization=1e-1);
|
|
38
38
|
|
|
39
39
|
virtual void write(std::ostream& os) const { NIY; }
|
|
40
40
|
virtual void read(std::istream& is) { NIY; }
|
|
@@ -21,7 +21,7 @@ struct Render_Options {
|
|
|
21
21
|
RAI_PARAM("Render/", arr, lights, {})
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
enum RenderType { _solid, _shadow, _tensor, _marker, _transparent,
|
|
24
|
+
enum RenderType { _solid, _shadow, _tensor, _text, _marker, _transparent, _all };
|
|
25
25
|
|
|
26
26
|
struct RenderAsset{
|
|
27
27
|
floatA vertices, colors, normals, texture;
|
|
@@ -142,6 +142,7 @@ struct RenderData {
|
|
|
142
142
|
void ensureInitialized(OpenGL &gl);
|
|
143
143
|
virtual void glDraw(OpenGL &gl);
|
|
144
144
|
void glDeinitialize(OpenGL &gl);
|
|
145
|
+
void visualsOnly(bool _visualsOnly=true){ if(_visualsOnly) renderUntil=_tensor; else renderUntil=_all; }
|
|
145
146
|
|
|
146
147
|
//private:
|
|
147
148
|
void renderObjects(GLuint idT_WM, const uintA& sortedObjIDs, RenderType type, GLint idFlatColor=-1, GLint idScale=-1);
|
robotic/include/rai/KOMO/komo.h
CHANGED
|
@@ -177,6 +177,7 @@ struct KOMO : NonCopyable {
|
|
|
177
177
|
|
|
178
178
|
arrA getPath_qAll(); ///< get the DOFs (of potentially varying dimensionality) for each configuration
|
|
179
179
|
arr getPath_qOrg(); ///< get joint path, optionally for selected joints
|
|
180
|
+
arr getPath(uintA dofIndices={});
|
|
180
181
|
arr getPath_X(); ///< get frame path, optionally for selected frames
|
|
181
182
|
|
|
182
183
|
arr getPath_tau();
|
|
@@ -14,17 +14,18 @@
|
|
|
14
14
|
//===========================================================================
|
|
15
15
|
|
|
16
16
|
struct ManipulationModelling {
|
|
17
|
-
str info;
|
|
18
|
-
//created on setup (or given):
|
|
19
17
|
std::shared_ptr<KOMO> komo;
|
|
18
|
+
str info;
|
|
20
19
|
|
|
21
20
|
//solver buffers:
|
|
22
|
-
std::shared_ptr<rai::RRT_PathFinder> rrt;
|
|
23
21
|
std::shared_ptr<SolverReturn> ret;
|
|
22
|
+
arr qTarget;
|
|
24
23
|
arr path;
|
|
25
24
|
|
|
26
25
|
ManipulationModelling(const str& _info={});
|
|
27
|
-
ManipulationModelling(const std::shared_ptr<KOMO>& _komo);
|
|
26
|
+
ManipulationModelling(const std::shared_ptr<KOMO>& _komo, const str& _info = str{});
|
|
27
|
+
|
|
28
|
+
KOMO& k() { return *komo; }
|
|
28
29
|
|
|
29
30
|
void setup_inverse_kinematics(rai::Configuration& C, double homing_scale=1e-1, bool accumulated_collisions=true, bool joint_limits=true, bool quaternion_norms=true);
|
|
30
31
|
void setup_sequence(rai::Configuration& C, uint K, double homing_scale=1e-2, double velocity_scale=1e-1, bool accumulated_collisions=true, bool joint_limits=true, bool quaternion_norms=true);
|
|
@@ -33,7 +34,7 @@ struct ManipulationModelling {
|
|
|
33
34
|
void setup_point_to_point_motion(rai::Configuration& C, const arr& q1, double homing_scale=1e-2, double acceleration_scale=1e-1, bool accumulated_collisions=true, bool joint_limits=true, bool quaternion_norms=true);
|
|
34
35
|
void setup_point_to_point_rrt(rai::Configuration& C, const arr& q0, const arr& q1, const StringA& explicitCollisionPairs);
|
|
35
36
|
|
|
36
|
-
void
|
|
37
|
+
void add_stable_frame(rai::JointType type, const char* parent, const char* name, const char* initName=0, rai::Frame* initFrame=0, double markerSize=-1.);
|
|
37
38
|
|
|
38
39
|
void grasp_top_box(double time, const char* gripper, const char* obj, str grasp_direction="xz");
|
|
39
40
|
void grasp_box(double time, const char* gripper, const char* obj, const char* palm, str grasp_direction="x", double margin=.02);
|
|
@@ -42,10 +43,11 @@ struct ManipulationModelling {
|
|
|
42
43
|
|
|
43
44
|
void straight_push(arr times, str obj, str gripper, str table);
|
|
44
45
|
|
|
45
|
-
void
|
|
46
|
+
void no_collisions(const arr& time_interval, const StringA& pairs, double margin=.001, double scale=1e1);
|
|
47
|
+
void freeze_joint(const arr& time_interval, const StringA& joints);
|
|
48
|
+
void freeze_relativePose(const arr& time_interval, str to, str from);
|
|
46
49
|
|
|
47
|
-
void
|
|
48
|
-
void switch_place();
|
|
50
|
+
void snap_switch(double time, str parent, str obj);
|
|
49
51
|
|
|
50
52
|
void target_position();
|
|
51
53
|
void target_relative_xy_position(double time, const char* obj, const char* relativeTo, arr pos);
|
|
@@ -61,8 +63,8 @@ struct ManipulationModelling {
|
|
|
61
63
|
arr sample(const char* sampleMethod=0, int verbose=1);
|
|
62
64
|
void debug(bool listObjectives=true, bool plotOverTime=false);
|
|
63
65
|
|
|
64
|
-
std::shared_ptr<ManipulationModelling> sub_motion(uint phase, bool fixEnd=true, double homing_scale=1e-2, double acceleration_scale=1e-1, bool accumulated_collisions=true, bool joint_limits=true, bool quaternion_norms=false);
|
|
65
|
-
std::shared_ptr<
|
|
66
|
+
std::shared_ptr<ManipulationModelling> sub_motion(uint phase, bool fixEnd=true, double homing_scale=1e-2, double acceleration_scale=1e-1, bool accumulated_collisions=true, bool joint_limits=true, bool quaternion_norms=false, const StringA& activeDofs={});
|
|
67
|
+
std::shared_ptr<rai::RRT_PathFinder> sub_rrt(uint phase, const StringA& explicitCollisionPairs= {}, const StringA& activeDofs={});
|
|
66
68
|
|
|
67
69
|
void play(rai::Configuration& C, double duration=1.);
|
|
68
70
|
|
|
@@ -10,9 +10,45 @@
|
|
|
10
10
|
|
|
11
11
|
#include "komo.h"
|
|
12
12
|
#include "skeleton.h"
|
|
13
|
+
#include "manipTools.h"
|
|
13
14
|
|
|
14
15
|
#include "../Optim/NLP.h"
|
|
15
16
|
|
|
17
|
+
shared_ptr<KOMO> problem_IK();
|
|
18
|
+
shared_ptr<KOMO> problem_IKobstacle();
|
|
19
|
+
shared_ptr<KOMO> problem_IKtorus();
|
|
20
|
+
shared_ptr<KOMO> problem_PushToReach();
|
|
21
|
+
shared_ptr<KOMO> problem_StableSphere();
|
|
22
|
+
|
|
23
|
+
//===========================================================================
|
|
24
|
+
|
|
25
|
+
struct Problem{
|
|
26
|
+
std::shared_ptr<KOMO> komo;
|
|
27
|
+
std::shared_ptr<NLP> nlp;
|
|
28
|
+
|
|
29
|
+
void load(str problem);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
//===========================================================================
|
|
33
|
+
|
|
34
|
+
//a set of spheres, confined in a box, and no collision, minimizing their height..
|
|
35
|
+
struct SpherePacking : NLP{
|
|
36
|
+
arr x; //position of spheres
|
|
37
|
+
uint n;
|
|
38
|
+
double rad;
|
|
39
|
+
bool ineqAccum;
|
|
40
|
+
|
|
41
|
+
rai::Configuration disp; //for reporting/display only
|
|
42
|
+
|
|
43
|
+
SpherePacking(uint _n, double _rad, bool _ineqAccum=false);
|
|
44
|
+
|
|
45
|
+
void ineqAccumulation(uint phiIdx, arr& phi, arr& J, arr& g, const arr& Jg);
|
|
46
|
+
void evaluate(arr& phi, arr& J, const arr &_x);
|
|
47
|
+
void report(ostream &os, int verbose, const char *msg=0);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
//===========================================================================
|
|
51
|
+
|
|
16
52
|
struct OptBench_InvKin_Simple {
|
|
17
53
|
OptBench_InvKin_Simple();
|
|
18
54
|
shared_ptr<KOMO> komo;
|
|
@@ -20,6 +20,15 @@ struct F_AboveBox : Feature {
|
|
|
20
20
|
|
|
21
21
|
//===========================================================================
|
|
22
22
|
|
|
23
|
+
struct F_AlignWithDiff : Feature {
|
|
24
|
+
rai::Vector ref;
|
|
25
|
+
F_AlignWithDiff(const rai::Vector& _ref) : ref(_ref) { setOrder(1); }
|
|
26
|
+
virtual arr phi(const FrameL& F);
|
|
27
|
+
virtual uint dim_phi(const FrameL& F) { return 3; }
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
//===========================================================================
|
|
31
|
+
|
|
23
32
|
struct F_InsideBox : Feature {
|
|
24
33
|
rai::Vector ivec; ///< additional position or vector
|
|
25
34
|
double margin;
|
|
@@ -69,8 +69,13 @@ enum FeatureSymbol : int {
|
|
|
69
69
|
|
|
70
70
|
FS_qQuaternionNorms,
|
|
71
71
|
FS_opposeCentral,
|
|
72
|
+
FS_linangVel,
|
|
73
|
+
FS_AlignXWithDiff,
|
|
74
|
+
FS_AlignYWithDiff,
|
|
75
|
+
|
|
72
76
|
FS_jointState = FS_qItself,
|
|
73
|
-
FS_negDistance = FS_distance
|
|
77
|
+
FS_negDistance = FS_distance,
|
|
78
|
+
|
|
74
79
|
};
|
|
75
80
|
|
|
76
81
|
namespace rai {
|
robotic/include/rai/Kin/frame.h
CHANGED
|
@@ -145,7 +145,7 @@ struct Frame : NonCopyable {
|
|
|
145
145
|
void prefixSubtree(const char* prefix);
|
|
146
146
|
|
|
147
147
|
//composed object manipulation
|
|
148
|
-
|
|
148
|
+
Transformation transformToDiagInertia();
|
|
149
149
|
Frame& computeCompoundInertia(bool clearChildInertias=true);
|
|
150
150
|
Frame& convertDecomposedShapeToChildFrames();
|
|
151
151
|
|
robotic/include/rai/Kin/kin.h
CHANGED
|
@@ -96,6 +96,7 @@ struct Configuration {
|
|
|
96
96
|
Frame* addFrame(const char* name, const char* parent=nullptr, const char* args=nullptr, bool warnDuplicateName=true);
|
|
97
97
|
Frame* addFile(const char* filename, const char* namePrefix=0);
|
|
98
98
|
Frame* addAssimp(const char* filename);
|
|
99
|
+
Frame* addH5Object(const char* framename, const char* filename, int verbose);
|
|
99
100
|
Frame* addCopy(const FrameL& F, const DofL& _dofs, const str& prefix= {});
|
|
100
101
|
Frame* addConfigurationCopy(const Configuration& C, const str& prefix= {}, double tau=1.);
|
|
101
102
|
void delFrame(const char* name);
|
|
@@ -57,6 +57,7 @@ struct Simulation {
|
|
|
57
57
|
//-- get state information
|
|
58
58
|
const arr& get_q() { return C.getJointState(); }
|
|
59
59
|
const arr& get_qDot();
|
|
60
|
+
const arr& get_frameVelocities();
|
|
60
61
|
double getTimeToSplineEnd();
|
|
61
62
|
double getGripperWidth(const char* gripperFrameName);
|
|
62
63
|
bool getGripperIsGrasping(const char* gripperFrameName);
|
robotic/include/rai/Kin/viewer.h
CHANGED
|
@@ -32,7 +32,7 @@ struct ConfigurationViewer : RenderData {
|
|
|
32
32
|
|
|
33
33
|
int view(bool watch=false, const char* _text=0);
|
|
34
34
|
int view_slice(uint t, bool watch=false);
|
|
35
|
-
int
|
|
35
|
+
int view_play(bool watch=true, double delay=1., str saveVideoPath=nullptr); ///< display the trajectory; use "z.vid/" as vid prefix
|
|
36
36
|
|
|
37
37
|
rai::Camera& displayCamera(); ///< access to the display camera to change the view
|
|
38
38
|
byteA getRgb();
|
|
@@ -9,8 +9,8 @@ namespace rai {
|
|
|
9
9
|
|
|
10
10
|
//===========================================================================
|
|
11
11
|
|
|
12
|
-
struct
|
|
13
|
-
virtual ~
|
|
12
|
+
struct Actions2KOMO_Translator {
|
|
13
|
+
virtual ~Actions2KOMO_Translator() {}
|
|
14
14
|
virtual std::shared_ptr<KOMO> setup_sequence(Configuration& C, uint K) = 0;
|
|
15
15
|
virtual void add_action_constraints(std::shared_ptr<KOMO>& komo, double time, const StringA& action) = 0;
|
|
16
16
|
virtual void add_action_constraints_motion(std::shared_ptr<KOMO>& komo, double time, const StringA& prev_action, const StringA& action, uint actionPhase) = 0;
|
|
@@ -74,7 +74,7 @@ struct ActionNode{
|
|
|
74
74
|
ActionNode(ActionNode* _parent, StringA _action);
|
|
75
75
|
~ActionNode();
|
|
76
76
|
|
|
77
|
-
PTR<KOMO>& get_ways(Configuration& C,
|
|
77
|
+
PTR<KOMO>& get_ways(Configuration& C, Actions2KOMO_Translator& trans, const StringA& explicitCollisions);
|
|
78
78
|
Array<PTR<KOMO_Motif>>& getWayMotifs();
|
|
79
79
|
|
|
80
80
|
|
|
@@ -99,7 +99,7 @@ struct LGP_Tool{
|
|
|
99
99
|
//problem interface
|
|
100
100
|
Configuration& C;
|
|
101
101
|
TAMP_Provider& tamp;
|
|
102
|
-
|
|
102
|
+
Actions2KOMO_Translator& trans;
|
|
103
103
|
int verbose=1;
|
|
104
104
|
|
|
105
105
|
//internal data structures for action search and job management
|
|
@@ -113,7 +113,7 @@ struct LGP_Tool{
|
|
|
113
113
|
uint step_count=0;
|
|
114
114
|
|
|
115
115
|
LGP_Tool(const char* lgp_configfile);
|
|
116
|
-
LGP_Tool(Configuration& _C, TAMP_Provider& _tamp,
|
|
116
|
+
LGP_Tool(Configuration& _C, TAMP_Provider& _tamp, Actions2KOMO_Translator& _trans);
|
|
117
117
|
~LGP_Tool();
|
|
118
118
|
|
|
119
119
|
void solve_step();
|
|
@@ -144,6 +144,6 @@ private:
|
|
|
144
144
|
|
|
145
145
|
MotifL analyzeMotifs(KOMO& komo, int verbose=0);
|
|
146
146
|
PTR<TAMP_Provider> default_TAMP_Provider(rai::Configuration &C, const char* lgp_configfile);
|
|
147
|
-
PTR<
|
|
147
|
+
PTR<Actions2KOMO_Translator> default_Actions2KOMO_Translator();
|
|
148
148
|
|
|
149
149
|
} //namespace
|
|
@@ -94,8 +94,8 @@ private:
|
|
|
94
94
|
void ensure_eval() { ev.eval(x, *this); }
|
|
95
95
|
void store_eval() { ensure_eval(); ev_stored = ev; }
|
|
96
96
|
|
|
97
|
-
bool step_GaussNewton(bool slackStep, double penaltyMu=1., double alpha=-1., double
|
|
98
|
-
void step_PlainGrad(bool slackMode, double penaltyMu=1., double alpha=-1., double
|
|
97
|
+
bool step_GaussNewton(bool slackStep, double penaltyMu=1., double alpha=-1., double stepMax=-1., double lambda=1e-2);
|
|
98
|
+
void step_PlainGrad(bool slackMode, double penaltyMu=1., double alpha=-1., double stepMax=-1.);
|
|
99
99
|
bool step_hit_and_run();
|
|
100
100
|
bool step_noise(double sig);
|
|
101
101
|
bool step_noise_covariant(double sig, double penaltyMu=1., double lambda=1e0);
|
|
@@ -133,9 +133,9 @@ struct LineSampler {
|
|
|
133
133
|
double beta_lo=-1e6, beta_up=1e6;
|
|
134
134
|
double p_beta;
|
|
135
135
|
|
|
136
|
-
LineSampler(double
|
|
136
|
+
LineSampler(double stepMax=-1.) { if(stepMax>0.) init(stepMax); }
|
|
137
137
|
|
|
138
|
-
void init(double
|
|
138
|
+
void init(double stepMax) { beta_lo=-stepMax; beta_up=stepMax; }
|
|
139
139
|
|
|
140
140
|
double eval_beta(double beta);
|
|
141
141
|
|
|
@@ -17,6 +17,7 @@ struct ConstrainedSolver;
|
|
|
17
17
|
enum NLP_SolverID { NLPS_none=-1,
|
|
18
18
|
NLPS_gradientDescent, NLPS_rprop, NLPS_LBFGS, NLPS_newton,
|
|
19
19
|
NLPS_augmentedLag, NLPS_squaredPenalty, NLPS_logBarrier, NLPS_singleSquaredPenalty,
|
|
20
|
+
NLPS_slackGN,
|
|
20
21
|
NLPS_NLopt, NLPS_Ipopt, NLPS_Ceres
|
|
21
22
|
};
|
|
22
23
|
|
|
@@ -0,0 +1,54 @@
|
|
|
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 "options.h"
|
|
12
|
+
#include "NLP.h"
|
|
13
|
+
#include "../Core/util.h"
|
|
14
|
+
|
|
15
|
+
//===========================================================================
|
|
16
|
+
|
|
17
|
+
namespace rai {
|
|
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
|
+
struct SlackGaussNewton {
|
|
30
|
+
OptOptions opt;
|
|
31
|
+
std::shared_ptr<NLP> nlp;
|
|
32
|
+
|
|
33
|
+
SlackGaussNewton(const shared_ptr<NLP>& _nlp, const arr& x_init={});
|
|
34
|
+
SlackGaussNewton& setOptions(const OptOptions& _opt) { opt = _opt; return *this; }
|
|
35
|
+
std::shared_ptr<SolverReturn> solve();
|
|
36
|
+
|
|
37
|
+
private:
|
|
38
|
+
arr x;
|
|
39
|
+
uint evals=0;
|
|
40
|
+
uint iters=0;
|
|
41
|
+
double step();
|
|
42
|
+
|
|
43
|
+
struct Eval {
|
|
44
|
+
arr x;
|
|
45
|
+
arr phi, J;
|
|
46
|
+
arr err;
|
|
47
|
+
arr s, Js;
|
|
48
|
+
void eval(const arr& _x, SlackGaussNewton& walker);
|
|
49
|
+
} ev;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
//===========================================================================
|
|
53
|
+
|
|
54
|
+
}
|
|
@@ -50,12 +50,12 @@ struct Rprop {
|
|
|
50
50
|
unique_ptr<struct sRprop> self;
|
|
51
51
|
Rprop();
|
|
52
52
|
~Rprop();
|
|
53
|
-
void init(double initialStepSize=1., double minStepSize=1e-6, double
|
|
53
|
+
void init(double initialStepSize=1., double minStepSize=1e-6, double stepMaxSize=50.);
|
|
54
54
|
bool step(arr& x, const ScalarFunction& f);
|
|
55
55
|
uint loop(arr& x, const ScalarFunction& f, double stoppingTolerance=1e-2, double initialStepSize=1., uint maxIterations=1000, int verbose=0);
|
|
56
56
|
};
|
|
57
57
|
|
|
58
58
|
inline uint optRprop(arr& x, const ScalarFunction& f, rai::OptOptions opt=DEFAULT_OPTIONS) {
|
|
59
|
-
return Rprop().loop(x, f, opt.stopTolerance, opt.
|
|
59
|
+
return Rprop().loop(x, f, opt.stopTolerance, opt.stepInit, opt.stopEvals, opt.verbose);
|
|
60
60
|
}
|
|
61
61
|
|