From ec79ce8bf46ebedeac36e7f38a7a735040670f53 Mon Sep 17 00:00:00 2001 From: Jiri Vlasak Date: Thu, 16 Mar 2023 14:42:25 +0100 Subject: [PATCH] Fix car dimension settings in test template --- rrts/incl/rrts.hh | 3 +++ rrts/src/rrts.cc | 6 ++++++ src/template-with-reset.cc | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/rrts/incl/rrts.hh b/rrts/incl/rrts.hh index 6f66e7a..2e85862 100644 --- a/rrts/incl/rrts.hh +++ b/rrts/incl/rrts.hh @@ -125,6 +125,9 @@ public: /*! Set pose of the bicycle car used in the planner. */ void set_bc_pose_to(Pose const& p); + /*! Set bicycle car dimensions. */ + void set_bc_to_become(std::string what); + /*! Get goal. */ RRTGoal const& goal(void) const; diff --git a/rrts/src/rrts.cc b/rrts/src/rrts.cc index 2c58e49..7cd4684 100644 --- a/rrts/src/rrts.cc +++ b/rrts/src/rrts.cc @@ -279,6 +279,12 @@ RRTS::set_bc_pose_to(Pose const& p) this->_bc.set_pose_to(p); } +void +RRTS::set_bc_to_become(std::string what) +{ + this->_bc.become(what); +} + RRTGoal const& RRTS::goal(void) const { diff --git a/src/template-with-reset.cc b/src/template-with-reset.cc index bd9d972..c1ac6d9 100644 --- a/src/template-with-reset.cc +++ b/src/template-with-reset.cc @@ -124,7 +124,7 @@ int main() //p.bc().df(2.895 + 0.9); // this is guess //p.bc().len(4.918); //p.eta(0.1); - c.become("porsche cayenne"); + p.set_bc_to_become("porsche cayenne"); p.json(jvi); unsigned int icnt = 0; -- 2.39.2