Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hpp-manipulation
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Humanoid Path Planner
hpp-manipulation
Commits
413a0f9f
Commit
413a0f9f
authored
10 years ago
by
Joseph Mirabel
Committed by
Joseph Mirabel
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Update Class graph::Graph and graph::NodeSelector
parent
abdb5ae2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/hpp/manipulation/graph/graph.hh
+32
-1
32 additions, 1 deletion
include/hpp/manipulation/graph/graph.hh
include/hpp/manipulation/graph/node-selector.hh
+20
-0
20 additions, 0 deletions
include/hpp/manipulation/graph/node-selector.hh
with
52 additions
and
1 deletion
include/hpp/manipulation/graph/graph.hh
+
32
−
1
View file @
413a0f9f
...
...
@@ -36,19 +36,50 @@ namespace hpp {
class
HPP_MANIPULATION_DLLAPI
Graph
{
public:
/// Create a new Graph.
static
GraphPtr_t
create
()
{
Graph
*
ptr
=
new
Graph
;
GraphPtr_t
shPtr
(
ptr
);
ptr
->
init
(
shPtr
);
return
shPtr
;
}
/// Create and insert a NodeSelector inside the graph.
NodeSelectorPtr_t
createNodeSelector
()
{
NodeSelectorPtr_t
newNodeSelector
=
NodeSelector
::
create
();
nodeSelectors_
.
push_back
(
newNodeSelector
);
return
newNodeSelector
;
}
/// Returns the states of a configuration.
virtual
Nodes_t
getNode
(
const
Configuration_t
config
)
const
;
/// Select randomly outgoing edges of the given nodes.
virtual
Edges_t
chooseEdge
(
const
Nodes_t
&
node
)
const
;
protected
:
/// Initialization of the object.
void
init
(
const
GraphWkPtr_t
&
weak
)
{
wkPtr_
=
weak
;
}
/// Constructor
Graph
()
{}
private
:
/// This list contains a node selector for each end-effector.
s
et
::
list
<
NodeSelectorPtr_t
>
nodeSelectors_
;
s
td
::
vector
<
NodeSelectorPtr_t
>
nodeSelectors_
;
/// A set of constraints that will always be used, for example
/// stability constraints.
ConstraintPtr_t
constraints_
;
/// Weak pointer to itself.
GraphWkPtr_t
wkPtr_
;
};
// Class Graph
}
// namespace graph
}
// namespace manipulation
...
...
This diff is collapsed.
Click to expand it.
include/hpp/manipulation/graph/node-selector.hh
+
20
−
0
View file @
413a0f9f
...
...
@@ -28,6 +28,15 @@ namespace hpp {
class
HPP_MANIPULATION_DLLAPI
NodeSelector
{
public:
/// Create a new NodeSelector.
static
NodeSelectorPtr_t
create
()
{
NodeSelector
*
ptr
=
new
NodeSelector
();
NodeSelectorPtr_t
shPtr
(
ptr
);
ptr
->
init
(
shPtr
);
return
shPtr
;
}
/// Create a nodes with the constraints
NodePtr_t
createNode
(
const
ConstraintPtr_t
&
constraints
)
{
...
...
@@ -42,6 +51,17 @@ namespace hpp {
/// Select randomly an outgoing edge of the given node.
virtual
EdgePtr_t
chooseEdge
(
const
NodePtr_t
&
node
)
const
;
protected
:
/// Initialization of the object.
void
init
(
const
GraphWkPtr_t
&
weak
)
{
wkPtr_
=
weak
;
}
/// Constructor
NodeSelector
()
{}
private
:
/// List of the states of one end-effector, ordered by priority.
std
::
vector
<
NodePtr_t
>
orderedStates_
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment