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
4eae9c4d
Commit
4eae9c4d
authored
Jul 09, 2009
by
florent
Committed by
florent
Jul 09, 2009
Browse files
Include "kwsioConfig.h" where needed and clean code.
* include/hppCore/hppProblem.h, * src/hppProblem.cpp.
parent
ab80dad9
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/hppCore/hppProblem.h
View file @
4eae9c4d
...
...
@@ -10,10 +10,12 @@
#define HPP_PROBLEM_H
#if DEBUG==3
#include "kwsioConfig.h"
#define HPPPROBLEM_ODEBUG3(x) std::cout << "ChppProblem:" << x << std::endl
#define HPPPROBLEM_ODEBUG2(x) std::cout << "ChppProblem:" << x << std::endl
#define HPPPROBLEM_ODEBUG1(x) std::cerr << "ChppProblem:" << x << std::endl
#elif DEBUG==2
#include "kwsioConfig.h"
#define HPPPROBLEM_ODEBUG3(x)
#define HPPPROBLEM_ODEBUG2(x) std::cout << "ChppProblem:" << x << std::endl
#define HPPPROBLEM_ODEBUG1(x) std::cerr << "ChppProblem:" << x << std::endl
...
...
src/hppProblem.cpp
View file @
4eae9c4d
...
...
@@ -195,32 +195,40 @@ CkwsSteeringMethodShPtr ChppProblem::steeringMethod() const
return
attRobot
->
steeringMethod
();
}
// ==========================================================================
ktStatus
ChppProblem
::
checkProblem
()
const
{
if
(
!
getRobot
())
{
ODEBUG1
(
":
solve
: no device in problem
"
<<
inRank
<<
"
."
);
ODEBUG1
(
":
checkProblem
: no device in problem."
);
return
KD_ERROR
;
}
if
(
!
initConfig
())
{
ODEBUG1
(
":
solve
: no init config in problem
"
<<
inRank
<<
"
."
);
ODEBUG1
(
":
checkProblem
: no init config in problem."
);
return
KD_ERROR
;
}
if
(
!
goalConfig
())
{
ODEBUG1
(
":
solve
: no goal config in problem
"
<<
inRank
<<
"
."
);
ODEBUG1
(
":
checkProblem
: no goal config in problem."
);
return
KD_ERROR
;
}
if
(
!
roadmapBuilder
()){
ODEBUG1
(
":
solve: problem Id="
<<
inRank
<<
"
:
D
efine a roadmap builder with penetration"
);
return
KD_ERROR
;
ODEBUG1
(
":
checkProblem
:
d
efine a roadmap builder with penetration"
);
return
KD_ERROR
;
}
if
(
!
steeringMethod
())
{
ODEBUG1
(
":checkProblem: define a steering method."
);
return
KD_ERROR
;
}
/*
Test that goal configuration is valid
*/
if
(
validateConfig
(
getRobot
(),
goalConfig
())
!=
KD_OK
)
{
ODEBUG1
(
"
:solve
: goal configuration not valid."
);
ODEBUG1
(
"
checkProblem:
: goal configuration not valid."
);
return
KD_ERROR
;
}
return
KD_OK
;
...
...
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