auto max_steer = bc.st();
// map t.h() in -PI...+PI to -max_steer...+max_steer
bc.st(2 * max_steer * this->udh_(this->gen_) / (2 * M_PI) - max_steer);
- bc.sp((this->udy_(this->gen_) > 0.5) ? 0.2 : -0.2);
+ bc.sp((this->udy_(this->gen_) > 0.5) ? 0.5 : -0.5);
this->steered().clear();
while (true) {
bc.next();
if (sqrt(
pow(f->x() - t->x(), 2)
+ pow(f->y() - t->y(), 2)
- ) > 0.2)
+ ) > 0.5)
return false;
// cont.
this->store_node(this->steered().front());
std::vector<RRTNode *> RRTExt8::nv(RRTNode &t)
{
- double cost = std::min(GAMMA(this->nodes().size()), 0.2);
+ double cost = std::min(GAMMA(this->nodes().size()), 0.5);
std::vector<RRTNode *> n;
this->nv(n, t, this->kdroot_, 0, cost);
return n;
double q0[] = {f.x(), f.y(), f.h()};
double q1[] = {t.x(), t.y(), t.h()};
ReedsSheppStateSpace rsss(this->bc.mtr());
- rsss.sample(q0, q1, 0.2, cb_rs_steer, &this->steered());
+ rsss.sample(q0, q1, 0.5, cb_rs_steer, &this->steered());
}
void RRTS::tmp_steer(RRTNode &f, RRTNode &t)
{
double q0[] = {f.x(), f.y(), f.h()};
double q1[] = {t.x(), t.y(), t.h()};
ReedsSheppStateSpace rsss(this->bc.mtr());
- rsss.sample(q0, q1, 0.2, cb_rs_steer, &this->tmp_steered_);
+ rsss.sample(q0, q1, 0.5, cb_rs_steer, &this->tmp_steered_);
}
void RRTS::steer1(RRTNode &f, RRTNode &t)