double _c = 0.0;
double _cc = 0.0;
RRTNode* _p = nullptr;
- unsigned int _cusp = 0;
+ unsigned int _cusp_cnt = 0;
int _segment_type = 0; // 0 ~ straight, 1 ~ left, -1 right
public:
/*! Get cost to parent. */
void p(RRTNode& p);
/*! Get number of backward-forward direction changes. */
- unsigned int cusp() const;
+ unsigned int cusp_cnt() const;
/*! Set number of backward-forward direction changes. */
- void cusp(RRTNode const& p);
+ void cusp_cnt(RRTNode const& p);
/*! \brief Get Reeds & Shepp segment type.
*
2 * M_PI - std::abs(t.h() - f.h()));
heur *= this->_bc.mtr();
cost = std::max(cost, heur);
- return cost + f.cusp() * 0.1;
+ return cost + f.cusp_cnt() * 0.1;
}
} // namespace rrts
}
unsigned int
-RRTNode::cusp() const
+RRTNode::cusp_cnt() const
{
- return this->_cusp;
+ return this->_cusp_cnt;
}
void
-RRTNode::cusp(RRTNode const& p)
+RRTNode::cusp_cnt(RRTNode const& p)
{
- this->_cusp = p.cusp();
+ this->_cusp_cnt = p.cusp_cnt();
if (this->sp() != p.sp() || this->sp() == 0.0) {
- this->_cusp++;
+ this->_cusp_cnt++;
}
}
RRTNode* t = &this->_nodes.back();
t->p(*f);
t->c(this->cost_build(*f, *t));
- t->cusp(*f);
+ t->cusp_cnt(*f);
this->_steered.erase(this->_steered.begin());
f = t;
}
t = &this->_nodes.back();
t->p(*f);
t->c(this->cost_build(*f, *t));
- t->cusp(*f);
+ t->cusp_cnt(*f);
this->_steered.erase(this->_steered.begin());
return true;
}