libmove3d-planners
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros Groups Pages
place.hpp
1 #ifndef PLACE_HPP
2 #define PLACE_HPP
3 
4 #include "manipulationTask.hpp"
5 #include "Planner-pkg.h"
6 
7 
8 #define MAX_NBR_TEST 1000
9 
10 class Place : public ManipulationTask
11 {
12  MOVE3D_STATIC_LOGGER;
13 public:
14  Place();
15  bool initAll();
16  virtual bool initialize();
17  bool finalize();
18  bool findCandidateSolutions();
19  bool getRandomSol();
20  bool findConfigurations();
21  bool findTrajectories();
23  virtual TaskSolution *createSolution(bool computeMP);
24  bool testConstraints(int alternativeId);
25 // virtual vector<TaskSubSolution*> setNextTraj(TaskSubSolution* doneTSS);
26  virtual bool setAgents(std::multimap<std::string,std::string> agents_name);
27  bool setObjects(std::multimap<std::string,std::string> objects_name);
28  bool setPoints(std::multimap<std::string,p3d_point> points);
29  bool setdata(std::multimap<std::string,std::string> additionalData);
30  bool setSupportObject(std::multimap<std::string,std::string> objects_name);
31  bool setMainObject(std::multimap<std::string,std::string> objects_name);
32  void smoothSolution(int alternativeId);
33  std::string getDescr();
34  std::string getTextFromValues();
35 
36  bool setTargetPoint(std::multimap<std::string,p3d_point> points);
37 
38  bool findSupports();
39  bool findRotations();
40  std::vector<regionConst> getForceInConstraints();
41  std::vector<regionConst> getForbidConstraints();
42  bool findCurrentTestPoint();
43  configPt findCurrentRotations();
44  configPt findObjectConf();
45  bool isObjectInSurface();
46 // Robot* getMainObjectFromAtt();
47 // int getArmIdFromAtt();
48 // bool checkArmAtt();
49 // bool checkAndSetArmAndObj();
50  bool testFactConstraints();
51 
52  bool initMightabilities();
53  bool getNextMightPoint();
54 
55  virtual double getSSSizeLeft();
56 
57 
58 protected:
59  int maxTests;
60  Robot* _supportObject;
61 
62  p3d_traj* approachTraj;
63  p3d_traj* placeTraj;
64  p3d_traj* escapeTraj;
65  p3d_traj* releaseTraj;
66 
67  std::vector<GeometricForm*> _supports;
68  std::vector<Robot*> _supportList;
69  confPtr_t _confSol;
70 
71  bool noSupport; //false of a support is given
72 
73 
74  bool _hasTargedPoint;
75  p3d_point _targetPoint;
76 
77  p3d_point _currentTest;
78  GeometricForm* _currentSurface;
79 
80  std::vector<configPt> _rotations;
81 
82 
83 
84  std::vector<MightabilitiesCell*> _cells;
85  unsigned int _cellId;
86 };
87 
88 
89 
90 #endif // PLACE_HPP
Definition: taskSolution.hpp:9
Definition: geometricForm.hpp:11
Definition: manipulationTask.hpp:6
bool computeSolutionTrajectories(TaskSolution *TS)
overides computeSolutionTrajectories(int solutionId)
Definition: place.cpp:347
This class holds a the robot represented by a kinematic chain.
Definition: robot.hpp:42
Definition: place.hpp:10