robotic 0.3.4.dev2__cp311-cp311-manylinux2014_x86_64.whl → 0.3.4.dev4__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.

Potentially problematic release.


This version of robotic might be problematic. Click here for more details.

Files changed (35) hide show
  1. robotic/_robotic.pyi +16 -3
  2. robotic/_robotic.so +0 -0
  3. robotic/include/rai/Core/array.h +1 -0
  4. robotic/include/rai/Core/array.ipp +6 -14
  5. robotic/include/rai/Core/defines.h +0 -1
  6. robotic/include/rai/Core/thread.h +1 -1
  7. robotic/include/rai/Core/util.h +0 -1
  8. robotic/include/rai/Geo/geo.h +7 -7
  9. robotic/include/rai/Geo/pairCollision.h +4 -8
  10. robotic/include/rai/Kin/cameraview.h +24 -36
  11. robotic/include/rai/Kin/simulation.h +5 -3
  12. robotic/include/rai/Logic/treeSearchDomain.h +2 -2
  13. robotic/include/rai/Optim/i_NLopt.h +4 -0
  14. robotic/include/rai/Optim/m_EvoStrategies.h +38 -18
  15. robotic/include/rai/Optim/m_LeastSquaresZeroOrder.h +15 -1
  16. robotic/include/rai/Optim/m_NelderMead.h +7 -1
  17. robotic/include/rai/Optim/options.h +3 -2
  18. robotic/include/rai/Optim/utils.h +2 -1
  19. robotic/include/rai/Search/TreeSearchNode.h +1 -1
  20. robotic/librai.so +0 -0
  21. robotic/meshTool +0 -0
  22. robotic/version.py +1 -1
  23. {robotic-0.3.4.dev2.dist-info → robotic-0.3.4.dev4.dist-info}/METADATA +1 -1
  24. {robotic-0.3.4.dev2.dist-info → robotic-0.3.4.dev4.dist-info}/RECORD +34 -35
  25. robotic/nlp.py +0 -113
  26. {robotic-0.3.4.dev2.data → robotic-0.3.4.dev4.data}/scripts/ry-bot +0 -0
  27. {robotic-0.3.4.dev2.data → robotic-0.3.4.dev4.data}/scripts/ry-h5info +0 -0
  28. {robotic-0.3.4.dev2.data → robotic-0.3.4.dev4.data}/scripts/ry-info +0 -0
  29. {robotic-0.3.4.dev2.data → robotic-0.3.4.dev4.data}/scripts/ry-meshTool +0 -0
  30. {robotic-0.3.4.dev2.data → robotic-0.3.4.dev4.data}/scripts/ry-test +0 -0
  31. {robotic-0.3.4.dev2.data → robotic-0.3.4.dev4.data}/scripts/ry-urdfConvert.py +0 -0
  32. {robotic-0.3.4.dev2.data → robotic-0.3.4.dev4.data}/scripts/ry-view +0 -0
  33. {robotic-0.3.4.dev2.dist-info → robotic-0.3.4.dev4.dist-info}/WHEEL +0 -0
  34. {robotic-0.3.4.dev2.dist-info → robotic-0.3.4.dev4.dist-info}/licenses/LICENSE +0 -0
  35. {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: bool = False) -> NLP_Solver:
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
@@ -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
- // T* xp=x.p, *xstop=xp+x.N;
1981
- // for(; xp!=xstop; xp++) *xp *= y;
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
@@ -45,7 +45,6 @@ typedef unsigned int uint;
45
45
  //
46
46
 
47
47
  //using std::cout;
48
- //using std::cerr;
49
48
  //using std::endl;
50
49
  using std::ostream;
51
50
  using std::istream;
@@ -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()) { cerr << "can't destroy a variable when it is currently accessed!" <<endl; exit(1); }
143
+ if(rwlock.isLocked()) { cout << "can't destroy a variable when it is currently accessed!" <<endl; exit(1); }
144
144
  }
145
145
  };
146
146
 
@@ -22,7 +22,6 @@
22
22
  #include <random>
23
23
 
24
24
  using std::cout;
25
- using std::cerr;
26
25
  using std::endl;
27
26
 
