Parasol Planning Library (PPL)
WrenchAccessibilityTool.h
Go to the documentation of this file.
1 #ifndef PMPL_WRENCH_ACCESSIBILITY_TOOL_H_
2 #define PMPL_WRENCH_ACCESSIBILITY_TOOL_H_
3 
6 #include "Utilities/MPUtils.h"
7 #include <iostream>
8 
16 
17  public:
18 
21 
23  typedef typename RoadmapType::VID VID;
24 
28 
29 
30 
34 
36 
38 
39  virtual ~WrenchAccessibilityTool() = default;
40 
44 
46  void Initialize();
47 
53 
57 
58 
59 
61 
62  private:
63 
83  void ReadDisks(const string& _filename);
84 
90  Vector3d SampleInDisk(double _r);
91 
92 
97  static double Angle(Vector3d& _v);
98 
99 
104  static bool AngleCompare(Vector3d& _v1, Vector3d& _v2);
105 
114  double FindLargestFreeAngle(vector<Vector3d>& _v, size_t _idx);
115 
116 
120 
121  vector<Transformation>* m_disks; //< The set of disks
122  vector<vector<size_t>*>* m_obstIdxs; //< The subsets of obstacles to check for collisions
123 
124  double m_radius{1}; //< The radius of the wrench for which
125  //< Accessibility is computed
126 
127  size_t m_numSamples{30}; //< The number of samples for each disk
128 
129  CollisionDetectionValidityMethod* m_cd; //< Collision detection
130 
131  string m_inputFile; //< Path to the file containing the disks
132  string m_outputFile{"Disks.txt"}; //< Path to the output file (will be created if doesnt exist)
133 
134  ofstream m_outputStream; //< Output stream
135 
137 
138 };
139 
140 #endif
Definition: CollisionDetectionValidityMethod.h:28
Definition: GenericStateGraph.h:67
STAPLGraph::vertex_descriptor VID
Definition: GenericStateGraph.h:83
Definition: MPBaseObject.h:46
Definition: WrenchAccessibilityTool.h:15
MPBaseObject::RoadmapType RoadmapType
Definition: WrenchAccessibilityTool.h:22
void Initialize()
A template function.
Definition: WrenchAccessibilityTool.cpp:29
WrenchAccessibilityTool()
Definition: WrenchAccessibilityTool.cpp:8
void ComputeWrenchAccessibility()
Definition: WrenchAccessibilityTool.cpp:44
virtual ~WrenchAccessibilityTool()=default
RoadmapType::VID VID
Definition: WrenchAccessibilityTool.h:23
Definition: XMLNode.h:27