3 void RRTExt12::steer1(RRTNode &f, RRTNode &t)
5 // assume that `t` is circle uniformly sampled
6 auto bc = BicycleCar();
11 auto max_steer = bc.st();
12 // map t.h() in -PI...+PI to -max_steer...+max_steer
13 bc.st(2 * max_steer * this->udh_(this->gen_) / (2 * M_PI) - max_steer);
14 bc.sp((this->udy_(this->gen_) > 0.5) ? 0.2 : -0.2);
15 this->steered().clear();
20 this->steered().size() == 0
21 && std::get<0>(this->collide_two_nodes(f, n))
26 this->steered().size() > 0
27 && std::get<0>(this->collide_two_nodes(
28 this->steered().back(),
32 || this->steered().size() > 25
36 this->steered().push_back(RRTNode(bc));
41 this->samples().back().x(bc.x());
42 this->samples().back().y(bc.y());
43 this->samples().back().h(bc.h());