28
27
  namespace rai {
@@ -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, double width, double height) const;
278
- void unproject_fromPixelsAndTrueDepth(arr& x, double width, double height) const;
279
- void unproject_fromPixelsAndGLDepth(arr& x, uint width, uint height) const;
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(double width, double height);
282
- arr getIntrinsicMatrix(double width, double height) const;
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, const arr& Jp1, const arr& Jx1,
84
- const rai::Transformation& t2, const arr& Jp2, const arr& Jx2,
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
- /*! describes a sensor from which we can take 'images' within the simulation (e.g.: kinect, suctionRingView, etc) */
20
- struct Sensor {
21
- rai::String name;
22
- rai::Camera cam; ///< this includes the transformation X
23
- uint width=640, height=480;
24
- rai::Frame *frame=0;
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<Sensor> sensors; //the list of sensors
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
- Sensor* currentSensor=0;
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
- Sensor& addSensor(rai::Frame* frame, uint width, uint height, double focalLength=-1., double orthoAbsHeight=-1., const arr& zRange= {}, const char* backgroundImageFile=0);
46
- Sensor& addSensor(rai::Frame* frame); //read everything from the frame attributes
47
- Sensor& selectSensor(rai::Frame* frame); //set the OpenGL sensor
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(currentSensor, "no sensor selected yet"); return currentSensor->getFxycxy(); }
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
- struct Sim_CameraView : Thread {
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::Sensor& addSensor(const char* sensorName, uint width=640, uint height=360, double focalLength=-1., double orthoAbsHeight=-1., const arr& zRange= {}) {
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().addSensor(f, width, height, focalLength, orthoAbsHeight, zRange);
79
+ return cameraview().setCamera(f, width, height, focalLength, orthoAbsHeight, zRange);
79
80
  }
80
- rai::CameraView::Sensor& selectSensor(const char* name) { return cameraview().selectSensor(C.getFrame(name)); }
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::cerr <<"not implemented for world of type " <<typeid(this).name() <<std::endl; exit(-1); }
68
+ virtual void set_state(const Handle& stateCopy) { std::cout <<"not implemented for world of type " <<typeid(this).name() <<std::endl; exit(-1); }
69
69
 
70
70
  /// Return whether the current state is a terminal state
71
71
  virtual bool is_terminal_state() const = 0;
@@ -81,7 +81,7 @@ struct TreeSearchDomain {
81
81
  virtual bool get_info(InfoTag tag) const = 0;
82
82
  virtual double get_info_value(InfoTag tag) const = 0;
83
83
 
84
- virtual void write(std::ostream& os) const { std::cerr <<"NOT OVERLOADED!" <<std::endl; }
84
+ virtual void write(std::ostream& os) const { std::cout <<"NOT OVERLOADED!" <<std::endl; }
85
85
  };
86
86
  inline std::ostream& operator<<(std::ostream& os, const TreeSearchDomain& E) { E.write(os); return os; }
87
87
  inline std::ostream& operator<<(std::ostream& os, const TreeSearchDomain::SAO& x) { x.write(os); return os; }
@@ -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
- uint steps=0, rejectedSteps=0, tinySteps=0;
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(const arr& samples, const arr& values) = 0;
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
- arr select(const arr& samples, const arr& y, uint mu);
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(const arr& samples, const arr& values);
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={}) : EvolutionStrategy(f) {}
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
- virtual arr generateNewSamples(){
82
- arr X = replicate(mean, lambda);
83
- // for(uint i=0;i<X.d0;i++) X[i] = X[i] % (0.5 + 1.*rand(X.d1));
84
- rndGauss(X, sigma, true);
85
- return X;
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(const arr& X, const arr& y){
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, M_CMA };
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/", bool, finiteDifference, false)
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
- NLP_FiniteDifference(std::shared_ptr<NLP> _P) : P(_P) { copySignature(*P); }
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::cerr <<"NOT OVERLOADED!" <<std::endl; }
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.dev2'
1
+ __version__ = '0.3.4.dev4'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: robotic
3
- Version: 0.3.4.dev2
3
+ Version: 0.3.4.dev4
4
4
  Summary: Robotic Control Interface & Manipulation Planning Library
5
5
  Home-page: https://github.com/MarcToussaint/robotic/
6
6
  Author: Marc Toussaint
@@ -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=eH6X_tlCOE1wsCfPJ7UceZsqo-0B-WQkxbcfiy9jqIk,78182
4
- robotic/_robotic.so,sha256=BvXkNP3Lrq4ljQNIH-ruM5vUrsjUd4MhfF_rOwCW_r8,1279848
3
+ robotic/_robotic.pyi,sha256=XK-lJzDjXVuZ0vuCDREkfpMFOrtXj_u8Uj_mBuB4rxE,78841
4
+ robotic/_robotic.so,sha256=4F7axSkAmb0jIh1AJQl15dckal83_m4kVsJeeXlHOLg,1288040
5
5
  robotic/algo.pyi,sha256=hAN3ZPvf4VnhcdoRP-EecAwUge_JMxovJ9lAOIgWX2Q,730
6
- robotic/librai.so,sha256=t33Zp6zObfhuY_Of8xslnvfFGEg16sr8W6XJ6zA82VY,39005824
6
+ robotic/librai.so,sha256=pZST3L6Y8KEXVOB83bppWVOzpl9FA8eiWDM7-YSY9KA,39026368
7
7
  robotic/manipulation.py,sha256=0B7UzU9J7b4f19thz67TbvknoncxffQEMHSBB6ez1Jg,22279
