Skip to content
Snippets Groups Projects
Commit 4ebe572a authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel
Browse files

Add debug output

parent 60d3ac74
No related branches found
No related tags found
No related merge requests found
...@@ -40,6 +40,8 @@ ...@@ -40,6 +40,8 @@
#include <hpp/manipulation/graph/guided-state-selector.hh> #include <hpp/manipulation/graph/guided-state-selector.hh>
#include <hpp/manipulation/problem-solver.hh> #include <hpp/manipulation/problem-solver.hh>
#define CASE_TO_STRING(var, value) ( (var & value) ? std::string(#value) : std::string() )
namespace hpp { namespace hpp {
namespace manipulation { namespace manipulation {
namespace graph { namespace graph {
...@@ -139,6 +141,17 @@ namespace hpp { ...@@ -139,6 +141,17 @@ namespace hpp {
static inline const StatePtr_t& Nintersec (const StateArray& n) { assert (intersec); return n[1 + (pregrasp?1:0)]; } static inline const StatePtr_t& Nintersec (const StateArray& n) { assert (intersec); return n[1 + (pregrasp?1:0)]; }
static inline const StatePtr_t& Npreplace (const StateArray& n) { assert (preplace); return n[1 + (pregrasp?1:0) + (intersec?1:0)]; } static inline const StatePtr_t& Npreplace (const StateArray& n) { assert (preplace); return n[1 + (pregrasp?1:0) + (intersec?1:0)]; }
static inline std::string caseToString ()
{
return CASE_TO_STRING (gCase, NoGrasp)
+ CASE_TO_STRING (gCase, GraspOnly)
+ CASE_TO_STRING (gCase, WithPreGrasp)
+ " - "
+ CASE_TO_STRING (gCase, NoPlace)
+ CASE_TO_STRING (gCase, PlaceOnly)
+ CASE_TO_STRING (gCase, WithPrePlace);
}
static inline EdgePtr_t makeWE ( static inline EdgePtr_t makeWE (
const std::string& name, const std::string& name,
const StatePtr_t& from, const StatePtr_t& to, const StatePtr_t& from, const StatePtr_t& to,
...@@ -331,6 +344,8 @@ namespace hpp { ...@@ -331,6 +344,8 @@ namespace hpp {
const FoliatedManifold& submanifoldDef) const FoliatedManifold& submanifoldDef)
{ {
typedef CaseTraits<gCase> T; typedef CaseTraits<gCase> T;
hppDout (info, "Creating edges " << forwName << " and " << backName
<< "\ncase is " << T::caseToString ());
assert (T::valid && "Not a valid case."); assert (T::valid && "Not a valid case.");
typedef typename T::StateArray StateArray; typedef typename T::StateArray StateArray;
typedef typename T::EdgeArray EdgeArray; typedef typename T::EdgeArray EdgeArray;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment