Add bicycle car and maximum number of cusp car states as arguments for
find entry method.
*/
std::vector<BicycleCar> drive_in_slot(BicycleCar c, unsigned int& max);
- /*! Find entry. */
- PoseRange fe();
+ /*! \brief Find entry.
+ *
+ * \param c For which `BicycleCar` should entry be found?
+ * \param max Maximum number of backward-forward direction changes.
+ */
+ PoseRange fe(BicycleCar c, unsigned int& max);
friend std::ostream& operator<<(std::ostream& o, ParkingSlot const& s);
};
}
PoseRange
-ParkingSlot::fe()
+ParkingSlot::fe(BicycleCar c, unsigned int& max)
{
assert(this->parallel());
assert(this->right());
- BicycleCar c;
c.h(this->h());
double clen = this->offset_ + this->len() - c.df();
double cw = this->offset_ + c.w() / 2.0;
starts.push_back(c);
}
std::vector<std::vector<BicycleCar>> entries;
- unsigned int max_cusp = 10;
for (auto s: starts) {
- auto r = this->drive_in_slot(s, max_cusp);
+ auto r = this->drive_in_slot(s, max);
if (r.size() > 0) {
entries.push_back(r);
}