8
- robotic/meshTool,sha256=V9bMOkry--3L3FBoCP9bRdFl_2nvN02AZpAP801JlQY,56288
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=safcLGc3qHjRyE2B0CDJ6rYEEJVpdijLmYxccZ1EGjA,27
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=xlbbSVin9_3iDN6OskoQDT2tAiA3L0qpvSnqWISHedE,26829
54
- robotic/include/rai/Core/array.ipp,sha256=M4nm038RAgV7y4vA80c7LWmw5nG6oM2Q87uBjBEhXBQ,63413
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=Y5YF92lo5dV3r0W6DFCapY7_7vUk9dS1po6ixtNxGIg,6896
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=oCcqgzPHYoVwCbarDibmbTwxKxnGGwdK0e0re3yWfPY,18303
60
- robotic/include/rai/Core/util.h,sha256=6cKEdQNwoZMDm4iFt8fHWzxpfZTpg1heukdGWG4j4cU,18931
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=6bjl_R_Olr_pvlKcxPNdiu8brWFfYJMVQrKSbx3zhpA,14937
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=VXCjzK6O0k--KF5hyeHhi6WQDPj_kj6rN4Vp-WP8rb8,4534
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=byzJyTxP4Irh0A6gi8ZNndvJ0UFDD8leLfbW9B7laJI,2478
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=jeW1Pj4AVk9mjBTYjDpNd19Dw0QH__m6VhjSvkiftcs,5510
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=sO5Y6o9wRTQxfST9YyJw3P0KcqGX7ISqbIN-uGQ5abU,3882
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=R0ma9SjxcVU9nI7H39QOWUIPy95H4AiQwLRHz3DRe7k,970
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=zch7kh-tZHslU7hyUaUKr3vkdcyACmFpV6sR_JEe1cc,2510
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=J-gp8iwHgPxxCDO8H8W2eYaMG5dI7ZGDP3s2ks3EyWk,1099
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=Wu8g4fvZtNr-gBkpXPRvZcMHb1TSu2mMKii3zCJwQ9I,280
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=lDExjmnuhjOJe1Gg0DREDCMB6vKJAfgwULspp72PaHA,1961
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=ZYBRhkogXxn67mfhGQgLisc2rTn-hlFqyYVDxXiCOZM,2002
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=fvPE2LV_GsIAGSQxaDOdiJdkF_2MA4M0ORRtWmVcwwA,1774
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.dev2.data/scripts/ry-bot,sha256=LBNbbQeNNNd_tupI5463Xe-RKSD6xy4HGTbJloisCGk,2280
377
- robotic-0.3.4.dev2.data/scripts/ry-h5info,sha256=6orNP37WPoobKup0PcLXQvbiCVWqeRR_JQyMH1iXHJk,449
378
- robotic-0.3.4.dev2.data/scripts/ry-info,sha256=fL5QXJL4Xx-Q42L2C29HHbj1XsmWdWiKIv9rVfc5sm4,425
379
- robotic-0.3.4.dev2.data/scripts/ry-meshTool,sha256=h4f4wFPNaey3ziz870SrEvy6SsQSL-ZnR_cH3UuAZxE,101
380
- robotic-0.3.4.dev2.data/scripts/ry-test,sha256=YTCSIuTA4JYk7j7TAr-t7IIp5g6hdLRlTPxJZBxQVpk,965
381
- robotic-0.3.4.dev2.data/scripts/ry-urdfConvert.py,sha256=762MIDmAhdCCj55QftY7wsy9gOEs-TDEWcRPt5dECyc,2542
382
- robotic-0.3.4.dev2.data/scripts/ry-view,sha256=_GjUbVS2X3AWnlXqIHwU5dofLmUKA2-NUPySgS-QJNI,599
383
- robotic-0.3.4.dev2.dist-info/licenses/LICENSE,sha256=oT-pAsUSXiuMq2_3omR87-GFBeBnegQYixH4Bm_7wag,1071
384
- robotic-0.3.4.dev2.dist-info/METADATA,sha256=GyHozdHsWzRtgqc1oKXrZ1QWjfH9qxNNmZ0coAcWaOg,6663
385
- robotic-0.3.4.dev2.dist-info/WHEEL,sha256=ITVdYpiTGnryqIbOR0i1wcdISo8YPJzlx8rAyocabzM,104
386
- robotic-0.3.4.dev2.dist-info/top_level.txt,sha256=x5A4haAZ18y9FpO1IhXSVJ2TFdhVAgT5JMkejHUg_9U,8
387
- robotic-0.3.4.dev2.dist-info/RECORD,,
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/licenses/LICENSE,sha256=oT-pAsUSXiuMq2_3omR87-GFBeBnegQYixH4Bm_7wag,1071
383
+ robotic-0.3.4.dev4.dist-info/METADATA,sha256=L-Uk3M5xv1M4z4TknL8bsprAQ7rc5q4ItxEzXp1AIBw,6663
384
+ robotic-0.3.4.dev4.dist-info/WHEEL,sha256=ITVdYpiTGnryqIbOR0i1wcdISo8YPJzlx8rAyocabzM,104
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 ''