From: Jiri Vlasak Date: Thu, 12 Nov 2020 10:17:12 +0000 (+0100) Subject: Output goal and entry in json X-Git-Tag: v0.6.0~5^2~1 X-Git-Url: http://rtime.felk.cvut.cz/gitweb/hubacji1/rrts.git/commitdiff_plain/caafaf1b24c860836dd2534065706477ab1b6d0e Output goal and entry in json --- diff --git a/src/rrts.cc b/src/rrts.cc index 066fc12..e5f0334 100644 --- a/src/rrts.cc +++ b/src/rrts.cc @@ -487,9 +487,12 @@ Json::Value RRTS::json() { if (this->path().size() > 0) { jvo["cost"] = cc(*this->path().back()); - jvo["goal"][0] = this->path().back()->x(); - jvo["goal"][1] = this->path().back()->y(); - jvo["goal"][2] = this->path().back()->h(); + jvo["entry"][0] = this->goals().front().x(); + jvo["entry"][1] = this->goals().front().y(); + jvo["entry"][2] = this->goals().front().h(); + jvo["goal"][0] = this->goals().back().x(); + jvo["goal"][1] = this->goals().back().y(); + jvo["goal"][2] = this->goals().back().h(); } } {