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
3dfaebdf
Commit
3dfaebdf
authored
8 years ago
by
Florent Lamiraux
Browse files
Options
Downloads
Plain Diff
Merge branch 'isae' into devel
parents
dbf46469
3d8cb46b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/hpp/manipulation/manipulation-planner.hh
+8
-7
8 additions, 7 deletions
include/hpp/manipulation/manipulation-planner.hh
src/graph/edge.cc
+13
-0
13 additions, 0 deletions
src/graph/edge.cc
src/manipulation-planner.cc
+31
-11
31 additions, 11 deletions
src/manipulation-planner.cc
with
52 additions
and
18 deletions
include/hpp/manipulation/manipulation-planner.hh
+
8
−
7
View file @
3dfaebdf
...
...
@@ -108,13 +108,14 @@ namespace hpp {
/// A Reason is associated to each EdgePtr_t that generated a failure.
enum
TypeOfFailure
{
PROJECTION
=
0
,
STEERING_METHOD
=
1
,
PATH_VALIDATION_ZERO
=
2
,
PATH_PROJECTION_ZERO
=
3
,
PATH_PROJECTION_SHORTER
=
4
,
PATH_VALIDATION_SHORTER
=
5
,
PARTLY_EXTENDED
=
6
PATH_PROJECTION_SHORTER
=
0
,
PATH_VALIDATION_SHORTER
=
1
,
REACHED_DESTINATION_NODE
=
2
,
FAILURE
=
3
,
PROJECTION
=
4
,
STEERING_METHOD
=
5
,
PATH_VALIDATION_ZERO
=
6
,
PATH_PROJECTION_ZERO
=
7
};
static
const
std
::
vector
<
Reason
>
reasons_
;
...
...
This diff is collapsed.
Click to expand it.
src/graph/edge.cc
+
13
−
0
View file @
3dfaebdf
...
...
@@ -207,11 +207,17 @@ namespace hpp {
g
->
insertNumericalConstraints
(
proj
);
insertNumericalConstraints
(
proj
);
to
()
->
insertNumericalConstraints
(
proj
);
if
(
node
()
==
from
())
{
from
()
->
insertNumericalConstraints
(
proj
);
}
constraint
->
addConstraint
(
proj
);
g
->
insertLockedJoints
(
proj
);
insertLockedJoints
(
proj
);
to
()
->
insertLockedJoints
(
proj
);
if
(
node
()
==
from
())
{
from
()
->
insertLockedJoints
(
proj
);
}
constraint
->
edge
(
wkPtr_
.
lock
());
return
constraint
;
...
...
@@ -280,6 +286,7 @@ namespace hpp {
constraints
->
configProjector
()
->
rightHandSideFromConfig
(
q1
);
if
(
constraints
->
isSatisfied
(
q1
))
{
if
(
constraints
->
isSatisfied
(
q2
))
{
if
(
q1
.
isApprox
(
q2
))
return
false
;
path
=
(
*
steeringMethod_
->
get
())
(
q1
,
q2
);
return
path
;
}
...
...
@@ -692,6 +699,9 @@ namespace hpp {
insertNumericalConstraints
(
proj
);
to
()
->
insertNumericalConstraints
(
proj
);
if
(
node
()
==
from
())
{
from
()
->
insertNumericalConstraints
(
proj
);
}
constraint
->
addConstraint
(
proj
);
g
->
insertLockedJoints
(
proj
);
...
...
@@ -701,6 +711,9 @@ namespace hpp {
}
insertLockedJoints
(
proj
);
to
()
->
insertLockedJoints
(
proj
);
if
(
node
()
==
from
())
{
from
()
->
insertLockedJoints
(
proj
);
}
constraint
->
edge
(
wkPtr_
.
lock
());
return
constraint
;
...
...
This diff is collapsed.
Click to expand it.
src/manipulation-planner.cc
+
31
−
11
View file @
3dfaebdf
...
...
@@ -66,13 +66,14 @@ namespace hpp {
const
std
::
vector
<
ManipulationPlanner
::
Reason
>
ManipulationPlanner
::
reasons_
=
boost
::
assign
::
list_of
(
SuccessBin
::
createReason
(
"[Fail] Projection"
))
(
SuccessBin
::
createReason
(
"[Fail] SteeringMethod"
))
(
SuccessBin
::
createReason
(
"[Fail] Path validation returned length 0"
))
(
SuccessBin
::
createReason
(
"[Fail] Path could not be projected"
))
(
SuccessBin
::
createReason
(
"[Info] Path could not be fully projected"
))
(
SuccessBin
::
createReason
(
"[Info] Path could not be fully validated"
))
(
SuccessBin
::
createReason
(
"[Info] Extended partly"
));
(
SuccessBin
::
createReason
(
"--Path could not be fully projected"
))
(
SuccessBin
::
createReason
(
"--Path could not be fully validated"
))
(
SuccessBin
::
createReason
(
"--Reached destination node"
))
(
SuccessBin
::
createReason
(
"Failure"
))
(
SuccessBin
::
createReason
(
"--Projection of configuration on edge leaf"
))
(
SuccessBin
::
createReason
(
"--SteeringMethod"
))
(
SuccessBin
::
createReason
(
"--Path validation returned length 0"
))
(
SuccessBin
::
createReason
(
"--Path could not be projected at all"
));
ManipulationPlannerPtr_t
ManipulationPlanner
::
create
(
const
core
::
Problem
&
problem
,
const
core
::
RoadmapPtr_t
&
roadmap
)
...
...
@@ -232,14 +233,21 @@ namespace hpp {
SuccessStatistics
&
es
=
edgeStat
(
edge
);
if
(
!
edge
->
applyConstraints
(
n_near
,
qProj_
))
{
HPP_STOP_TIMECOUNTER
(
applyConstraints
);
es
.
addFailure
(
reasons_
[
FAILURE
]);
es
.
addFailure
(
reasons_
[
PROJECTION
]);
return
false
;
}
if
(
qProj_
.
isApprox
(
*
q_near
))
{
es
.
addFailure
(
reasons_
[
FAILURE
]);
es
.
addFailure
(
reasons_
[
PATH_PROJECTION_ZERO
]);
return
false
;
}
HPP_STOP_TIMECOUNTER
(
applyConstraints
);
core
::
PathPtr_t
path
;
HPP_START_TIMECOUNTER
(
buildPath
);
if
(
!
edge
->
build
(
path
,
*
q_near
,
qProj_
))
{
HPP_STOP_TIMECOUNTER
(
buildPath
);
es
.
addFailure
(
reasons_
[
FAILURE
]);
es
.
addFailure
(
reasons_
[
STEERING_METHOD
]);
return
false
;
}
...
...
@@ -252,10 +260,10 @@ namespace hpp {
if
(
projShorter
)
{
if
(
!
projPath
||
projPath
->
length
()
==
0
)
{
HPP_STOP_TIMECOUNTER
(
projectPath
);
es
.
addFailure
(
reasons_
[
FAILURE
]);
es
.
addFailure
(
reasons_
[
PATH_PROJECTION_ZERO
]);
return
false
;
}
es
.
addFailure
(
reasons_
[
PATH_PROJECTION_SHORTER
]);
}
HPP_STOP_TIMECOUNTER
(
projectPath
);
}
else
projPath
=
path
;
...
...
@@ -269,16 +277,17 @@ namespace hpp {
(
projPath
,
false
,
fullValidPath
,
report
);
}
catch
(
const
core
::
projection_error
&
e
)
{
hppDout
(
error
,
e
.
what
());
es
.
addFailure
(
reasons_
[
FAILURE
]);
es
.
addFailure
(
reasons_
[
PATH_VALIDATION_ZERO
]);
return
false
;
}
HPP_STOP_TIMECOUNTER
(
validatePath
);
if
(
fullValidPath
->
length
()
==
0
)
{
es
.
addFailure
(
reasons_
[
FAILURE
]);
es
.
addFailure
(
reasons_
[
PATH_VALIDATION_ZERO
]);
validPath
=
fullValidPath
;
return
false
;
}
else
{
if
(
!
fullyValid
)
es
.
addFailure
(
reasons_
[
PATH_VALIDATION_SHORTER
]);
if
(
extendStep_
==
1
||
fullyValid
)
{
validPath
=
fullValidPath
;
}
else
{
...
...
@@ -289,6 +298,7 @@ namespace hpp {
(
core
::
interval_t
(
t_init
,
t_init
+
length
*
extendStep_
));
}
catch
(
const
core
::
projection_error
&
e
)
{
hppDout
(
error
,
e
.
what
());
es
.
addSuccess
();
es
.
addFailure
(
reasons_
[
PATH_PROJECTION_SHORTER
]);
return
false
;
}
...
...
@@ -296,8 +306,18 @@ namespace hpp {
hppDout
(
info
,
"Extension:"
<<
std
::
endl
<<
es
);
}
if
(
!
projShorter
&&
fullValidPath
)
es
.
addSuccess
();
else
es
.
addFailure
(
reasons_
[
PARTLY_EXTENDED
]);
if
(
!
projShorter
&&
fullValidPath
)
{
es
.
addSuccess
();
es
.
addFailure
(
reasons_
[
REACHED_DESTINATION_NODE
]);
}
else
{
es
.
addSuccess
();
if
(
projShorter
)
{
es
.
addFailure
(
reasons_
[
PATH_PROJECTION_SHORTER
]);
}
else
{
es
.
addFailure
(
reasons_
[
PATH_VALIDATION_SHORTER
]);
}
}
return
true
;
}
...
...
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