In-slot paths is better name as the variable is a vector of vectors.
Moreover, entries will be used for just entries in the following
patches.
Line _curb;
Line _front;
public:
- std::vector<std::vector<BicycleCar>> _entries;
+ std::vector<std::vector<BicycleCar>> _ispaths;
/*! \brief Set parking slot.
\param p Point with `x`, `y` coordinates of entry side's corner.
double d = 0;
double fd = 0;
unsigned int cd = 0;
- if (s._entries.size() > 0) {
- for (unsigned int i = 1; i < s._entries.size(); i++) {
- double dd = std::abs(s._entries[i].front().h()
- - s._entries[i - 1].front().h());
+ if (s._ispaths.size() > 0) {
+ for (unsigned int i = 1; i < s._ispaths.size(); i++) {
+ double dd = std::abs(s._ispaths[i].front().h()
+ - s._ispaths[i - 1].front().h());
if (dd <= 0.0001) {
d += dd;
} else {
P(RR_POINT)
for (auto& m: V) {
- m.c = s._entries.front().front();
+ m.c = s._ispaths.front().front();
m.c.sp(m.c.sp() * -1.0);
m.c.st(m.c.st() * -1.0);
}
&& pr.e() == 0.0)) {
std::cout << w << " " << len << " ";
std::cout << max_cusp << " ";
- std::cout << s._entries.size() << " ";
- auto f = s._entries.front().front();
- auto b = s._entries.back().front();
+ std::cout << s._ispaths.size() << " ";
+ auto f = s._ispaths.front().front();
+ auto b = s._ispaths.back().front();
std::cout << f.x() << " " << f.y() << " ";
std::cout << f.h() << " ";
std::cout << b.x() << " " << b.y() << " ";
for (auto s: starts) {
auto r = this->drive_in_slot(s);
if (r.size() > 0) {
- this->_entries.push_back(r);
+ this->_ispaths.push_back(r);
}
}
- if (this->_entries.size() == 0) {
+ if (this->_ispaths.size() == 0) {
return PoseRange(Pose(0.0, 0.0, 0.0), Pose(0.0, 0.0, 0.0));
}
- if (this->_entries.size() == 1) {
- auto f = this->_entries.front().front();
+ if (this->_ispaths.size() == 1) {
+ auto f = this->_ispaths.front().front();
return PoseRange(f, f);
}
- auto& c1 = this->_entries.front().front();
- auto& c2 = this->_entries.back().front();
+ auto& c1 = this->_ispaths.front().front();
+ auto& c2 = this->_ispaths.back().front();
PoseRange p(c1, c2);
if (swapped) {
this->swap_side();