Parasol Planning Library (PPL)
InteractionInformation.h
Go to the documentation of this file.
1 #ifndef INTERACTION_INFORMATION_H_
2 #define INTERACTION_INFORMATION_H_
3 
4 #include <memory>
5 #include <string>
6 #include <vector>
7 
8 #include "MPTask.h"
9 #include "MPProblem.h"
10 #include "ConfigurationSpace/Cfg.h"
12 #include "MPLibrary/MPBaseObject.h"
13 #include "Utilities/XMLNode.h"
14 #include "ConfigurationSpace/Cfg.h"
17 
23 
24  public:
27 
31  InteractionInformation(MPProblem* _problem, XMLNode& _node);
32 
34 
37 
39  std::string GetLabel() const;
40 
42  size_t GetMaxAttempts() const;
43 
45  MPProblem* GetMPProblem() const;
46 
48  std::vector<std::shared_ptr<MPTask>>& GetInteractionTasks();
49 
52  std::vector<std::shared_ptr<MPTask>>& GetTypeTasks(const std::string& _s);
53 
55  double GetInteractionWeight() const;
56 
59  void AddTemplateLocation(Cfg _location);
60 
62  std::vector<Cfg>& GetTemplateLocations();
63 
65  std::vector<Cfg> GetInteractionPositions();
66 
69  std::vector<std::pair<Cfg,Cfg>> GetInteractionPositionPairs();
70 
72  std::vector<std::vector<Cfg>> GetInteractionPaths();
73 
75  std::vector<Cfg> GetInteractionPosition(std::string _capability);
76 
78  std::vector<std::vector<Cfg>> GetInteractionPath(std::string _capability);
79 
82  bool SavedPaths();
83 
86 
88 
89  protected:
90 
91  MPProblem* m_problem{nullptr};
92 
94  std::vector<std::shared_ptr<MPTask>> m_tasks;
95 
97  std::unordered_map<std::string,std::vector<std::shared_ptr<MPTask>>> m_taskType;
98 
100  std::string m_label;
101 
104 
107 
109  std::vector<Cfg> m_handoffLocations;
110 
112  std::unique_ptr<Environment> m_interactionEnvironment;
113 
117 };
118 #endif
Definition: Cfg.h:38
Definition: Environment.h:137
Definition: InteractionInformation.h:22
bool m_savePaths
Definition: InteractionInformation.h:116
std::vector< Cfg > & GetTemplateLocations()
Gets the set of locations to place ITs.
Definition: InteractionInformation.cpp:103
std::vector< std::vector< Cfg > > GetInteractionPath(std::string _capability)
Get the paths of robot of input capability.
double m_interactionWeight
The weight of the edge between interaction cfgs.
Definition: InteractionInformation.h:106
std::unique_ptr< Environment > m_interactionEnvironment
Environment to plan the interaction in.
Definition: InteractionInformation.h:112
size_t GetMaxAttempts() const
Get max attempts for placing template in real environment.
Definition: InteractionInformation.cpp:71
std::unordered_map< std::string, std::vector< std::shared_ptr< MPTask > > > m_taskType
The list of tasks stored by type.
Definition: InteractionInformation.h:97
std::vector< Cfg > m_handoffLocations
The locations for manually placed handoffs.
Definition: InteractionInformation.h:109
std::vector< std::pair< Cfg, Cfg > > GetInteractionPositionPairs()
std::string m_label
The handoff label.
Definition: InteractionInformation.h:100
MPProblem * m_problem
The handoff template problem.
Definition: InteractionInformation.h:91
std::vector< std::vector< Cfg > > GetInteractionPaths()
Gets the paths of robots at each of the IT locations.
std::vector< std::shared_ptr< MPTask > > m_tasks
The set of tasks that must be performed to handoff.
Definition: InteractionInformation.h:94
Environment * GetInteractionEnvironment()
Gets the environment to plan the interaction in.
Definition: InteractionInformation.cpp:121
void AddTemplateLocation(Cfg _location)
Definition: InteractionInformation.cpp:109
size_t m_maxAttempts
The number of attempts to try and place the template in the environment.
Definition: InteractionInformation.h:103
double GetInteractionWeight() const
Get interaction weight.
Definition: InteractionInformation.cpp:97
MPProblem * GetMPProblem() const
Get MPProblem for handoff.
Definition: InteractionInformation.cpp:77
std::vector< std::shared_ptr< MPTask > > & GetTypeTasks(const std::string &_s)
Definition: InteractionInformation.cpp:89
bool SavedPaths()
Definition: InteractionInformation.cpp:115
std::vector< Cfg > GetInteractionPositions()
Gets the final position of robots at each of the IT locations.
std::string GetLabel() const
Get label for handoff template.
Definition: InteractionInformation.cpp:65
InteractionInformation(MPProblem *_problem, XMLNode &_node)
Definition: InteractionInformation.cpp:7
std::vector< Cfg > GetInteractionPosition(std::string _capability)
Get the final position of robot of input capability.
std::vector< std::shared_ptr< MPTask > > & GetInteractionTasks()
Get interaction tasks for handoff.
Definition: InteractionInformation.cpp:83
Definition: MPProblem.h:34
Definition: XMLNode.h:27