MIRA
AbstractPlanner.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) by
3  * MetraLabs GmbH (MLAB), GERMANY
4  * and
5  * Neuroinformatics and Cognitive Robotics Labs (NICR) at TU Ilmenau, GERMANY
6  * All rights reserved.
7  *
8  * Redistribution and modification of this code is strictly prohibited.
9  *
10  * IN NO EVENT SHALL "MLAB" OR "NICR" BE LIABLE TO ANY PARTY FOR DIRECT,
11  * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF
12  * THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF "MLAB" OR
13  * "NICR" HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14  *
15  * "MLAB" AND "NICR" SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING,
16  * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
17  * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
18  * ON AN "AS IS" BASIS, AND "MLAB" AND "NICR" HAVE NO OBLIGATION TO
19  * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR MODIFICATIONS.
20  */
21 
30 #ifndef _MIRA_PILOT_ABSTRACTPLANNER_H_
31 #define _MIRA_PILOT_ABSTRACTPLANNER_H_
32 
33 #include <factory/Factory.h>
34 #include <transform/Pose.h>
35 #include <transform/Velocity.h>
36 
37 #include <navigation/Task.h>
38 
40 #include <pilot/Module.h>
41 
42 namespace mira { namespace pilot {
43 
45 
46 
47 class Pilot;
48 
49 class AbstractPlanner : public Module
50 {
51  MIRA_ABSTRACT_OBJECT(AbstractPlanner);
52 public:
53  virtual ~AbstractPlanner() {}
54 
55  virtual void setTask(boost::shared_ptr<navigation::Task> task) = 0;
56 
58  virtual bool reachedTasks() = 0;
59 
61  virtual bool satisfied() = 0;
62 
64  virtual void resetDissatisfaction() = 0;
65 
67  virtual std::list<DissatisfactionReason> getDissatisfactionReasons() = 0;
68 
69  virtual Velocity2 planMotion() = 0;
70 
72  virtual void update() = 0;
73 
74  virtual void plan(Duration plantime) = 0;
75 
77  virtual void updateRobotModel() {};
78 };
79 
81 
82 }} // namespace
83 
84 #endif
virtual bool reachedTasks()=0
Returns true, if all objectives have reached their task.
virtual void updateRobotModel()
Update the robot model. Default implementation is empty.
Definition: AbstractPlanner.h:77
TODO Add description.
virtual void plan(Duration plantime)=0
virtual ~AbstractPlanner()
Definition: AbstractPlanner.h:53
virtual void resetDissatisfaction()=0
Reset any kind of dissatisfaction.
Definition: AbstractPlanner.h:49
Definition: Module.h:41
virtual Velocity2 planMotion()=0
virtual bool satisfied()=0
Returns true when the planner is satisfied with the progress of the current task. ...
virtual void update()=0
is called before plan even if there is no plantime left
virtual void setTask(boost::shared_ptr< navigation::Task > task)=0
virtual std::list< DissatisfactionReason > getDissatisfactionReasons()=0
Returns reasons (strings) that caused the overall state of dissatisfaction.