/*! Return elapsed time. */
double scnt() const;
- /*! Set start. */
- void start(double x, double y, double h);
+ /*! Set init pose. */
+ void set_init_pose_to(Pose const& p);
/*! Get path. */
std::vector<Pose> path() const;
}
void
-RRTS::start(double x, double y, double h)
+RRTS::set_init_pose_to(Pose const& p)
{
- this->_nodes.front().x(x);
- this->_nodes.front().y(y);
- this->_nodes.front().h(h);
+ this->_nodes.front().x(p.x());
+ this->_nodes.front().y(p.y());
+ this->_nodes.front().h(p.h());
}
std::vector<Pose>
{
assert(jvi["init"] != Json::nullValue);
assert(jvi["goal"] != Json::nullValue);
- this->start(
+ this->set_init_pose_to(Pose(
jvi["init"][0].asDouble(),
jvi["init"][1].asDouble(),
- jvi["init"][2].asDouble());
+ jvi["init"][2].asDouble()));
if (jvi["goal"].size() == 4) {
this->goal(
jvi["goal"][0].asDouble(),