1 #ifndef ADAPTIVE_RRT_H_
2 #define ADAPTIVE_RRT_H_
8 #if defined(__x86_64__) || defined(_M_X64)
9 static inline uint64_t GetCycles() {
11 __asm__ __volatile__(
"rdtsc" :
"=A"(n));
14 #elif defined(__aarch64__)
16 static inline uint64_t GetCycles() {
18 clock_gettime(CLOCK_MONOTONIC, &ts);
19 return static_cast<uint64_t
>(ts.tv_sec) * 1000000000ULL + ts.tv_nsec;
22 #error "Unsupported architecture"
49 typedef std::map<std::string, std::pair<std::pair<double, long>,
double>>
GrowthSet;
68 AdaptiveRRT(
double _wallPenalty = 0.5,
double _gamma = 0.5,
81 virtual void Print(std::ostream& _os)
const;
147 void AvgVisibility(
Cfg& _cfg,
double _val);
153 double CostInsensitiveProb(std::string _s,
GrowthSet& _gs);
162 double GetVisibility(
Cfg& _cfg);
168 double GetCost(std::string _s,
GrowthSet& _gs);
174 double m_wallPenalty;
Definition: AdaptiveRRT.h:43
VID AddNode(Cfg &_newCfg, VID _nearVID, bool _againstWall, double _ratio)
Definition: AdaptiveRRT.cpp:341
std::map< double, GrowthSet > GrowthSets
Definition: AdaptiveRRT.h:51
virtual void Print(std::ostream &_os) const
Definition: AdaptiveRRT.cpp:69
virtual ~AdaptiveRRT()=default
AdaptiveRRT(double _wallPenalty=0.5, double _gamma=0.5, const GrowthSets &_growthSets=GrowthSets(), CostMethod _c=FIXED)
Definition: AdaptiveRRT.cpp:10
RoadmapType::VID VID
Definition: AdaptiveRRT.h:55
MPBaseObject::WeightType WeightType
Definition: AdaptiveRRT.h:53
MPBaseObject::RoadmapType RoadmapType
Definition: AdaptiveRRT.h:54
void RewardGrowthMethod(double _r, std::string _s, GrowthSet &_gs)
Definition: AdaptiveRRT.cpp:297
std::string SelectGrowthMethod(GrowthSet &_gs)
Definition: AdaptiveRRT.cpp:231
virtual VID ExpandTree(Cfg &_dir)
Definition: AdaptiveRRT.cpp:109
VID UpdateTree(VID _nearest, Cfg &_new, Cfg &_dir, double _delta)
Definition: AdaptiveRRT.cpp:312
virtual void Initialize() override
Definition: AdaptiveRRT.cpp:93
std::map< std::string, std::pair< std::pair< double, long >, double > > GrowthSet
Definition: AdaptiveRRT.h:49
CostMethod
Definition: AdaptiveRRT.h:62
@ FIXED
Definition: AdaptiveRRT.h:62
@ CYCLES
Definition: AdaptiveRRT.h:62
@ REWARD
Definition: AdaptiveRRT.h:62
void UpdateCost(double _cost, std::string _s, GrowthSet &_gs)
Definition: AdaptiveRRT.cpp:282
Definition: BasicRRTStrategy.h:48
Definition: GenericStateGraph.h:67
STAPLGraph::vertex_descriptor VID
Definition: GenericStateGraph.h:83