hrplib
hrpPlanner
Roadmap.h
Go to the documentation of this file.
1
// -*- mode: c++; indent-tabs-mode: nil; c-basic-offset: 4; tab-width: 4; -*-
2
#ifndef __ROADMAP_H__
3
#define __ROADMAP_H__
4
5
#include <vector>
6
#include <boost/shared_ptr.hpp>
7
#include "
Configuration.h
"
8
#include "
RoadmapNode.h
"
9
#include "
exportdef.h
"
10
11
namespace
PathEngine
{
12
class
PathPlanner;
13
class
Roadmap
;
14
typedef
boost::shared_ptr<Roadmap>
RoadmapPtr
;
15
19
class
HRPPLANNER_API
Roadmap
{
20
public
:
24
Roadmap
(
PathPlanner
*planner) : planner_(planner), m_nEdges(0) {}
25
31
~
Roadmap
();
32
37
void
addNode
(
RoadmapNodePtr
node) { nodes_.push_back(node); }
38
44
void
addEdge(
RoadmapNodePtr
from,
RoadmapNodePtr
to);
45
52
bool
removeEdge(
RoadmapNodePtr
from,
RoadmapNodePtr
to);
53
60
void
integrate(
RoadmapPtr
rdmp);
61
66
unsigned
int
nNodes
()
const
{
return
nodes_.size(); }
67
68
unsigned
int
nEdges
()
const
{
return
m_nEdges; }
69
75
RoadmapNodePtr
node(
unsigned
int
index);
76
83
void
findNearestNode(
const
Configuration
& cfg,
RoadmapNodePtr
&node,
double
&distance);
84
89
RoadmapNodePtr
lastAddedNode();
90
96
int
indexOfNode(
RoadmapNodePtr
node);
97
104
std::vector<RoadmapNodePtr > DFS(
RoadmapNodePtr
startNode,
RoadmapNodePtr
goalNode);
105
112
void
tryConnection(
RoadmapNodePtr
from,
RoadmapNodePtr
to,
bool
tryReversed=
true
);
113
117
void
clear();
118
private
:
122
std::vector<RoadmapNodePtr>
nodes_
;
123
PathPlanner
*
planner_
;
124
unsigned
int
m_nEdges
;
125
};
126
};
127
128
#endif
RoadmapNode.h
PathEngine::Roadmap::Roadmap
Roadmap(PathPlanner *planner)
コンストラクタ
Definition:
Roadmap.h:24
PathEngine::Roadmap::nEdges
unsigned int nEdges() const
Definition:
Roadmap.h:68
PathEngine::Roadmap::m_nEdges
unsigned int m_nEdges
Definition:
Roadmap.h:124
PathEngine::PathPlanner
計画経路エンジン
Definition:
hrplib/hrpPlanner/PathPlanner.h:44
PathEngine::Roadmap
ロードマップ
Definition:
Roadmap.h:19
PathEngine::Roadmap::addNode
void addNode(RoadmapNodePtr node)
ノードを追加する
Definition:
Roadmap.h:37
PathEngine::Roadmap::planner_
PathPlanner * planner_
Definition:
Roadmap.h:123
PathEngine::RoadmapNodePtr
boost::shared_ptr< RoadmapNode > RoadmapNodePtr
Definition:
RoadmapNode.h:11
PathEngine::RoadmapPtr
boost::shared_ptr< Roadmap > RoadmapPtr
Definition:
Roadmap.h:13
PathEngine
Definition:
Algorithm.h:13
PathEngine::Roadmap::nodes_
std::vector< RoadmapNodePtr > nodes_
ノードのリスト
Definition:
Roadmap.h:122
HRPPLANNER_API
#define HRPPLANNER_API
Definition:
exportdef.h:22
exportdef.h
PathEngine::Roadmap::nNodes
unsigned int nNodes() const
ノード数を取得する
Definition:
Roadmap.h:66
Configuration.h
PathEngine::Configuration
Definition:
Configuration.h:10
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