#include "reeds_shepp.h"
#include "steer.h"
+#define ST1COUNT 10
+#define ST1STEP 0.2
#define ST2WHEELBASE 2.450
#define ST2TURNINGRADI 10.82
#define ST2MAXSTEERING atan(ST2WHEELBASE / ST2TURNINGRADI)
float new_h;
std::vector<RRTNode *> nodes;
int i;
- for (i = 1; i < 2; i++) { // TODO
+ for (i = 1; i < ST1COUNT + 1; i++) {
angl = atan2(goal->y() - init->y(), goal->x() - init->x());
- new_x = init->x() + i * 1 * cos(angl); // TODO
- new_y = init->y() + i * 1 * sin(angl); // TODO
+ new_x = init->x() + i * ST1STEP * cos(angl);
+ new_y = init->y() + i * ST1STEP * sin(angl);
new_h = goal->h();
nodes.push_back(new RRTNode(new_x, new_y, new_h));
}