RRT.h
Go to the documentation of this file.
1 #ifndef __RRT_H__
2 #define __RRT_H__
3 
4 #include <vector>
5 #include <string>
6 #include <iostream>
7 #include <stdio.h>
8 
9 #include "PathPlanner.h"
10 #include "Algorithm.h"
11 #include "Roadmap.h"
12 
13 namespace PathEngine {
14 
18  class RRT
19  : public Algorithm {
20  public:
24  typedef boost::function1<bool, const Configuration &> extraConnectionCheckFunc;
25 
26  private:
30  enum ExtendResult {
34  };
35 
40 
45 
50 
55 
63  int extend(RoadmapPtr tree, Configuration& qRand, bool reverse=false);
64 
72  int connect(RoadmapPtr tree, const Configuration& qNew, bool reverse=false);
73 
74  void swapTrees();
75 
79  double eps_;
80 
84  int times_;
85 
90 
95 
100 
101  public:
106  RRT(PathPlanner* planner);
107 
111  ~RRT();
112 
116  bool calcPath();
117 
123 
128  void extendFromGoal(bool b) { extendFromGoal_ = b; }
129 
133  void extractPath();
134 
138  void extractPath(std::vector<Configuration>& o_path);
139 
145 
150  void setForwardTree(RoadmapPtr tree);
151 
157 
163 
168  void setBackwardTree(RoadmapPtr tree);
169 
174  bool extendOneStep();
175 
180  void epsilon(double e) { eps_ = e; }
181 
187  };
188 };
189 
190 
191 #endif // __RRT_H__
Roadmap.h
PathEngine::RRT::~RRT
~RRT()
デストラクタ
Definition: RRT.cpp:29
PathEngine::RRT
RRTアルゴリズム実装クラス
Definition: RRT.h:18
PathEngine::RRT::Tstart_
RoadmapPtr Tstart_
RRT-connect において、初期位置からのツリー
Definition: RRT.h:39
PathEngine::RRT::ExtendResult
ExtendResult
Definition: RRT.h:30
b
long b
Definition: jpegint.h:371
PathEngine::RRT::Advanced
@ Advanced
指定の位置に近づいた
Definition: RRT.h:31
PathEngine::RRT::extendFromGoal
void extendFromGoal(bool b)
ゴールからツリーをのばすか否かを設定
Definition: RRT.h:128
PathEngine::RRT::connect
int connect(RoadmapPtr tree, const Configuration &qNew, bool reverse=false)
RRT-connect の connect 関数。伸ばせなくなるまで extend する
Definition: RRT.cpp:104
PathEngine::RRT::extendFromGoal_
bool extendFromGoal_
Definition: RRT.h:94
PathEngine::RRT::extraConnectionCheckFunc_
extraConnectionCheckFunc extraConnectionCheckFunc_
Definition: RRT.h:99
PathEngine::PathPlanner
計画経路エンジン
Definition: hrplib/hrpPlanner/PathPlanner.h:44
PathEngine::Algorithm
経路計画アルゴリズム基底クラス
Definition: Algorithm.h:23
PathEngine::RRT::Tgoal_
RoadmapPtr Tgoal_
RRT-connect において、終了位置からのツリー
Definition: RRT.h:44
Algorithm.h
PathEngine::RRT::extractPath
void extractPath()
計画した経路を抽出し、path_にセットする
Definition: RRT.cpp:117
PathEngine::RRT::extendFromStart_
bool extendFromStart_
Definition: RRT.h:89
PathEngine::RRT::extraConnectionCheckFunc
boost::function1< bool, const Configuration & > extraConnectionCheckFunc
Definition: RRT.h:24
PathEngine::RRT::RRT
RRT(PathPlanner *planner)
コンストラクタ
Definition: RRT.cpp:12
PathEngine::RRT::getLastExtendedTree
RoadmapPtr getLastExtendedTree()
get a tree extened in the last phase
Definition: RRT.h:162
PathEngine::RoadmapPtr
boost::shared_ptr< Roadmap > RoadmapPtr
Definition: Roadmap.h:13
PathEngine
Definition: Algorithm.h:13
PathEngine::RRT::swapTrees
void swapTrees()
Definition: RRT.cpp:227
PathEngine::RRT::extend
int extend(RoadmapPtr tree, Configuration &qRand, bool reverse=false)
ランダムな点に向かってツリーを伸ばす。
Definition: RRT.cpp:33
PathEngine::RRT::setBackwardTree
void setBackwardTree(RoadmapPtr tree)
ゴールからのツリーを設定する
Definition: RRT.cpp:238
PathEngine::RRT::eps_
double eps_
Definition: RRT.h:79
PathEngine::RRT::getBackwardTree
RoadmapPtr getBackwardTree()
ゴールからのツリーを取得する
Definition: RRT.h:156
PathEngine::RRT::epsilon
void epsilon(double e)
サンプリングしたコンフィギュレーションに向かって伸ばす距離を設定
Definition: RRT.h:180
PathEngine::RRT::getForwardTree
RoadmapPtr getForwardTree()
スタートからのツリーを取得する
Definition: RRT.h:144
PathEngine::RRT::TlastExtended_
RoadmapPtr TlastExtended_
a tree extened in the last phase
Definition: RRT.h:49
PathEngine::RRT::Ta_
RoadmapPtr Ta_
ツリーの交換のために用いる変数。どちらか一方がTstart_をもう一方がTgoal_を指す
Definition: RRT.h:54
PathEngine::RRT::Reached
@ Reached
指定の位置に到達した
Definition: RRT.h:33
PathEngine::RRT::setForwardTree
void setForwardTree(RoadmapPtr tree)
スタートからのツリーを設定する
Definition: RRT.cpp:234
PathEngine::RRT::times_
int times_
Definition: RRT.h:84
PathPlanner.h
PathEngine::RRT::extendOneStep
bool extendOneStep()
ツリーを伸ばす処理を1回だけ行う
Definition: RRT.cpp:154
PathEngine::RRT::Trapped
@ Trapped
干渉のため、近づくことができなかった
Definition: RRT.h:32
PathEngine::RRT::calcPath
bool calcPath()
親クラスのドキュメントを参照
Definition: RRT.cpp:186
PathEngine::RRT::extendFromStart
void extendFromStart(bool b)
スタートからツリーをのばすか否かを設定
Definition: RRT.h:122
PathEngine::RRT::Tb_
RoadmapPtr Tb_
Definition: RRT.h:54
PathEngine::Configuration
Definition: Configuration.h:10
PathEngine::RRT::setExtraConnectionCheckFunc
void setExtraConnectionCheckFunc(extraConnectionCheckFunc i_func)
スタートからのツリーとゴールからのツリーが接続できたかの追加チェックを行うユーザ関数を設定する
Definition: RRT.cpp:242


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Wed Sep 7 2022 02:51:04