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
Guilhem Saurel
hpp-manipulation
Commits
4f9cd9dd
Commit
4f9cd9dd
authored
10 years ago
by
Joseph Mirabel
Committed by
Joseph Mirabel
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
ManipulationPlanner use pathProjector::Progressive instead of Dichotomy.
parent
5c975724
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/hpp/manipulation/manipulation-planner.hh
+9
-6
9 additions, 6 deletions
include/hpp/manipulation/manipulation-planner.hh
src/manipulation-planner.cc
+14
-11
14 additions, 11 deletions
src/manipulation-planner.cc
with
23 additions
and
17 deletions
include/hpp/manipulation/manipulation-planner.hh
+
9
−
6
View file @
4f9cd9dd
...
@@ -86,14 +86,15 @@ namespace hpp {
...
@@ -86,14 +86,15 @@ namespace hpp {
PROJECTION
,
PROJECTION
,
STEERING_METHOD
,
STEERING_METHOD
,
PATH_VALIDATION
,
PATH_VALIDATION
,
PATH_PROJECTION
PATH_PROJECTION_SHORTER
,
PATH_PROJECTION_ZERO
};
};
struct
Reasons
{
struct
Reasons
{
typedef
::
hpp
::
statistics
::
SuccessBin
::
Reason
Reason
;
typedef
::
hpp
::
statistics
::
SuccessBin
::
Reason
Reason
;
Reason
projFailed
,
smFailed
,
pvFailed
,
pproj
Failed
;
Reason
projFailed
,
smFailed
,
pvFailed
,
pproj
Shorter
,
pprojZero
;
Reasons
(
const
Reason
&
proj
,
const
Reason
&
sm
,
const
Reason
&
pv
,
const
Reason
&
pp
)
:
Reasons
(
const
Reason
&
proj
,
const
Reason
&
sm
,
const
Reason
&
pv
,
const
Reason
&
pp
s
,
const
Reason
&
ppz
)
:
projFailed
(
proj
),
smFailed
(
sm
),
pvFailed
(
pv
),
pproj
Failed
(
pp
)
{}
projFailed
(
proj
),
smFailed
(
sm
),
pvFailed
(
pv
),
pproj
Shorter
(
pps
),
pprojZero
(
pp
z
)
{}
const
Reason
&
get
(
TypeOfFailure
t
)
const
Reason
&
get
(
TypeOfFailure
t
)
{
{
switch
(
t
)
{
switch
(
t
)
{
...
@@ -103,8 +104,10 @@ namespace hpp {
...
@@ -103,8 +104,10 @@ namespace hpp {
return
smFailed
;
return
smFailed
;
case
PATH_VALIDATION
:
case
PATH_VALIDATION
:
return
pvFailed
;
return
pvFailed
;
case
PATH_PROJECTION
:
case
PATH_PROJECTION_SHORTER
:
return
pprojFailed
;
return
pprojShorter
;
case
PATH_PROJECTION_ZERO
:
return
pprojZero
;
}
}
return
::
hpp
::
statistics
::
SuccessBin
::
REASON_UNKNOWN
;
return
::
hpp
::
statistics
::
SuccessBin
::
REASON_UNKNOWN
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/manipulation-planner.cc
+
14
−
11
View file @
4f9cd9dd
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
#include
"hpp/manipulation/problem.hh"
#include
"hpp/manipulation/problem.hh"
#include
"hpp/manipulation/path-projector.hh"
#include
"hpp/manipulation/path-projector.hh"
#include
"hpp/manipulation/path-projector/dichotomy.hh"
#include
"hpp/manipulation/path-projector/dichotomy.hh"
#include
"hpp/manipulation/path-projector/progressive.hh"
#include
"hpp/manipulation/manipulation-planner.hh"
#include
"hpp/manipulation/manipulation-planner.hh"
#include
"hpp/manipulation/graph/edge.hh"
#include
"hpp/manipulation/graph/edge.hh"
...
@@ -52,7 +53,6 @@ namespace hpp {
...
@@ -52,7 +53,6 @@ namespace hpp {
return
false
;
return
false
;
}
}
void
ManipulationPlanner
::
oneStep
()
void
ManipulationPlanner
::
oneStep
()
{
{
RobotPtr_t
robot
=
HPP_DYNAMIC_PTR_CAST
(
Robot
,
problem
().
robot
());
RobotPtr_t
robot
=
HPP_DYNAMIC_PTR_CAST
(
Robot
,
problem
().
robot
());
...
@@ -120,8 +120,11 @@ namespace hpp {
...
@@ -120,8 +120,11 @@ namespace hpp {
}
}
core
::
PathPtr_t
projPath
;
core
::
PathPtr_t
projPath
;
if
(
!
pathProjector_
->
apply
(
path
,
projPath
))
{
if
(
!
pathProjector_
->
apply
(
path
,
projPath
))
{
addFailure
(
PATH_PROJECTION
,
edge
);
if
(
!
projPath
||
projPath
->
length
()
==
0
)
{
if
(
!
projPath
||
projPath
->
length
()
==
0
)
return
false
;
addFailure
(
PATH_PROJECTION_ZERO
,
edge
);
return
false
;
}
addFailure
(
PATH_PROJECTION_SHORTER
,
edge
);
}
}
GraphPathValidationPtr_t
pathValidation
(
problem_
.
pathValidation
());
GraphPathValidationPtr_t
pathValidation
(
problem_
.
pathValidation
());
pathValidation
->
validate
(
projPath
,
false
,
validPath
);
pathValidation
->
validate
(
projPath
,
false
,
validPath
);
...
@@ -140,19 +143,19 @@ namespace hpp {
...
@@ -140,19 +143,19 @@ namespace hpp {
{
{
EdgeReasonMap
::
iterator
it
=
failureReasons_
.
find
(
edge
);
EdgeReasonMap
::
iterator
it
=
failureReasons_
.
find
(
edge
);
if
(
it
==
failureReasons_
.
end
())
{
if
(
it
==
failureReasons_
.
end
())
{
std
::
string
edgeStr
=
"("
+
edge
->
name
()
+
")"
;
std
::
string
edgeStr
=
edge
->
name
()
+
" - "
;
Reasons
r
(
SuccessBin
::
createReason
(
"Projection for "
+
edgeStr
),
Reasons
r
(
SuccessBin
::
createReason
(
edgeStr
+
"Projection"
),
SuccessBin
::
createReason
(
"SteeringMethod for "
+
edgeStr
),
SuccessBin
::
createReason
(
edgeStr
+
"SteeringMethod"
),
SuccessBin
::
createReason
(
"PathValidation returned length 0 for "
+
edgeStr
),
SuccessBin
::
createReason
(
edgeStr
+
"PathValidation returned length 0"
),
SuccessBin
::
createReason
(
"Path could not be fully projected for "
+
edgeStr
));
SuccessBin
::
createReason
(
edgeStr
+
"Path could not be fully projected"
),
SuccessBin
::
createReason
(
edgeStr
+
"Path could not be projected"
));
failureReasons_
.
insert
(
EdgeReasonPair
(
edge
,
r
));
failureReasons_
.
insert
(
EdgeReasonPair
(
edge
,
r
));
extendStatistics_
.
addFailure
(
r
.
get
(
t
));
extendStatistics_
.
addFailure
(
r
.
get
(
t
));
return
;
return
;
}
}
Reasons
r
=
it
->
second
;
Reasons
r
=
it
->
second
;
extendStatistics_
.
addFailure
(
r
.
get
(
t
));
extendStatistics_
.
addFailure
(
r
.
get
(
t
));
hppDout
(
info
,
"Extension failed."
<<
std
::
endl
hppDout
(
info
,
"Extension failed."
<<
std
::
endl
<<
extendStatistics_
);
<<
extendStatistics_
);
}
}
inline
void
ManipulationPlanner
::
tryConnect
(
const
core
::
Nodes_t
nodes
)
inline
void
ManipulationPlanner
::
tryConnect
(
const
core
::
Nodes_t
nodes
)
...
@@ -195,7 +198,7 @@ namespace hpp {
...
@@ -195,7 +198,7 @@ namespace hpp {
const
core
::
RoadmapPtr_t
&
roadmap
)
:
const
core
::
RoadmapPtr_t
&
roadmap
)
:
core
::
PathPlanner
(
problem
,
roadmap
),
core
::
PathPlanner
(
problem
,
roadmap
),
shooter_
(
new
core
::
BasicConfigurationShooter
(
problem
.
robot
())),
shooter_
(
new
core
::
BasicConfigurationShooter
(
problem
.
robot
())),
problem_
(
problem
),
pathProjector_
(
new
pathProjector
::
Dichotomy
(
problem_
.
distance
(),
0.
1
)),
problem_
(
problem
),
pathProjector_
(
new
pathProjector
::
Progressive
(
problem_
.
distance
(),
0.
2
)),
qProj_
(
problem
.
robot
()
->
configSize
())
qProj_
(
problem
.
robot
()
->
configSize
())
{}
{}
...
...
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