robotic 0.3.4.dev2__cp38-cp38-manylinux2014_x86_64.whl → 0.3.4.dev4__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 +16 -3
- robotic/_robotic.so +0 -0
- robotic/include/rai/Core/array.h +1 -0
- robotic/include/rai/Core/array.ipp +6 -14
- robotic/include/rai/Core/defines.h +0 -1
- robotic/include/rai/Core/thread.h +1 -1
- robotic/include/rai/Core/util.h +0 -1
- robotic/include/rai/Geo/geo.h +7 -7
- robotic/include/rai/Geo/pairCollision.h +4 -8
- robotic/include/rai/Kin/cameraview.h +24 -36
- robotic/include/rai/Kin/simulation.h +5 -3
- robotic/include/rai/Logic/treeSearchDomain.h +2 -2
- robotic/include/rai/Optim/i_NLopt.h +4 -0
- robotic/include/rai/Optim/m_EvoStrategies.h +38 -18
- robotic/include/rai/Optim/m_LeastSquaresZeroOrder.h +15 -1
- robotic/include/rai/Optim/m_NelderMead.h +7 -1
- robotic/include/rai/Optim/options.h +3 -2
- robotic/include/rai/Optim/utils.h +2 -1
- robotic/include/rai/Search/TreeSearchNode.h +1 -1
- robotic/librai.so +0 -0
- robotic/meshTool +0 -0
- robotic/version.py +1 -1
- {robotic-0.3.4.dev2.dist-info → robotic-0.3.4.dev4.dist-info}/METADATA +1 -1
- {robotic-0.3.4.dev2.dist-info → robotic-0.3.4.dev4.dist-info}/RECORD +34 -35
- robotic/nlp.py +0 -113
- {robotic-0.3.4.dev2.data → robotic-0.3.4.dev4.data}/scripts/ry-bot +0 -0
- {robotic-0.3.4.dev2.data → robotic-0.3.4.dev4.data}/scripts/ry-h5info +0 -0
- {robotic-0.3.4.dev2.data → robotic-0.3.4.dev4.data}/scripts/ry-info +0 -0
- {robotic-0.3.4.dev2.data → robotic-0.3.4.dev4.data}/scripts/ry-meshTool +0 -0
- {robotic-0.3.4.dev2.data → robotic-0.3.4.dev4.data}/scripts/ry-test +0 -0
- {robotic-0.3.4.dev2.data → robotic-0.3.4.dev4.data}/scripts/ry-urdfConvert.py +0 -0
- {robotic-0.3.4.dev2.data → robotic-0.3.4.dev4.data}/scripts/ry-view +0 -0
- {robotic-0.3.4.dev2.dist-info → robotic-0.3.4.dev4.dist-info}/LICENSE +0 -0
- {robotic-0.3.4.dev2.dist-info → robotic-0.3.4.dev4.dist-info}/WHEEL +0 -0
- {robotic-0.3.4.dev2.dist-info → robotic-0.3.4.dev4.dist-info}/top_level.txt +0 -0
robotic/_robotic.pyi
CHANGED
|
@@ -236,7 +236,7 @@ class CameraView:
|
|
|
236
236
|
"""
|
|
237
237
|
constructor
|
|
238
238
|
"""
|
|
239
|
-
def computeImageAndDepth(self, config: Config, visualsOnly: bool = True) -> tuple:
|
|
239
|
+
def computeImageAndDepth(self, config: Config, simulateDepthNoise: bool = False, visualsOnly: bool = True) -> tuple:
|
|
240
240
|
"""
|
|
241
241
|
returns image and depth from a camera sensor; the 'config' argument needs to be the same configuration as in the constructor, but in new state
|
|
242
242
|
"""
|
|
@@ -1301,7 +1301,7 @@ class NLP_Solver:
|
|
|
1301
1301
|
"""
|
|
1302
1302
|
def setInitialization(self, arg0: arr) -> NLP_Solver:
|
|
1303
1303
|
...
|
|
1304
|
-
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, stopLineSteps: int = 10, stopTinySteps: int = 4, stepInit: float = 1.0, stepMin: float = -1.0, stepMax: float = 0.2, stepInc: float = 1.5, stepDec: float = 0.5, damping: float = 1.0, 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, interiorPadding: float = 0.01, boundedNewton: bool = True, finiteDifference:
|
|
1304
|
+
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, stopLineSteps: int = 10, stopTinySteps: int = 4, stepInit: float = 1.0, stepMin: float = -1.0, stepMax: float = 0.2, stepInc: float = 1.5, stepDec: float = 0.5, damping: float = 1.0, 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, interiorPadding: float = 0.01, boundedNewton: bool = True, finiteDifference: float = -1.0) -> NLP_Solver:
|
|
1305
1305
|
"""
|
|
1306
1306
|
set solver options
|
|
1307
1307
|
"""
|
|
@@ -1492,10 +1492,13 @@ class OptMethod:
|
|
|
1492
1492
|
NelderMead
|
|
1493
1493
|
|
|
1494
1494
|
CMA
|
|
1495
|
+
|
|
1496
|
+
ES
|
|
1495
1497
|
"""
|
|
1496
1498
|
AugmentedLag: typing.ClassVar[OptMethod] # value = <OptMethod.AugmentedLag: 5>
|
|
1497
1499
|
CMA: typing.ClassVar[OptMethod] # value = <OptMethod.CMA: 18>
|
|
1498
1500
|
Ceres: typing.ClassVar[OptMethod] # value = <OptMethod.Ceres: 14>
|
|
1501
|
+
ES: typing.ClassVar[OptMethod] # value = <OptMethod.ES: 19>
|
|
1499
1502
|
GradientDescent: typing.ClassVar[OptMethod] # value = <OptMethod.GradientDescent: 1>
|
|
1500
1503
|
Ipopt: typing.ClassVar[OptMethod] # value = <OptMethod.Ipopt: 12>
|
|
1501
1504
|
LBFGS: typing.ClassVar[OptMethod] # value = <OptMethod.LBFGS: 3>
|
|
@@ -1506,7 +1509,7 @@ class OptMethod:
|
|
|
1506
1509
|
Newton: typing.ClassVar[OptMethod] # value = <OptMethod.Newton: 4>
|
|
1507
1510
|
Rprop: typing.ClassVar[OptMethod] # value = <OptMethod.Rprop: 2>
|
|
1508
1511
|
SquaredPenalty: typing.ClassVar[OptMethod] # value = <OptMethod.SquaredPenalty: 8>
|
|
1509
|
-
__members__: typing.ClassVar[dict[str, OptMethod]] # value = {'none': <OptMethod.none: 0>, 'GradientDescent': <OptMethod.GradientDescent: 1>, 'Rprop': <OptMethod.Rprop: 2>, 'LBFGS': <OptMethod.LBFGS: 3>, 'Newton': <OptMethod.Newton: 4>, 'AugmentedLag': <OptMethod.AugmentedLag: 5>, 'LogBarrier': <OptMethod.LogBarrier: 6>, 'slackGN_logBarrier': <OptMethod.slackGN_logBarrier: 7>, 'SquaredPenalty': <OptMethod.SquaredPenalty: 8>, 'singleSquaredPenalty': <OptMethod.singleSquaredPenalty: 9>, 'slackGN': <OptMethod.slackGN: 10>, 'NLopt': <OptMethod.NLopt: 11>, 'Ipopt': <OptMethod.Ipopt: 12>, 'slackGN_Ipopt': <OptMethod.slackGN_Ipopt: 13>, 'Ceres': <OptMethod.Ceres: 14>, 'LSZO': <OptMethod.LSZO: 15>, 'greedy': <OptMethod.greedy: 16>, 'NelderMead': <OptMethod.NelderMead: 17>, 'CMA': <OptMethod.CMA: 18>}
|
|
1512
|
+
__members__: typing.ClassVar[dict[str, OptMethod]] # value = {'none': <OptMethod.none: 0>, 'GradientDescent': <OptMethod.GradientDescent: 1>, 'Rprop': <OptMethod.Rprop: 2>, 'LBFGS': <OptMethod.LBFGS: 3>, 'Newton': <OptMethod.Newton: 4>, 'AugmentedLag': <OptMethod.AugmentedLag: 5>, 'LogBarrier': <OptMethod.LogBarrier: 6>, 'slackGN_logBarrier': <OptMethod.slackGN_logBarrier: 7>, 'SquaredPenalty': <OptMethod.SquaredPenalty: 8>, 'singleSquaredPenalty': <OptMethod.singleSquaredPenalty: 9>, 'slackGN': <OptMethod.slackGN: 10>, 'NLopt': <OptMethod.NLopt: 11>, 'Ipopt': <OptMethod.Ipopt: 12>, 'slackGN_Ipopt': <OptMethod.slackGN_Ipopt: 13>, 'Ceres': <OptMethod.Ceres: 14>, 'LSZO': <OptMethod.LSZO: 15>, 'greedy': <OptMethod.greedy: 16>, 'NelderMead': <OptMethod.NelderMead: 17>, 'CMA': <OptMethod.CMA: 18>, 'ES': <OptMethod.ES: 19>}
|
|
1510
1513
|
greedy: typing.ClassVar[OptMethod] # value = <OptMethod.greedy: 16>
|
|
1511
1514
|
none: typing.ClassVar[OptMethod] # value = <OptMethod.none: 0>
|
|
1512
1515
|
singleSquaredPenalty: typing.ClassVar[OptMethod] # value = <OptMethod.singleSquaredPenalty: 9>
|
|
@@ -1630,12 +1633,18 @@ class RRT_PathFinder:
|
|
|
1630
1633
|
"""
|
|
1631
1634
|
only after setProblem
|
|
1632
1635
|
"""
|
|
1636
|
+
def setOptions(self, verbose: int = 0, stepsize: float = 0.1, subsamples: int = 4, maxIters: int = 5000, p_connect: float = 0.5, collisionTolerance: float = 0.0001, useBroadCollisions: bool = True) -> RRT_PathFinder:
|
|
1637
|
+
"""
|
|
1638
|
+
set solver options
|
|
1639
|
+
"""
|
|
1633
1640
|
def setProblem(self, Configuration: Config) -> None:
|
|
1634
1641
|
...
|
|
1635
1642
|
def setStartGoal(self, starts: arr, goals: arr) -> None:
|
|
1636
1643
|
...
|
|
1637
1644
|
def solve(self, verbose: int = 1) -> SolverReturn:
|
|
1638
1645
|
...
|
|
1646
|
+
def view(self, pause: bool, message: str = None, play: bool = False) -> None:
|
|
1647
|
+
...
|
|
1639
1648
|
class ST:
|
|
1640
1649
|
"""
|
|
1641
1650
|
Members:
|
|
@@ -1939,6 +1948,10 @@ class Simulation:
|
|
|
1939
1948
|
...
|
|
1940
1949
|
def selectSensor(self, sensorName: str) -> ...:
|
|
1941
1950
|
...
|
|
1951
|
+
def setSimulateDepthNoise(self, _setSimulateDepthNoise: bool) -> None:
|
|
1952
|
+
"""
|
|
1953
|
+
specify (boolean) on whether to simulate noise
|
|
1954
|
+
"""
|
|
1942
1955
|
def setSplineRef(self, path: arr, times: arr, append: bool = True) -> None:
|
|
1943
1956
|
"""
|
|
1944
1957
|
set the spline reference to generate motion
|
robotic/_robotic.so
CHANGED
|
Binary file
|
robotic/include/rai/Core/array.h
CHANGED
|
@@ -335,6 +335,7 @@ template<class T> void operator+=(Array<T>& x, const T& y);
|
|
|
335
335
|
template<class T> void operator-=(Array<T>& x, const Array<T>& y);
|
|
336
336
|
template<class T> void operator-=(Array<T>& x, const T& y);
|
|
337
337
|
template<class T> void operator*=(Array<T>& x, const T& y);
|
|
338
|
+
template<class T> void operator/=(Array<T>& x, const T& y);
|
|
338
339
|
|
|
339
340
|
template<class T> Array<T> operator+(const Array<T>& y, const Array<T>& z) { Array<T> x(y); x+=z; return x; }
|
|
340
341
|
template<class T> Array<T> operator+(const Array<T>& y, T z) { Array<T> x(y); x+=z; return x; }
|
|
@@ -1944,15 +1944,9 @@ template<class T> void operator+=(Array<T>& x, const Array<T>& y) {
|
|
|
1944
1944
|
else x.J() = *y.jac;
|
|
1945
1945
|
}
|
|
1946
1946
|
}
|
|
1947
|
-
// CHECK_EQ(x.N, y.N, "update operator on different array dimensions (" <<x.N <<", " <<y.N <<")");
|
|
1948
|
-
// T* xp=x.p, *xstop=xp+x.N;
|
|
1949
|
-
// const T* yp=y.p;
|
|
1950
|
-
// for(; xp!=xstop; xp++, yp++) *xp += *yp;
|
|
1951
1947
|
}
|
|
1952
1948
|
template<class T> void operator+=(Array<T>& x, const T& y) {
|
|
1953
1949
|
UpdateOperator_MS(+=);
|
|
1954
|
-
// T* xp=x.p, *xstop=xp+x.N;
|
|
1955
|
-
// for(; xp!=xstop; xp++) *xp += y;
|
|
1956
1950
|
}
|
|
1957
1951
|
template<class T> void operator-=(Array<T>& x, const Array<T>& y) {
|
|
1958
1952
|
UpdateOperator_MM(-=);
|
|
@@ -1962,23 +1956,21 @@ template<class T> void operator-=(Array<T>& x, const Array<T>& y) {
|
|
|
1962
1956
|
else x.J() = -(*y.jac);
|
|
1963
1957
|
}
|
|
1964
1958
|
}
|
|
1965
|
-
// CHECK_EQ(x.N, y.N, "update operator on different array dimensions (" <<x.N <<", " <<y.N <<")");
|
|
1966
|
-
// T* xp=x.p, *xstop=xp+x.N;
|
|
1967
|
-
// const T* yp=y.p;
|
|
1968
|
-
// for(; xp!=xstop; xp++, yp++) *xp -= *yp;
|
|
1969
1959
|
}
|
|
1970
1960
|
template<class T> void operator-=(Array<T>& x, const T& y) {
|
|
1971
1961
|
UpdateOperator_MS(-=);
|
|
1972
|
-
// T* xp=x.p, *xstop=xp+x.N;
|
|
1973
|
-
// for(; xp!=xstop; xp++) *xp -= y;
|
|
1974
1962
|
}
|
|
1975
1963
|
template<class T> void operator*=(Array<T>& x, const T& y) {
|
|
1976
1964
|
if constexpr(std::is_same_v<T, double>){
|
|
1977
1965
|
if(x.jac) *x.jac *= y;
|
|
1978
1966
|
}
|
|
1979
1967
|
UpdateOperator_MS(*=);
|
|
1980
|
-
|
|
1981
|
-
|
|
1968
|
+
}
|
|
1969
|
+
template<class T> void operator/=(Array<T>& x, const T& y) {
|
|
1970
|
+
if constexpr(std::is_same_v<T, double>){
|
|
1971
|
+
if(x.jac) *x.jac /= y;
|
|
1972
|
+
}
|
|
1973
|
+
UpdateOperator_MS(/=);
|
|
1982
1974
|
}
|
|
1983
1975
|
|
|
1984
1976
|
#undef UpdateOperator_MM
|
|
@@ -140,7 +140,7 @@ struct Var_data : Var_base {
|
|
|
140
140
|
|
|
141
141
|
Var_data(const char* name=0) : Var_base(name), data() {} // default constructor for value always initializes, also primitive types 'bool' or 'int'
|
|
142
142
|
~Var_data() {
|
|
143
|
-
if(rwlock.isLocked()) {
|
|
143
|
+
if(rwlock.isLocked()) { cout << "can't destroy a variable when it is currently accessed!" <<endl; exit(1); }
|
|
144
144
|
}
|
|
145
145
|
};
|
|
146
146
|
|
robotic/include/rai/Core/util.h
CHANGED
robotic/include/rai/Geo/geo.h
CHANGED
|
@@ -244,8 +244,8 @@ struct Camera {
|
|
|
244
244
|
|
|
245
245
|
float heightAbs;
|
|
246
246
|
float focalLength;
|
|
247
|
-
float whRatio;
|
|
248
247
|
float zNear, zFar;
|
|
248
|
+
float width=640., height=480.;
|
|
249
249
|
|
|
250
250
|
Camera();
|
|
251
251
|
|
|
@@ -253,8 +253,8 @@ struct Camera {
|
|
|
253
253
|
void setHeightAngle(float a);
|
|
254
254
|
void setHeightAbs(float h);
|
|
255
255
|
void setZRange(float znear, float zfar);
|
|
256
|
-
void setWHRatio(float ratio);
|
|
257
256
|
void setFocalLength(float f);
|
|
257
|
+
void setWidthHeight(float w, float h);
|
|
258
258
|
void setPosition(const Vector& x);
|
|
259
259
|
void setKinect();
|
|
260
260
|
void setDefault();
|
|
@@ -274,12 +274,12 @@ struct Camera {
|
|
|
274
274
|
arr getInverseProjectionMatrix() const;
|
|
275
275
|
double glConvertToTrueDepth(double d) const;
|
|
276
276
|
double glConvertToLinearDepth(double d) const;
|
|
277
|
-
void project2PixelsAndTrueDepth(arr& x
|
|
278
|
-
void unproject_fromPixelsAndTrueDepth(arr& x
|
|
279
|
-
void unproject_fromPixelsAndGLDepth(arr& x
|
|
277
|
+
void project2PixelsAndTrueDepth(arr& x) const;
|
|
278
|
+
void unproject_fromPixelsAndTrueDepth(arr& x) const;
|
|
279
|
+
void unproject_fromPixelsAndGLDepth(arr& x) const;
|
|
280
280
|
|
|
281
|
-
arr getFxycxy(
|
|
282
|
-
arr getIntrinsicMatrix(
|
|
281
|
+
arr getFxycxy();
|
|
282
|
+
arr getIntrinsicMatrix() const;
|
|
283
283
|
|
|
284
284
|
//retired
|
|
285
285
|
void setCameraProjectionMatrix(const arr& P); //P is in standard convention -> computes fixedProjectionMatrix in OpenGL convention from this
|
|
@@ -75,15 +75,11 @@ struct PairCollision_CvxDecomp : PairCollision, NonCopyable {
|
|
|
75
75
|
|
|
76
76
|
//===========================================================================
|
|
77
77
|
|
|
78
|
-
struct PairCollision_PtPcl {
|
|
79
|
-
//OUTPUTS
|
|
80
|
-
arr y, J;
|
|
81
|
-
|
|
78
|
+
struct PairCollision_PtPcl : PairCollision, NonCopyable {
|
|
82
79
|
PairCollision_PtPcl(const arr& x, ANN& ann,
|
|
83
|
-
const rai::Transformation& t1,
|
|
84
|
-
const rai::Transformation& t2,
|
|
85
|
-
double rad1=0., double rad2=0
|
|
86
|
-
bool returnVector=false);
|
|
80
|
+
const rai::Transformation& t1,
|
|
81
|
+
const rai::Transformation& t2,
|
|
82
|
+
double rad1=0., double rad2=0.);
|
|
87
83
|
};
|
|
88
84
|
|
|
89
85
|
//===========================================================================
|
|
@@ -14,43 +14,50 @@
|
|
|
14
14
|
|
|
15
15
|
namespace rai {
|
|
16
16
|
|
|
17
|
+
struct DepthNoiseOptions {
|
|
18
|
+
RAI_PARAM("DepthNoise/", double, binocular_baseline, .05)
|
|
19
|
+
RAI_PARAM("DepthNoise/", int, depth_smoothing, 1)
|
|
20
|
+
RAI_PARAM("DepthNoise/", double, noise_all, .05)
|
|
21
|
+
RAI_PARAM("DepthNoise/", double, noise_wide, 4.)
|
|
22
|
+
RAI_PARAM("DepthNoise/", double, noise_local, .4)
|
|
23
|
+
RAI_PARAM("DepthNoise/", double, noise_pixel, .04)
|
|
24
|
+
};
|
|
25
|
+
|
|
17
26
|
struct CameraView : ConfigurationViewer {
|
|
18
27
|
|
|
19
|
-
/*!
|
|
20
|
-
struct
|
|
21
|
-
rai::
|
|
22
|
-
rai::Camera cam;
|
|
23
|
-
|
|
24
|
-
rai::Frame
|
|
25
|
-
Sensor() {}
|
|
26
|
-
rai::Transformation& pose() { return cam.X; }
|
|
27
|
-
arr getFxycxy() { return cam.getFxycxy(width, height); }
|
|
28
|
+
/*! a camera attached (and defined by the attributes of) a Frame */
|
|
29
|
+
struct CameraFrame {
|
|
30
|
+
rai::Frame& frame;
|
|
31
|
+
rai::Camera cam;
|
|
32
|
+
rai::Vector offset=0;
|
|
33
|
+
CameraFrame(rai::Frame& _frame) : frame(_frame) {}
|
|
28
34
|
};
|
|
29
35
|
|
|
30
36
|
//-- description of world configuration
|
|
31
|
-
rai::Array<
|
|
37
|
+
rai::Array<shared_ptr<CameraFrame>> cameras; //the list of sensors
|
|
32
38
|
|
|
33
39
|
enum RenderMode { all, seg, visuals };
|
|
34
40
|
|
|
35
41
|
//-- run parameter
|
|
36
|
-
|
|
42
|
+
shared_ptr<CameraFrame> currentCamera;
|
|
37
43
|
RenderMode renderMode=all;
|
|
38
44
|
byteA frameIDmap;
|
|
45
|
+
shared_ptr<DepthNoiseOptions> opt;
|
|
39
46
|
|
|
40
47
|
//-- evaluation outputs
|
|
41
48
|
CameraView(const rai::Configuration& _C, bool _offscreen=true);
|
|
42
49
|
~CameraView() {}
|
|
43
50
|
|
|
44
51
|
//-- loading the configuration: the meshes, the robot model, the tote, the sensors; all ends up in K
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
52
|
+
CameraFrame& setCamera(rai::Frame* frame, uint width, uint height, double focalLength=-1., double orthoAbsHeight=-1., const arr& zRange= {}, const char* backgroundImageFile=0);
|
|
53
|
+
CameraFrame& setCamera(rai::Frame* frame); //read everything from the frame attributes
|
|
54
|
+
CameraFrame& selectSensor(rai::Frame* frame); //set the OpenGL sensor
|
|
48
55
|
|
|
49
|
-
void computeImageAndDepth(byteA& image, floatA& depth);
|
|
56
|
+
void computeImageAndDepth(byteA& image, floatA& depth, bool _simulateDepthNoise=false);
|
|
50
57
|
byteA computeSegmentationImage();
|
|
51
58
|
uintA computeSegmentationID();
|
|
52
59
|
|
|
53
|
-
arr getFxycxy() { CHECK(
|
|
60
|
+
arr getFxycxy() { CHECK(currentCamera, "no sensor selected yet"); return currentCamera->cam.getFxycxy(); }
|
|
54
61
|
|
|
55
62
|
private:
|
|
56
63
|
void updateCamera();
|
|
@@ -58,25 +65,6 @@ struct CameraView : ConfigurationViewer {
|
|
|
58
65
|
|
|
59
66
|
//===========================================================================
|
|
60
67
|
|
|
61
|
-
|
|
62
|
-
Var<rai::Configuration> model;
|
|
63
|
-
|
|
64
|
-
//-- outputs
|
|
65
|
-
Var<byteA> color;
|
|
66
|
-
Var<floatA> depth;
|
|
67
|
-
|
|
68
|
-
//-- internal
|
|
69
|
-
CameraView V;
|
|
70
|
-
|
|
71
|
-
Sim_CameraView(Var<rai::Configuration>& _kin,
|
|
72
|
-
Var<byteA> _color,
|
|
73
|
-
Var<floatA> _depth,
|
|
74
|
-
double beatIntervalSec=-1., const char* _cameraFrameName=nullptr, bool _idColors=false, const byteA& _frameIDmap= {});
|
|
75
|
-
~Sim_CameraView();
|
|
76
|
-
|
|
77
|
-
void step();
|
|
78
|
-
|
|
79
|
-
arr getFxycxy();
|
|
80
|
-
};
|
|
68
|
+
void simulateDepthNoise(floatA& depth, const floatA& depth2, double offset, const arr& fxycxy, shared_ptr<DepthNoiseOptions> opt);
|
|
81
69
|
|
|
82
70
|
}
|
|
@@ -30,6 +30,7 @@ struct Simulation {
|
|
|
30
30
|
uint stepCount=0;
|
|
31
31
|
Engine engine;
|
|
32
32
|
Array<shared_ptr<SimulationImp>> imps; ///< list of (adversarial) imps doing things/perturbations/noise in addition to clean physics engine
|
|
33
|
+
bool simulateDepthNoise=false;
|
|
33
34
|
int verbose;
|
|
34
35
|
int writeData=0;
|
|
35
36
|
ofstream dataFile;
|
|
@@ -72,12 +73,13 @@ struct Simulation {
|
|
|
72
73
|
void getImageAndDepth(byteA& image, floatA& depth); ///< use this during stepping
|
|
73
74
|
void getSegmentation(byteA& segmentation);
|
|
74
75
|
CameraView& cameraview(); ///< use this if you want to initialize the sensor, etc
|
|
75
|
-
rai::CameraView::
|
|
76
|
+
rai::CameraView::CameraFrame& addSensor(const char* sensorName, uint width=640, uint height=360, double focalLength=-1., double orthoAbsHeight=-1., const arr& zRange= {}) {
|
|
76
77
|
rai::Frame *f = C.getFrame(sensorName);
|
|
77
78
|
CHECK(f, "a camera frame must exist");
|
|
78
|
-
return cameraview().
|
|
79
|
+
return cameraview().setCamera(f, width, height, focalLength, orthoAbsHeight, zRange);
|
|
79
80
|
}
|
|
80
|
-
rai::CameraView::
|
|
81
|
+
rai::CameraView::CameraFrame& selectSensor(const char* name) { return cameraview().selectSensor(C.getFrame(name)); }
|
|
82
|
+
void setSimulateDepthNoise(bool _simulateDepthNoise) { simulateDepthNoise=_simulateDepthNoise; }
|
|
81
83
|
byteA getScreenshot();
|
|
82
84
|
|
|
83
85
|
//== ground truth interface
|
|
@@ -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::
|
|
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::
|
|
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; }
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
|
|
11
11
|
#include "NLP.h"
|
|
12
12
|
|
|
13
|
+
namespace rai {
|
|
14
|
+
|
|
13
15
|
struct NLoptInterface {
|
|
14
16
|
shared_ptr<NLP> P;
|
|
15
17
|
arr x, phi_x, J_x;
|
|
@@ -28,3 +30,5 @@ struct NLoptInterface {
|
|
|
28
30
|
static double _g(const std::vector<double>& _x, std::vector<double>& _grad, void* f_data);
|
|
29
31
|
static double _h(const std::vector<double>& _x, std::vector<double>& _grad, void* f_data);
|
|
30
32
|
};
|
|
33
|
+
|
|
34
|
+
} //namespace
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#pragma once
|
|
2
2
|
|
|
3
3
|
#include "NLP.h"
|
|
4
|
+
#include "options.h"
|
|
4
5
|
#include "../Core/util.h"
|
|
5
6
|
|
|
6
7
|
/*
|
|
@@ -34,20 +35,23 @@ namespace rai {
|
|
|
34
35
|
|
|
35
36
|
struct EvolutionStrategy {
|
|
36
37
|
ScalarFunction f;
|
|
38
|
+
shared_ptr<OptOptions> opt;
|
|
37
39
|
arr x;
|
|
38
40
|
double f_x=1e10;
|
|
39
|
-
|
|
41
|
+
int evals=0, steps=0, rejectedSteps=0, tinySteps=0;
|
|
40
42
|
|
|
41
|
-
EvolutionStrategy(ScalarFunction _f): f(_f) {}
|
|
43
|
+
EvolutionStrategy(ScalarFunction _f, const arr& x_init, shared_ptr<OptOptions> _opt): f(_f), opt(_opt), x(x_init) {}
|
|
42
44
|
|
|
45
|
+
//virtuals that define a method
|
|
43
46
|
virtual arr generateNewSamples() = 0;
|
|
44
|
-
virtual void update(
|
|
47
|
+
virtual void update(arr& samples, const arr& values) = 0;
|
|
45
48
|
|
|
49
|
+
//generic stepping & looping
|
|
46
50
|
bool step();
|
|
47
|
-
|
|
48
51
|
shared_ptr<SolverReturn> solve();
|
|
49
52
|
|
|
50
|
-
|
|
53
|
+
//helper
|
|
54
|
+
arr select(const arr& samples, const arr& values, uint mu);
|
|
51
55
|
|
|
52
56
|
};
|
|
53
57
|
|
|
@@ -58,11 +62,11 @@ struct CMAES : EvolutionStrategy {
|
|
|
58
62
|
RAI_PARAM("CMA/", int, lambda, 20)
|
|
59
63
|
RAI_PARAM("CMA/", double, sigmaInit, .1)
|
|
60
64
|
|
|
61
|
-
CMAES(ScalarFunction f, const arr& x_init=
|
|
65
|
+
CMAES(ScalarFunction f, const arr& x_init, shared_ptr<OptOptions> opt = make_shared<OptOptions>());
|
|
62
66
|
~CMAES();
|
|
63
67
|
|
|
64
68
|
virtual arr generateNewSamples();
|
|
65
|
-
virtual void update(
|
|
69
|
+
virtual void update(arr& samples, const arr& values);
|
|
66
70
|
|
|
67
71
|
arr getBestEver();
|
|
68
72
|
arr getCurrentMean();
|
|
@@ -72,23 +76,39 @@ struct CMAES : EvolutionStrategy {
|
|
|
72
76
|
|
|
73
77
|
struct ES_mu_plus_lambda : EvolutionStrategy {
|
|
74
78
|
arr mean;
|
|
79
|
+
arr elite;
|
|
75
80
|
RAI_PARAM("ES/", double, sigma, .1)
|
|
81
|
+
RAI_PARAM("ES/", double, sigmaDecay, .001)
|
|
76
82
|
RAI_PARAM("ES/", uint, lambda, 20)
|
|
77
83
|
RAI_PARAM("ES/", uint, mu, 5)
|
|
78
84
|
|
|
79
|
-
ES_mu_plus_lambda(ScalarFunction f, const arr& x_init=
|
|
85
|
+
ES_mu_plus_lambda(ScalarFunction f, const arr& x_init, shared_ptr<OptOptions> opt = make_shared<OptOptions>())
|
|
86
|
+
: EvolutionStrategy(f, x_init, opt) { mean = x_init; }
|
|
87
|
+
|
|
88
|
+
virtual arr generateNewSamples();
|
|
89
|
+
|
|
90
|
+
virtual void update(arr& X, const arr& y);
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
//===========================================================================
|
|
80
94
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
95
|
+
struct GaussEDA : EvolutionStrategy {
|
|
96
|
+
arr mean;
|
|
97
|
+
arr cov;
|
|
98
|
+
arr elite;
|
|
99
|
+
RAI_PARAM("GaussEDA/", double, sigmaInit, .1)
|
|
100
|
+
RAI_PARAM("GaussEDA/", double, sigma2Min, .001)
|
|
101
|
+
RAI_PARAM("GaussEDA/", double, momentum, 1.)
|
|
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();
|
|
87
110
|
|
|
88
|
-
virtual void update(
|
|
89
|
-
arr Y = select(X, y, mu);
|
|
90
|
-
mean = ::mean(Y);
|
|
91
|
-
}
|
|
111
|
+
virtual void update(arr& X, const arr& y);
|
|
92
112
|
};
|
|
93
113
|
|
|
94
114
|
} //namespace
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
#pragma once
|
|
2
2
|
|
|
3
3
|
#include "NLP.h"
|
|
4
|
+
#include "options.h"
|
|
4
5
|
#include "../Core/util.h"
|
|
5
6
|
|
|
7
|
+
namespace rai {
|
|
8
|
+
|
|
6
9
|
struct LeastSquaredZeroOrder{
|
|
7
10
|
shared_ptr<NLP> P;
|
|
11
|
+
std::shared_ptr<OptOptions> opt;
|
|
8
12
|
bool hasLinTerms=false;
|
|
9
13
|
|
|
10
14
|
//-- parameters
|
|
@@ -12,6 +16,14 @@ struct LeastSquaredZeroOrder{
|
|
|
12
16
|
double alpha = .5;
|
|
13
17
|
RAI_PARAM("LSZO/", double, alpha_min, .001)
|
|
14
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/", int, maxIters, 500)
|
|
22
|
+
RAI_PARAM("LSZO/", double, dataRatio, 1.)
|
|
23
|
+
RAI_PARAM("LSZO/", bool, pruneData, false)
|
|
24
|
+
RAI_PARAM("LSZO/", bool, covariantNoise, false)
|
|
25
|
+
RAI_PARAM("LSZO/", double, stepInc, 1.5)
|
|
26
|
+
RAI_PARAM("LSZO/", double, stepDec, .5)
|
|
15
27
|
|
|
16
28
|
//-- state and data
|
|
17
29
|
arr x; ///< point where P was last evaluated
|
|
@@ -22,7 +34,7 @@ struct LeastSquaredZeroOrder{
|
|
|
22
34
|
|
|
23
35
|
uint steps=0, tinySteps=0, rejectedSteps=0;
|
|
24
36
|
|
|
25
|
-
LeastSquaredZeroOrder(shared_ptr<NLP> P, const arr& x_init=
|
|
37
|
+
LeastSquaredZeroOrder(shared_ptr<NLP> P, const arr& x_init, std::shared_ptr<OptOptions> _opt=make_shared<OptOptions>());
|
|
26
38
|
|
|
27
39
|
shared_ptr<SolverReturn> solve(){
|
|
28
40
|
while(!step()){}
|
|
@@ -43,3 +55,5 @@ struct LeastSquaredZeroOrder{
|
|
|
43
55
|
|
|
44
56
|
void updateJ_linReg(arr& J, const arr& Xraw, const arr& Y);
|
|
45
57
|
};
|
|
58
|
+
|
|
59
|
+
} //namespace
|
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
#pragma once
|
|
2
2
|
|
|
3
3
|
#include "NLP.h"
|
|
4
|
+
#include "options.h"
|
|
4
5
|
#include "../Core/util.h"
|
|
5
6
|
|
|
7
|
+
namespace rai {
|
|
8
|
+
|
|
6
9
|
struct NelderMead {
|
|
7
10
|
ScalarFunction f;
|
|
11
|
+
shared_ptr<OptOptions> opt;
|
|
8
12
|
arr x;
|
|
9
13
|
double f_x=0.;
|
|
10
14
|
|
|
11
15
|
//-- counters
|
|
12
16
|
uint steps=0, tinySteps=0, maxSteps=300;
|
|
13
17
|
|
|
14
|
-
NelderMead(ScalarFunction _f, const arr& x_init={});
|
|
18
|
+
NelderMead(ScalarFunction _f, const arr& x_init={}, shared_ptr<OptOptions> opt = make_shared<OptOptions>());
|
|
15
19
|
|
|
16
20
|
shared_ptr<SolverReturn> solve();
|
|
17
21
|
};
|
|
22
|
+
|
|
23
|
+
} //namespace
|
|
@@ -17,7 +17,8 @@ enum OptMethod { M_none=0,
|
|
|
17
17
|
M_AugmentedLag, M_LogBarrier, M_slackGN_logBarrier, M_SquaredPenalty, M_singleSquaredPenalty,
|
|
18
18
|
M_slackGN,
|
|
19
19
|
M_NLopt, M_Ipopt, M_slackGN_Ipopt, M_Ceres,
|
|
20
|
-
M_LSZO, M_greedy, M_NelderMead,
|
|
20
|
+
M_LSZO, M_greedy, M_NelderMead,
|
|
21
|
+
M_CMA, M_ES };
|
|
21
22
|
|
|
22
23
|
|
|
23
24
|
struct OptOptions {
|
|
@@ -46,7 +47,7 @@ struct OptOptions {
|
|
|
46
47
|
RAI_PARAM("opt/", double, interiorPadding, 1e-2)
|
|
47
48
|
RAI_PARAM("opt/", bool, boundedNewton, true)
|
|
48
49
|
RAI_PARAM_ENUM("opt/", OptMethod, method, M_AugmentedLag)
|
|
49
|
-
RAI_PARAM("opt/",
|
|
50
|
+
RAI_PARAM("opt/", double, finiteDifference, -1.)
|
|
50
51
|
};
|
|
51
52
|
|
|
52
53
|
std::shared_ptr<OptOptions> globalOptOptions();
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
|
|
14
14
|
struct NLP_FiniteDifference : NLP {
|
|
15
15
|
std::shared_ptr<NLP> P;
|
|
16
|
-
|
|
16
|
+
double eps;
|
|
17
|
+
NLP_FiniteDifference(std::shared_ptr<NLP> _P, double eps=1e-6) : P(_P), eps(eps) { copySignature(*P); }
|
|
17
18
|
virtual void evaluate(arr& phi, arr& J, const arr& x0);
|
|
18
19
|
virtual void report(ostream& os, int verbose, const char *msg=0){ os <<"FiniteDifference version of: "; P->report(os, verbose, msg); }
|
|
19
20
|
};
|
|
@@ -42,7 +42,7 @@ struct TreeSearchNode {
|
|
|
42
42
|
|
|
43
43
|
//I/O
|
|
44
44
|
virtual void write(std::ostream& os) const { os <<name; }
|
|
45
|
-
virtual void report(std::ostream& os, int verbose) const { std::
|
|
45
|
+
virtual void report(std::ostream& os, int verbose) const { std::cout <<"NOT OVERLOADED!" <<std::endl; }
|
|
46
46
|
virtual void data(Graph& g) const {}
|
|
47
47
|
};
|
|
48
48
|
inline std::ostream& operator<<(std::ostream& os, const TreeSearchNode& D) { D.write(os); return os; }
|
robotic/librai.so
CHANGED
|
Binary file
|
robotic/meshTool
CHANGED
|
Binary file
|
robotic/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = '0.3.4.
|
|
1
|
+
__version__ = '0.3.4.dev4'
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
robotic/DataGen.pyi,sha256=qDQjATpbIgFvOrWk7F3ZTVbOuyXjT5nwHxrsRfGxWRU,3716
|
|
2
2
|
robotic/__init__.py,sha256=h8LG-Fle7lAtkJ-ZE1u5kWTyuayhugNxtFX9T_JKQGY,476
|
|
3
|
-
robotic/_robotic.pyi,sha256=
|
|
4
|
-
robotic/_robotic.so,sha256=
|
|
3
|
+
robotic/_robotic.pyi,sha256=XK-lJzDjXVuZ0vuCDREkfpMFOrtXj_u8Uj_mBuB4rxE,78841
|
|
4
|
+
robotic/_robotic.so,sha256=DfjGl6J4womKAoFuG3BNiqtImPIArF6zUM5BG1DYAKE,1283912
|
|
5
5
|
robotic/algo.pyi,sha256=hAN3ZPvf4VnhcdoRP-EecAwUge_JMxovJ9lAOIgWX2Q,730
|
|
6
|
-
robotic/librai.so,sha256=
|
|
6
|
+
robotic/librai.so,sha256=pZST3L6Y8KEXVOB83bppWVOzpl9FA8eiWDM7-YSY9KA,39026368
|
|
7
7
|
robotic/manipulation.py,sha256=0B7UzU9J7b4f19thz67TbvknoncxffQEMHSBB6ez1Jg,22279
|
|
8
|
-
robotic/meshTool,sha256=
|
|
8
|
+
robotic/meshTool,sha256=W_0nI2SG9N-qnmSiHRb6MBkEbpWOUXgtaY8q-qd1fcg,56288
|
|
9
9
|
robotic/mujoco-import.py,sha256=8eC8ldlFwnYQfqII3FVdWEQ7zd1PkSdAF-oyryIQtkY,231
|
|
10
|
-
robotic/nlp.py,sha256=n9_hOj3i707DdL_r49Yd2eWyjsSOahW8DmJrEhQlNFw,3200
|
|
11
10
|
robotic/render.py,sha256=OE1dvyWHD7Oyzk4wlhXZ7m3v3xxa3zAL5_LCV1RgJXk,4662
|
|
12
11
|
robotic/ry-bot,sha256=nd2yWqaDsFbwAmr7ySdOjq06ek0E1FMHTxPRO-7e2Q8,2294
|
|
13
12
|
robotic/ry-h5info,sha256=zfGJiyYJIVw1QWWQErJIvaKA1oVJuKwllafWRSoZFFk,463
|
|
@@ -17,7 +16,7 @@ robotic/ry-test,sha256=MYMwRyOwCDxsgUwSPj9etNRSKJWvc6jwVWUJNkxlw-U,979
|
|
|
17
16
|
robotic/ry-urdfConvert.py,sha256=8Efnq3PU202rrZrVEZiGwzFOJdvrLjTJ2q-gnY6-tiU,2556
|
|
18
17
|
robotic/ry-view,sha256=T1Omn1QS7cNAtjQhBjMJTNz7aW5FgoOf9vBIfW0mFME,613
|
|
19
18
|
robotic/test.pyi,sha256=vVxwRSerjUG4bpB7pIhof7ZatrBqwg3Bj5voywa-YTI,917
|
|
20
|
-
robotic/version.py,sha256=
|
|
19
|
+
robotic/version.py,sha256=bLx8Ulolu0qyL2Wr9lJU1sAymBIfByepCUvO26mMVp4,27
|
|
21
20
|
robotic/include/rai/Algo/MLcourse.h,sha256=TGkAJWC5ollGfPw0-gcYL0TZeDJiHtWFzkHSMK8_lqU,1828
|
|
22
21
|
robotic/include/rai/Algo/RidgeRegression.h,sha256=VXiv6-xr3j--CN7DJTzUg9Xb49zV9FZ9dwzxP1CmcPM,3730
|
|
23
22
|
robotic/include/rai/Algo/SplineCtrlFeed.h,sha256=yILBoUh9Ce0YtzGVZeAKmdUqsf0xeCGjXGC8bXNzZ3o,3339
|
|
@@ -50,14 +49,14 @@ robotic/include/rai/Control/WaypointMPC.h,sha256=Pa36-K1yMxszD9EFuLfLayaOe9pTK8c
|
|
|
50
49
|
robotic/include/rai/Control/control.h,sha256=_dJefR6WzvdQMaJIYIBuYP8NwoKgNeG4owhQWPxWXzo,765
|
|
51
50
|
robotic/include/rai/Control/ctrlMsg.h,sha256=uGuwAaKM1UsQW3hTNv4AihW99MJMuow4cxa9-AU9AmA,1121
|
|
52
51
|
robotic/include/rai/Control/timingOpt.h,sha256=Ne_IH8QuFCID0Sy88LS5i3qkp1nL1FbIgREqSjRctz0,2045
|
|
53
|
-
robotic/include/rai/Core/array.h,sha256=
|
|
54
|
-
robotic/include/rai/Core/array.ipp,sha256=
|
|
52
|
+
robotic/include/rai/Core/array.h,sha256=Shyr07ekAzustkdE76wuOXJUduGtigYfcoNPNqogWOY,26889
|
|
53
|
+
robotic/include/rai/Core/array.ipp,sha256=Ny13iTLc3-kT-Ll1k6iKl2coWeMPpDemDLqCQqPQuLI,62968
|
|
55
54
|
robotic/include/rai/Core/arrayDouble.h,sha256=hkDMhYu7rxWkczdhCh7Zh1h7_bLN8yFkgd6cy8t-11g,29467
|
|
56
|
-
robotic/include/rai/Core/defines.h,sha256=
|
|
55
|
+
robotic/include/rai/Core/defines.h,sha256=2POkrvkqqwX9ZZBEEgn-cZrnGBI6PORZiobujdFF39o,6877
|
|
57
56
|
robotic/include/rai/Core/graph.h,sha256=vV4Cu8wCTz3zQZPK_a1xKVjbWGNhX4nuEGZ2vq6zhCE,20373
|
|
58
57
|
robotic/include/rai/Core/h5.h,sha256=cfs8cew5QYpOxbWFZHV9TXVh5_dEJdFF1-aGZVR54EY,1162
|
|
59
|
-
robotic/include/rai/Core/thread.h,sha256=
|
|
60
|
-
robotic/include/rai/Core/util.h,sha256=
|
|
58
|
+
robotic/include/rai/Core/thread.h,sha256=iYk7_OTdOJFazCqoW6tpcdWe1UKFQrbGqM6DwZuTBmI,18303
|
|
59
|
+
robotic/include/rai/Core/util.h,sha256=Wpv_lSPeh7IsMJgkSHHQdYkLmLPIJbg6F6L4H1KU1yU,18914
|
|
61
60
|
robotic/include/rai/Core/util.ipp,sha256=soCVdpzWTpLL9i6rilFPNGozHZP40yhkmuXul7gHC7o,2157
|
|
62
61
|
robotic/include/rai/Core/lapack/blaswrap.h,sha256=jl8W6GwBGMiU-ND9ILeKqWlIvryw7AsIydPUCQGT_ew,3750
|
|
63
62
|
robotic/include/rai/Core/lapack/cblas.h,sha256=4bSmMzZ4idIPlmcwjw5HuwY1cs5RU73ZwmfydSpaBdk,32367
|
|
@@ -66,11 +65,11 @@ robotic/include/rai/Core/lapack/lapacke.h,sha256=cpP6MEjkLGyhS8mV6ysRlTVeUam6f8z
|
|
|
66
65
|
robotic/include/rai/DataGen/rndStableConfigs.h,sha256=RdAD1kDsKic7WwBvLtFyIVnGKdtGqhxekBKjoeeUd40,403
|
|
67
66
|
robotic/include/rai/DataGen/shapenetGrasps.h,sha256=VA7keWDLfxTj4XvevzV7h1ApJsgCxPnKm-LhOXPLDZY,1618
|
|
68
67
|
robotic/include/rai/Geo/depth2PointCloud.h,sha256=0mXJnTk0sMB--KDE9CO_2gKgGw4gHXUe7xg6DcROhvk,1168
|
|
69
|
-
robotic/include/rai/Geo/geo.h,sha256=
|
|
68
|
+
robotic/include/rai/Geo/geo.h,sha256=NA4_s_4TrXaYLoStH36eZy9yZexFdvjNffnsr_xaeQY,14825
|
|
70
69
|
robotic/include/rai/Geo/i_assimp.h,sha256=2Jg7v2GZ83nz4kkgPLzbSWTIBmL9nZg-LhMlWcjiF_o,1055
|
|
71
70
|
robotic/include/rai/Geo/i_fcl.h,sha256=d89JFW3WKI64gOdQSGs6uFdE7NcMavNg89BMHhzMDac,984
|
|
72
71
|
robotic/include/rai/Geo/mesh.h,sha256=wGT463J0LW_LsJm7lFoU-INqmcro5_hj3Q_jXRI3QrM,6873
|
|
73
|
-
robotic/include/rai/Geo/pairCollision.h,sha256=
|
|
72
|
+
robotic/include/rai/Geo/pairCollision.h,sha256=SnXp_vdiiFVan2OxgyPZrXpNKCO3_R8EHX8bfP9zkyo,4434
|
|
74
73
|
robotic/include/rai/Geo/qhull.h,sha256=dRAAHIdvujPPW1fXW4hXMjgixpBDajDg-y_OX1JMi_0,1890
|
|
75
74
|
robotic/include/rai/Geo/signedDistanceFunctions.h,sha256=mM4oi6ai1bRSmFrZkBa40mqwjpVvfV193jMkAuN0xh4,4815
|
|
76
75
|
robotic/include/rai/Geo/stbImage.h,sha256=R5MRPs3KLL-GOipzAN_jdV-pdlBCTkUFaA5LnYEIElw,100
|
|
@@ -112,7 +111,7 @@ robotic/include/rai/Kin/F_geometrics.h,sha256=2yPFycgcmZjXLezxoRL_aaetrZusDgtGyx
|
|
|
112
111
|
robotic/include/rai/Kin/F_operators.h,sha256=Nxdk1dPSoN7lW0A5Ns-BSJ_YXFft4iZi9RDOmVn3BJ0,1608
|
|
113
112
|
robotic/include/rai/Kin/F_pose.h,sha256=QlZnpS4ZTNFBZlH-lpe6sTt2gdbxbjsZTHPqk0T_4AI,5252
|
|
114
113
|
robotic/include/rai/Kin/F_qFeatures.h,sha256=x4cfFGaVBQSmj9ZetcC25qiGxnvfNMPsWh9zbPa5owE,2212
|
|
115
|
-
robotic/include/rai/Kin/cameraview.h,sha256=
|
|
114
|
+
robotic/include/rai/Kin/cameraview.h,sha256=mcHUKhQqrl5lZYh8JQ_3S-3HaiAGuHruWiNViymx10g,2414
|
|
116
115
|
robotic/include/rai/Kin/dof_direction.h,sha256=9tio7VXxXAv-ZAxA6QskjD5rMH2LHU4hIGAG6TC0RaY,831
|
|
117
116
|
robotic/include/rai/Kin/dof_forceExchange.h,sha256=LcqbyfFYI2CyNoiJlY1WxkXRgsMfSmrV3PuynG9kdCA,1952
|
|
118
117
|
robotic/include/rai/Kin/dof_particles.h,sha256=PboLndC5a5extUKAfUPAIsJEGTTs6_ACDgnLrei2s8g,790
|
|
@@ -126,7 +125,7 @@ robotic/include/rai/Kin/i_Ode.h,sha256=zwB8Le1WMGRkQBc9bssndJICkjO1lZ_y1aZKCwP4c
|
|
|
126
125
|
robotic/include/rai/Kin/i_Physx.h,sha256=CxsmnWHQMgJBbhA5iajLpOjxpCkd9243tlVyYkNRgOM,1950
|
|
127
126
|
robotic/include/rai/Kin/kin.h,sha256=mzHgBV-j46PstUXzXsvVg_b64Q0jUNNk3bPfbnH7Vag,16120
|
|
128
127
|
robotic/include/rai/Kin/proxy.h,sha256=yn19c-lrt6Fv8AE76ex_UObEFaNxMhItukv-KQgXZN8,1420
|
|
129
|
-
robotic/include/rai/Kin/simulation.h,sha256=
|
|
128
|
+
robotic/include/rai/Kin/simulation.h,sha256=IYPnYDCWPQUIDivoOWXX8BqQaEf3nbadM3dKyCdoWbg,5653
|
|
130
129
|
robotic/include/rai/Kin/viewer.h,sha256=XhfZ3QUYdCuye3NnCwPe2XnoJAqnf9RCtMAZLsc3fd4,2432
|
|
131
130
|
robotic/include/rai/LGP/LGP_SkeletonTool.h,sha256=T4lXAUxY2QFo_ETZEm7RqRzfmU6NAHdVcow8qj_8-9Y,3240
|
|
132
131
|
robotic/include/rai/LGP/LGP_TAMP_Abstraction.h,sha256=EKbyNFgro7Xg5uueo6bXNrNSBTFeQUS1swiy9izQiXc,1492
|
|
@@ -140,7 +139,7 @@ robotic/include/rai/LGP/NLP_Descriptor.h,sha256=1XJ-Wzvf5kh6IdRmhwG4QIDW5D7N9fVq
|
|
|
140
139
|
robotic/include/rai/LGP/initFol.h,sha256=m67VqzKUQzMN0kBFL0lWACu0ls7eYj8ExyXVFjuLtDA,507
|
|
141
140
|
robotic/include/rai/Logic/fol.h,sha256=ubWsZacmrRPGeDPKQVGKDoGC_4GxYGdVLJ0K3a3eZu0,3598
|
|
142
141
|
robotic/include/rai/Logic/folWorld.h,sha256=XpqTWOIvZbKlS_vsJkXOexrhjfy3_iywebFezJamhHA,6072
|
|
143
|
-
robotic/include/rai/Logic/treeSearchDomain.h,sha256=
|
|
142
|
+
robotic/include/rai/Logic/treeSearchDomain.h,sha256=ORUzTM0IhRSQ7z3cJh9w7m24-y-ZGLpsCEALzb8F3tU,3882
|
|
144
143
|
robotic/include/rai/Optim/BayesOpt.h,sha256=bDSXXVV_-szB-6SeT9afodVi8DuQfdk6-Er2UFlgoN0,1276
|
|
145
144
|
robotic/include/rai/Optim/GlobalIterativeNewton.h,sha256=dcTblUANjZx82zFugK9ItKuo69Llw8G6lvaMSzLhwHA,867
|
|
146
145
|
robotic/include/rai/Optim/NLP.h,sha256=jVLFJXz59FZDPD7HHmI36fsECZG8mUqZkzLu94_iFF8,8737
|
|
@@ -151,20 +150,20 @@ robotic/include/rai/Optim/NLP_Solver.h,sha256=_9uwj61sobPl5-Q8bpxz4Wb6i5Q6nctfFs
|
|
|
151
150
|
robotic/include/rai/Optim/constrained.h,sha256=VdtrNywvRiDvfb3_KICQnnkE54EuadV0y2a1kuXM6eA,1522
|
|
152
151
|
robotic/include/rai/Optim/i_Ceres.h,sha256=kQbuKAfvOFIPcGWh2laGHyRsSf0A8mggVUGonq3JaHU,946
|
|
153
152
|
robotic/include/rai/Optim/i_Ipopt.h,sha256=1v147tZVY3MuNMRLaFFWxKC7fyNP5-59WJzKoVv8BsY,516
|
|
154
|
-
robotic/include/rai/Optim/i_NLopt.h,sha256=
|
|
153
|
+
robotic/include/rai/Optim/i_NLopt.h,sha256=GWtOe8PJ2GtB2bnCZcPXzxFI127b8FXjv_msWLzVZaE,1002
|
|
155
154
|
robotic/include/rai/Optim/lagrangian.h,sha256=KaORGcnP3je7AiF_kzNe9nYGlCfwVt-exTMiehmJugo,2532
|
|
156
|
-
robotic/include/rai/Optim/m_EvoStrategies.h,sha256=
|
|
155
|
+
robotic/include/rai/Optim/m_EvoStrategies.h,sha256=CgNQbWpsP0OW6g9Q5TO6WttC1X76mWLh8muPfJiBrwQ,3339
|
|
157
156
|
robotic/include/rai/Optim/m_Gradient.h,sha256=u5e6fsPd54qRvQwvbHeFjj-qLij_SlP6BlR0eEKVeFA,1743
|
|
158
157
|
robotic/include/rai/Optim/m_LBFGS.h,sha256=EkKO7ws6M0cRB2zGsbxtU1meyfAvJw-BlCrY1bijZaM,311
|
|
159
|
-
robotic/include/rai/Optim/m_LeastSquaresZeroOrder.h,sha256=
|
|
158
|
+
robotic/include/rai/Optim/m_LeastSquaresZeroOrder.h,sha256=_64u-BQMU6D939ilkglnCj4CgOIBswZhSd0yRYgJ7XE,1597
|
|
160
159
|
robotic/include/rai/Optim/m_LocalGreedy.h,sha256=wfTFZl2C7qxCV6J0oxsRiHN9wBF2sOJLGe11ct8lQlo,608
|
|
161
|
-
robotic/include/rai/Optim/m_NelderMead.h,sha256
|
|
160
|
+
robotic/include/rai/Optim/m_NelderMead.h,sha256=-RGRwr444FjECny_PGLf1Cl604yismZGCZ1FSndRacE,419
|
|
162
161
|
robotic/include/rai/Optim/m_Newton.h,sha256=uHsS8EDATlm11CGo84BD0ruo3JhXIP7afiY2rvwBOSg,1162
|
|
163
162
|
robotic/include/rai/Optim/m_SlackGaussNewton.h,sha256=C9GqyHzcseIY2xUMN4QmymOLtWjJcNmbhS5JJMiAPao,1055
|
|
164
|
-
robotic/include/rai/Optim/options.h,sha256=
|
|
163
|
+
robotic/include/rai/Optim/options.h,sha256=GulPzyhIyrV3TD6i34_JbJbtSPAt9f6zRuqGzUQmjZg,1968
|
|
165
164
|
robotic/include/rai/Optim/primalDual.h,sha256=Ku91MisgpNyRv6W7UPV4d5Q2Gjfwefqam7eeFsxITUU,1309
|
|
166
165
|
robotic/include/rai/Optim/testProblems_Opt.h,sha256=6OED5_nsjTn-MiWy8kVzTJXRxR5bG2WZ_ZvZei8QXec,6657
|
|
167
|
-
robotic/include/rai/Optim/utils.h,sha256=
|
|
166
|
+
robotic/include/rai/Optim/utils.h,sha256=DYWZ34FGL1Cs_xbJyn6vFzPh3mImT7CIm8QMgk4Y99k,2043
|
|
168
167
|
robotic/include/rai/Optim/CMA/boundary_transformation.h,sha256=Ylu2ZX14fHqpJdKPbIZwR_ttfazgMv8nLJ0l0vvgvRA,3841
|
|
169
168
|
robotic/include/rai/Optim/CMA/cmaes.h,sha256=EphfakrvvJOVgfBj0I9-hJuBV3zdCLmzEi_FqDnQh1I,4588
|
|
170
169
|
robotic/include/rai/Optim/CMA/cmaes_interface.h,sha256=ntBGw2nlUi4bx0ZtW7qzbhwccdE0x8aZBFZkoqIVEn8,2743
|
|
@@ -192,7 +191,7 @@ robotic/include/rai/Perception/surfels.h,sha256=OblVWjI_bEpQwqcANJ8cHYvah4BraYmL
|
|
|
192
191
|
robotic/include/rai/Perception/videoEncoder.h,sha256=TWphAWKPuvwwM6kNSfbEv57w9_LzZSbx-zkovfPVGA0,1823
|
|
193
192
|
robotic/include/rai/Search/AStar.h,sha256=qXZybtUHusQUjmA2xYCvKtLpe8Saq73klpnBuz1plZc,1209
|
|
194
193
|
robotic/include/rai/Search/ComputeNode.h,sha256=JcUy-8fmMsFbluSriDOh9FgLrJhaC4ggoiQwQa-1IZ0,3420
|
|
195
|
-
robotic/include/rai/Search/TreeSearchNode.h,sha256=
|
|
194
|
+
robotic/include/rai/Search/TreeSearchNode.h,sha256=13aF424b9MAcFNrDgNasWOthnp19zgJDaDo4lKDXbcY,1774
|
|
196
195
|
robotic/include/rai/ry/py-Config.h,sha256=fk-TJMXqY6b9UYk3gYC8pW_BkbUr-D-PtkQ--96zxoc,644
|
|
197
196
|
robotic/include/rai/ry/py-DataGen.h,sha256=mZHIv7PdR9_QBDKy0ONqHKQ70sr89dpgfKlO4UMByD8,434
|
|
198
197
|
robotic/include/rai/ry/py-Feature.h,sha256=t8Tyf1PJ4bkyCRC_mKF6JTallco8YRAX0PTtkid7Vws,434
|
|
@@ -373,15 +372,15 @@ robotic/src/meshlabFilters.mlx,sha256=SCIiIk7XZusvKEKY62pHSem_R3TcMUP8BFaLTVUcnE
|
|
|
373
372
|
robotic/src/mujoco_io.py,sha256=drLNE4yo30hpOY01-AsuCWKLvNoG5w2YDSzR_rlyfz0,9474
|
|
374
373
|
robotic/src/urdf_io.py,sha256=bbPcJWS9rnYk8CWgEZTmx1XJRBIDrfwgCj-S_RFxl9U,8800
|
|
375
374
|
robotic/src/yaml_helper.py,sha256=Jf9QaKSNQrPkUPqd5FUDv7_h0wDlGXrhCdMwu6y-Nh0,925
|
|
376
|
-
robotic-0.3.4.
|
|
377
|
-
robotic-0.3.4.
|
|
378
|
-
robotic-0.3.4.
|
|
379
|
-
robotic-0.3.4.
|
|
380
|
-
robotic-0.3.4.
|
|
381
|
-
robotic-0.3.4.
|
|
382
|
-
robotic-0.3.4.
|
|
383
|
-
robotic-0.3.4.
|
|
384
|
-
robotic-0.3.4.
|
|
385
|
-
robotic-0.3.4.
|
|
386
|
-
robotic-0.3.4.
|
|
387
|
-
robotic-0.3.4.
|
|
375
|
+
robotic-0.3.4.dev4.data/scripts/ry-bot,sha256=LBNbbQeNNNd_tupI5463Xe-RKSD6xy4HGTbJloisCGk,2280
|
|
376
|
+
robotic-0.3.4.dev4.data/scripts/ry-h5info,sha256=6orNP37WPoobKup0PcLXQvbiCVWqeRR_JQyMH1iXHJk,449
|
|
377
|
+
robotic-0.3.4.dev4.data/scripts/ry-info,sha256=fL5QXJL4Xx-Q42L2C29HHbj1XsmWdWiKIv9rVfc5sm4,425
|
|
378
|
+
robotic-0.3.4.dev4.data/scripts/ry-meshTool,sha256=h4f4wFPNaey3ziz870SrEvy6SsQSL-ZnR_cH3UuAZxE,101
|
|
379
|
+
robotic-0.3.4.dev4.data/scripts/ry-test,sha256=YTCSIuTA4JYk7j7TAr-t7IIp5g6hdLRlTPxJZBxQVpk,965
|
|
380
|
+
robotic-0.3.4.dev4.data/scripts/ry-urdfConvert.py,sha256=762MIDmAhdCCj55QftY7wsy9gOEs-TDEWcRPt5dECyc,2542
|
|
381
|
+
robotic-0.3.4.dev4.data/scripts/ry-view,sha256=_GjUbVS2X3AWnlXqIHwU5dofLmUKA2-NUPySgS-QJNI,599
|
|
382
|
+
robotic-0.3.4.dev4.dist-info/LICENSE,sha256=oT-pAsUSXiuMq2_3omR87-GFBeBnegQYixH4Bm_7wag,1071
|
|
383
|
+
robotic-0.3.4.dev4.dist-info/METADATA,sha256=eQJjL9Vg8vgCI8AKWRnkma0UJ1ejy3EuDmgXEJBQBcM,6512
|
|
384
|
+
robotic-0.3.4.dev4.dist-info/WHEEL,sha256=rxKmMK2tk-0XikPyvYWdvWiQiwwfnpvkbvkHpHVHavU,102
|
|
385
|
+
robotic-0.3.4.dev4.dist-info/top_level.txt,sha256=x5A4haAZ18y9FpO1IhXSVJ2TFdhVAgT5JMkejHUg_9U,8
|
|
386
|
+
robotic-0.3.4.dev4.dist-info/RECORD,,
|
robotic/nlp.py
DELETED
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import numpy as np
|
|
2
|
-
|
|
3
|
-
class OT():
|
|
4
|
-
f = 0
|
|
5
|
-
sos = 1
|
|
6
|
-
ineq = 2
|
|
7
|
-
eq = 3
|
|
8
|
-
|
|
9
|
-
class NLP():
|
|
10
|
-
"""
|
|
11
|
-
Non-Linear Mathematical Program
|
|
12
|
-
|
|
13
|
-
min_x 1^T phi_f(x) + phi_sos(x)^T phi_sos(x)
|
|
14
|
-
s.t. phi_eq(x) = 0
|
|
15
|
-
phi_ineq(x) <= 0
|
|
16
|
-
B[0] <= x <= B[1]
|
|
17
|
-
|
|
18
|
-
where:
|
|
19
|
-
x is a continous variable, in vector space R^n
|
|
20
|
-
phi_f is a vector of cost terms
|
|
21
|
-
phi_sos is a vector of least cost terms
|
|
22
|
-
phi_eq is a vector of equality constraints
|
|
23
|
-
phi_ineq is a vector of inequality constraints
|
|
24
|
-
B[0] and B[1] in R^n are, respectively, the lower and upper box bounds
|
|
25
|
-
"""
|
|
26
|
-
|
|
27
|
-
def __init__(self, *args, **kwargs):
|
|
28
|
-
pass
|
|
29
|
-
|
|
30
|
-
def evaluate(self, x):
|
|
31
|
-
"""
|
|
32
|
-
query the NLP at a point x; returns the tuple (phi,J), which is
|
|
33
|
-
the feature vector and its Jacobian; features define cost terms,
|
|
34
|
-
sum-of-square (sos) terms, inequalities, and equalities depending
|
|
35
|
-
on 'getFeatureTypes'.
|
|
36
|
-
|
|
37
|
-
If the returned Jacobian has 3 columns and #rows non-equal to
|
|
38
|
-
dim(phi) it should be interpreted by solvers as sparse in
|
|
39
|
-
triplet format; the C++ solvers exploit such sparse Jacobians,
|
|
40
|
-
e.g., to efficiently compute Gauss-Newton steps.
|
|
41
|
-
|
|
42
|
-
Parameters
|
|
43
|
-
------
|
|
44
|
-
x: np.array, 1-D
|
|
45
|
-
|
|
46
|
-
Returns
|
|
47
|
-
------
|
|
48
|
-
phi: np.array 1-D
|
|
49
|
-
J: np.array 2-D. J[i,j] is derivative of feature i w.r.t variable j, potentially sparse
|
|
50
|
-
"""
|
|
51
|
-
raise NotImplementedError()
|
|
52
|
-
|
|
53
|
-
def getDimension(self):
|
|
54
|
-
"""
|
|
55
|
-
Returns
|
|
56
|
-
-----
|
|
57
|
-
output: dimensionality of x
|
|
58
|
-
"""
|
|
59
|
-
raise NotImplementedError()
|
|
60
|
-
|
|
61
|
-
def getFeatureTypes(self):
|
|
62
|
-
"""
|
|
63
|
-
Returns
|
|
64
|
-
-----
|
|
65
|
-
output: list of feature Types
|
|
66
|
-
"""
|
|
67
|
-
return NotImplementedError()
|
|
68
|
-
|
|
69
|
-
def getBounds(self):
|
|
70
|
-
"""
|
|
71
|
-
returns 2-times-n array, where n is the dimensionality of x
|
|
72
|
-
B[0] is the lower and B[1] the upper bounds, so that B[0] <= x <= B[1]
|
|
73
|
-
|
|
74
|
-
Returns
|
|
75
|
-
------
|
|
76
|
-
B: np.array 2D (2-times-n)
|
|
77
|
-
"""
|
|
78
|
-
n = self.getDimension()
|
|
79
|
-
return np.tile([[-1.], [+1.]], (1,n))
|
|
80
|
-
|
|
81
|
-
def getFHessian(self, x):
|
|
82
|
-
"""
|
|
83
|
-
Optionally returns a Hessian of the sum of all phi_f objectives
|
|
84
|
-
The Hessian is by default approximated Gauss-Newton w.r.t. the phi_sos objectives; this
|
|
85
|
-
method allows to return an explicit Hessian also for phi_f objectives that is added to the
|
|
86
|
-
Gauss-Newton of phi_sos objectives. Needs to be sparse if $J$ is sparse. Default: empty array (zero).
|
|
87
|
-
|
|
88
|
-
Returns
|
|
89
|
-
-----
|
|
90
|
-
Hessian: np.array 2D, potentially sparse
|
|
91
|
-
"""
|
|
92
|
-
return []
|
|
93
|
-
|
|
94
|
-
def getInitializationSample(self):
|
|
95
|
-
"""
|
|
96
|
-
returns a sample to initialize an optimization, not necessarily feasible. Default: uniform within bounds
|
|
97
|
-
|
|
98
|
-
Returns
|
|
99
|
-
-----
|
|
100
|
-
x: np.array 1-D
|
|
101
|
-
"""
|
|
102
|
-
bounds = self.getBounds()
|
|
103
|
-
return np.random.uniform(low=bounds[0,:], high=bounds[1,:])
|
|
104
|
-
|
|
105
|
-
def report(self, verbose):
|
|
106
|
-
"""
|
|
107
|
-
displays semantic information on the last query. Default: empty string
|
|
108
|
-
|
|
109
|
-
Returns
|
|
110
|
-
----
|
|
111
|
-
output: string
|
|
112
|
-
"""
|
|
113
|
-
return ''
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|