Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Humanoid Path Planner
hpp-core
Commits
68a10403
Commit
68a10403
authored
Mar 05, 2008
by
florent
Browse files
In ChppPlanner::solveOneProblem, try direct path before roadmap builder.
parent
a0804289
Changes
3
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
68a10403
2008/03/05
35. In ChppPlanner::solveOneProblem, try direct path before roadmap builder.
hppCore 1.3 released February 18, 2008
34. Added remove functions for hppProblemVector
...
...
doc/additionalDoc/hppCore.h
View file @
68a10403
/** \mainpage
\section sec_intro Introduction
\section
hppCore_
sec_intro Introduction
This package implements basic classes used as interfaces with KineoWorks.
The main classes are:
...
...
src/hppPlanner.cpp
View file @
68a10403
...
...
@@ -432,8 +432,30 @@ ktStatus ChppPlanner::solveOneProblem(unsigned int problemId)
if
(
!
goalConfig
)
return
KD_ERROR
;
/*
Try first a direct path.
*/
CkwsSteeringMethodShPtr
steeringMethod
=
hppDevice
->
steeringMethod
();
if
(
initConfig
&&
goalConfig
&&
steeringMethod
)
{
CkwsDirectPathShPtr
directPath
=
steeringMethod
->
makeDirectPath
(
*
initConfig
,
*
goalConfig
);
hppDevice
->
directPathValidators
()
->
validate
(
*
directPath
);
if
(
directPath
->
isValid
())
{
kwsPath
=
CkwsPath
::
create
(
hppDevice
);
kwsPath
->
appendDirectPath
(
directPath
);
// Add the path to vector of paths of the problem.
hppProblem
.
addPath
(
kwsPath
);
return
KD_OK
;
}
}
else
{
cerr
<<
" ChppPlanner::solveOneProblem: problem ill-defined:initConfig, GoalConfig or steering method not defined"
<<
endl
;
return
KD_ERROR
;
}
// solve the problem with the roadmapBuilder
if
(
initConfig
&&
goalConfig
&&
hppProblem
.
roadmapBuilder
()
)
{
if
(
hppProblem
.
roadmapBuilder
())
{
if
(
KD_OK
==
hppProblem
.
roadmapBuilder
()
->
solveProblem
(
*
initConfig
,
*
goalConfig
,
kwsPath
))
{
cout
<<
"--- Problem solved.----"
<<
endl
;
...
...
@@ -458,7 +480,7 @@ ktStatus ChppPlanner::solveOneProblem(unsigned int problemId)
// Add the path to vector of paths of the problem.
hppProblem
.
addPath
(
kwsPath
);
}
else
{
cerr
<<
" ChppPlanner::solveOneProblem:
problem ill-defined:initConfig, GoalConfig or R
oadmap
B
uilder
not initialised
"
<<
endl
;
cerr
<<
" ChppPlanner::solveOneProblem:
no r
oadmap
b
uilder"
<<
endl
;
return
KD_ERROR
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment