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
5ae2433c
Commit
5ae2433c
authored
5 years ago
by
Joseph Mirabel
Browse files
Options
Downloads
Patches
Plain Diff
Make GraphPathValidation not mandatory (may be deleted ?)
parent
f8bc475d
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/hpp/manipulation/problem.hh
+4
-2
4 additions, 2 deletions
include/hpp/manipulation/problem.hh
src/problem-solver.cc
+24
-4
24 additions, 4 deletions
src/problem-solver.cc
src/problem.cc
+10
-8
10 additions, 8 deletions
src/problem.cc
with
38 additions
and
14 deletions
include/hpp/manipulation/problem.hh
+
4
−
2
View file @
5ae2433c
...
@@ -49,9 +49,11 @@ namespace hpp {
...
@@ -49,9 +49,11 @@ namespace hpp {
/// Check whether the problem is well formulated.
/// Check whether the problem is well formulated.
virtual
void
checkProblem
()
const
;
virtual
void
checkProblem
()
const
;
///
Get the path validation as a GraphPathValidation
///
Expose parent method.
Graph
PathValidationPtr_t
pathValidation
()
const
;
PathValidationPtr_t
pathValidation
()
const
;
/// \param pathValidation if of type GraphPathValidation, sets
/// its constraint graph to Problem::constraintGraph()
void
pathValidation
(
const
PathValidationPtr_t
&
pathValidation
);
void
pathValidation
(
const
PathValidationPtr_t
&
pathValidation
);
/// Get the steering method as a SteeringMethod
/// Get the steering method as a SteeringMethod
...
...
This diff is collapsed.
Click to expand it.
src/problem-solver.cc
+
24
−
4
View file @
5ae2433c
...
@@ -32,6 +32,10 @@
...
@@ -32,6 +32,10 @@
#include
<hpp/core/path-projector/dichotomy.hh>
#include
<hpp/core/path-projector/dichotomy.hh>
#include
<hpp/core/path-projector/global.hh>
#include
<hpp/core/path-projector/global.hh>
#include
<hpp/core/path-projector/recursive-hermite.hh>
#include
<hpp/core/path-projector/recursive-hermite.hh>
#include
<hpp/core/path-validation/discretized-collision-checking.hh>
#include
<hpp/core/path-validation/discretized-joint-bound.hh>
#include
<hpp/core/continuous-validation/dichotomy.hh>
#include
<hpp/core/continuous-validation/progressive.hh>
#include
<hpp/core/roadmap.hh>
#include
<hpp/core/roadmap.hh>
#include
<hpp/core/steering-method/dubins.hh>
#include
<hpp/core/steering-method/dubins.hh>
#include
<hpp/core/steering-method/hermite.hh>
#include
<hpp/core/steering-method/hermite.hh>
...
@@ -74,6 +78,16 @@ namespace hpp {
...
@@ -74,6 +78,16 @@ namespace hpp {
static
bool
removeLockedJoints
()
{
return
false
;
}
static
bool
removeLockedJoints
()
{
return
false
;
}
};
};
#define MAKE_GRAPH_PATH_VALIDATION_BUILDER(name, function) \
PathValidationPtr_t create ## name ## GraphPathValidation ( \
const core::DevicePtr_t& robot, const value_type& stepSize) \
{ \
return GraphPathValidation::create (function (robot, stepSize)); \
}
MAKE_GRAPH_PATH_VALIDATION_BUILDER
(
DiscretizedCollision
,
core
::
pathValidation
::
createDiscretizedCollisionChecking
)
MAKE_GRAPH_PATH_VALIDATION_BUILDER
(
DiscretizedJointBound
,
core
::
pathValidation
::
createDiscretizedJointBound
)
//MAKE_GRAPH_PATH_VALIDATION_BUILDER(DiscretizedCollisionAndJointBound, createDiscretizedJointBoundAndCollisionChecking)
template
<
typename
ParentSM_t
,
typename
ChildSM_t
>
template
<
typename
ParentSM_t
,
typename
ChildSM_t
>
core
::
SteeringMethodPtr_t
createSMWithGuess
core
::
SteeringMethodPtr_t
createSMWithGuess
(
const
core
::
Problem
&
problem
)
(
const
core
::
Problem
&
problem
)
...
@@ -110,6 +124,15 @@ namespace hpp {
...
@@ -110,6 +124,15 @@ namespace hpp {
pathPlanners
.
add
(
"M-RRT"
,
ManipulationPlanner
::
create
);
pathPlanners
.
add
(
"M-RRT"
,
ManipulationPlanner
::
create
);
pathPlanners
.
add
(
"SymbolicPlanner"
,
SymbolicPlanner
::
create
);
pathPlanners
.
add
(
"SymbolicPlanner"
,
SymbolicPlanner
::
create
);
pathValidations
.
add
(
"Graph-Discretized"
,
createDiscretizedCollisionGraphPathValidation
);
pathValidations
.
add
(
"Graph-DiscretizedCollision"
,
createDiscretizedCollisionGraphPathValidation
);
pathValidations
.
add
(
"Graph-DiscretizedJointBound"
,
createDiscretizedJointBoundGraphPathValidation
);
//pathValidations.add ("Graph-DiscretizedCollisionAndJointBound", createDiscretizedCollisionAndJointBoundGraphPathValidation);
pathValidations
.
add
(
"Graph-Dichotomy"
,
GraphPathValidation
::
create
<
core
::
continuousValidation
::
Dichotomy
>
);
pathValidations
.
add
(
"Graph-Progressive"
,
GraphPathValidation
::
create
<
core
::
continuousValidation
::
Progressive
>
);
pathValidationType
(
"Graph-Discretized"
,
0.05
);
pathOptimizers
.
add
(
"RandomShortcut"
,
pathOptimizers
.
add
(
"RandomShortcut"
,
pathOptimization
::
RandomShortcut
::
create
);
pathOptimization
::
RandomShortcut
::
create
);
pathOptimizers
.
add
(
"Graph-RandomShortcut"
,
pathOptimizers
.
add
(
"Graph-RandomShortcut"
,
...
@@ -179,11 +202,8 @@ namespace hpp {
...
@@ -179,11 +202,8 @@ namespace hpp {
{
{
problem_
=
problem
;
problem_
=
problem
;
core
::
ProblemSolver
::
initializeProblem
(
problem_
);
core
::
ProblemSolver
::
initializeProblem
(
problem_
);
if
(
constraintGraph_
)
{
if
(
constraintGraph_
)
problem_
->
constraintGraph
(
constraintGraph_
);
problem_
->
constraintGraph
(
constraintGraph_
);
if
(
problem_
->
pathValidation
())
problem_
->
pathValidation
()
->
constraintGraph
(
constraintGraph_
);
}
}
}
void
ProblemSolver
::
constraintGraph
(
const
std
::
string
&
graphName
)
void
ProblemSolver
::
constraintGraph
(
const
std
::
string
&
graphName
)
...
...
This diff is collapsed.
Click to expand it.
src/problem.cc
+
10
−
8
View file @
5ae2433c
...
@@ -51,24 +51,24 @@ namespace hpp {
...
@@ -51,24 +51,24 @@ namespace hpp {
{
{
graph_
=
graph
;
graph_
=
graph
;
graph_
->
problem
(
wkPtr_
.
lock
());
graph_
->
problem
(
wkPtr_
.
lock
());
if
(
pathValidation
())
pathValidation
()
->
constraintGraph
(
graph
);
GraphPathValidationPtr_t
pv
=
HPP_DYNAMIC_PTR_CAST
(
GraphPathValidation
,
pathValidation
());
if
(
pv
)
pv
->
constraintGraph
(
graph_
);
WeighedDistancePtr_t
d
=
HPP_DYNAMIC_PTR_CAST
(
WeighedDistance
,
WeighedDistancePtr_t
d
=
HPP_DYNAMIC_PTR_CAST
(
WeighedDistance
,
distance
());
distance
());
if
(
d
)
d
->
constraintGraph
(
graph
);
if
(
d
)
d
->
constraintGraph
(
graph
);
}
}
Graph
PathValidationPtr_t
Problem
::
pathValidation
()
const
PathValidationPtr_t
Problem
::
pathValidation
()
const
{
{
return
HPP_DYNAMIC_PTR_CAST
(
GraphPathValidation
,
return
Parent
::
pathValidation
();
Parent
::
pathValidation
());
}
}
void
Problem
::
pathValidation
(
const
PathValidationPtr_t
&
pathValidation
)
void
Problem
::
pathValidation
(
const
PathValidationPtr_t
&
pathValidation
)
{
{
GraphPathValidationPtr_t
pv
(
GraphPathValidation
::
create
(
pathValidation
)
)
;
GraphPathValidationPtr_t
pv
=
HPP_DYNAMIC_PTR_CAST
(
GraphPathValidation
,
pathValidation
);
pv
->
constraintGraph
(
graph_
);
if
(
pv
)
pv
->
constraintGraph
(
graph_
);
Parent
::
pathValidation
(
p
v
);
Parent
::
pathValidation
(
p
athValidation
);
}
}
PathValidationPtr_t
Problem
::
pathValidationFactory
()
const
PathValidationPtr_t
Problem
::
pathValidationFactory
()
const
...
@@ -79,6 +79,8 @@ namespace hpp {
...
@@ -79,6 +79,8 @@ namespace hpp {
for
(
core
::
ObjectStdVector_t
::
const_iterator
_obs
=
obstacles
.
begin
();
for
(
core
::
ObjectStdVector_t
::
const_iterator
_obs
=
obstacles
.
begin
();
_obs
!=
obstacles
.
end
();
++
_obs
)
_obs
!=
obstacles
.
end
();
++
_obs
)
pv
->
addObstacle
(
*
_obs
);
pv
->
addObstacle
(
*
_obs
);
GraphPathValidationPtr_t
gpv
=
HPP_DYNAMIC_PTR_CAST
(
GraphPathValidation
,
pv
);
if
(
gpv
)
return
gpv
->
innerValidation
();
return
pv
;
return
pv
;
}
}
...
...
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