23 std::cerr <<
"new Roadmap is created" << std::endl;
26 unsigned long numPoints = 0, numTotalPoints = 0;
44 printf(
"creating nodes, registered : %ld / tested : %ld\r", numPoints, numTotalPoints);
52 for (
unsigned long i=0;
i<
n;
i++) {
57 for (
unsigned long j=
i+1; j<
n; j++) {
70 std::cout <<
"PRM::calcPath()" << std::endl;
77 std::cerr <<
"maxDist:" <<
maxDist_ << std::endl;
78 std::cerr <<
"maxPoints:" <<
maxPoints_ << std::endl;
90 for (
unsigned long i=0;
i<
roadmap_->nNodes();
i++) {
94 roadmap_->tryConnection(startNode, node);
97 roadmap_->tryConnection(goalNode, node);
101 std::cout <<
"start node has " << startNode->nChildren()
102 <<
" childrens" << std::endl;
103 std::cout <<
"goal node has " << goalNode->nParents()
104 <<
" parents" << std::endl;
106 std::vector<RoadmapNodePtr> nodePath;
107 nodePath =
roadmap_->DFS(startNode, goalNode);
108 for (
unsigned int i=0;
i<nodePath.size();
i++){
112 std::cout <<
"path_.size() = " <<
path_.size() << std::endl;
114 return path_.size() != 0;
virtual double distance(const Configuration &from, const Configuration &to) const =0
Configuration random()
generate random position
RoadmapPtr roadmap_
ロードマップ
ConfigurationSpace * getConfigurationSpace()
コンフィギュレーション空間設定を取得する
bool checkCollision()
現在の状態で干渉検出を行う
std::map< std::string, std::string > properties_
プロパティ
Mobility * getMobility()
移動能力を取得する
boost::shared_ptr< RoadmapNode > RoadmapNodePtr
bool calcPath()
親クラスのドキュメントを参照
std::vector< Configuration > path_
計画された経路
bool buildRoadmap()
ロードマップを生成する
PRM(PathPlanner *planner)
コンストラクタ
PathPlanner * planner_
計画経路エンジン