libmove3d-planners
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros Groups Pages
moveTo.hpp
1 #ifndef MOVETO_HPP
2 #define MOVETO_HPP
3 
4 #include "GTP/Tasks/privateTask.hpp"
5 #include "Planner-pkg.h"
6 
7 typedef enum {
8  SAVEDCONF,
9  GIVENCONF,
10  CARTESIAN6DPOINT,
11  CARTESIANNDPOINT, // the point can be defined as 4,5 or 6D depending on the needs
12  NOTDEFINED
13 } moveToStrategy;
14 
15 class MoveTo : public PrivateTask
16 {
17  MOVE3D_STATIC_LOGGER;
18 public:
19  MoveTo();
20  bool run(std::multimap<std::string,std::string> agents_name,
21  std::multimap<std::string,std::string> objects_name,
22  std::multimap<std::string,p3d_point> point3d,
23  std::multimap<std::string,std::string> additionalData,
24  WorldState* WS, bool computeMP);
25 
26  virtual TaskSolution* findAlternative(bool computeMP);
27 
28  virtual bool initAll();
29  virtual bool initialize();
30  virtual bool finalize();
31  virtual bool findCandidateSolutions();
32  virtual bool getRandomSol();
33  virtual bool findConfigurations();
34  virtual bool findTrajectories();
35  virtual bool computeSolutionTrajectories(int alternativeId);
36  virtual bool computeSolutionTrajectories(TaskSolution *TS);
37 // virtual bool findAlternative();
38  virtual TaskSolution *createSolution(bool computeMP);
39  virtual bool setToSolution(int solutionId, bool computeMP);
40 // virtual vector<TaskSubSolution *> setNextTraj(TaskSubSolution* doneTSS);
41  virtual bool setAgents(std::multimap<std::string,std::string> agents_name);
42  virtual bool setObjects(std::multimap<std::string,std::string> objects_name);
43  virtual bool setPoints(std::multimap<std::string,p3d_point> points);
44  virtual bool setdata(std::multimap<std::string,std::string> additionalData);
45  virtual void smoothSolution(int alternativeId);
46  virtual std::string getDescr();
47  virtual std::string getTextFromValues();
48 
49  std::map<std::string, std::vector<double> > getConfiguration(std::string configurationName);
50  confPtr_t getConf(Robot* r, std::map<int, std::vector<double> > toChange);
51  confPtr_t computeConfFromPoint(Robot* r, std::vector<double> v, int armId);
52 private:
53  unsigned int current_grasp_id;
54  std::vector<gpGrasp> graspList;
55 // int _armId;
56 
57  p3d_traj* _traj;
58  confPtr_t _targetConf;
59  std::map<std::string,std::vector<double> > _fileInfo;
60 
61  std::string _configurationName;
62 
63  int armUsed;
64 
65  moveToStrategy _useConf;
66  std::vector<double> _givenSol;
67 
68 };
69 
70 #endif // MOVETO_HPP
Definition: taskSolution.hpp:9
Definition: moveTo.hpp:15
This class holds a the robot represented by a kinematic chain.
Definition: robot.hpp:42
Definition: worldState.hpp:30
Definition: privateTask.hpp:6