#include "rrtplanner.h"
#include "cost.h"
-#define KUWATA2008_CCOST CCO
+#define CATI(a, b) a ## b
+#define CAT(a, b) CATI(a, b)
+#define KUWATA2008_CCOST CAT(c, CO)
#define KUWATA2008_DCOST CO
LaValle1998::LaValle1998(RRTNode *init, RRTNode *goal):
#include "rrtnode.h"
float co1(RRTNode *init, RRTNode *goal);
+float cco1(RRTNode *init, RRTNode *goal);
float co2(RRTNode *init, RRTNode *goal);
-float co3(RRTNode *init, RRTNode *goal);
-float co4(RRTNode *init, RRTNode *goal);
+float cco2(RRTNode *init, RRTNode *goal);
#endif
return pow(pow(dx, 2) + pow(dy, 2), 0.5);
}
+float cco1(RRTNode *init, RRTNode *goal)
+{
+ return init->ccost() + co1(init, goal);
+}
+
float co2(RRTNode *init, RRTNode *goal)
{
double q0[] = {init->x(), init->y(), init->h()};
return static_cast<float>(rsss.distance(q0, q1));
}
-float co3(RRTNode *init, RRTNode *goal)
-{
- return init->ccost() + co1(init, goal);
-}
-
-float co4(RRTNode *init, RRTNode *goal)
+float cco2(RRTNode *init, RRTNode *goal)
{
return init->ccost() + co2(init, goal);
}