From 52d01eb015f8c41d4a94efa9e6e6146de61047c2 Mon Sep 17 00:00:00 2001 From: Jiri Vlasak Date: Mon, 25 Feb 2019 16:33:33 +0100 Subject: [PATCH] Add length, wheelbase, width getters to bcar --- incl/bcar.h | 4 ++++ vehicle_platform/bcar.cc | 16 ++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/incl/bcar.h b/incl/bcar.h index 85673c8..819d029 100644 --- a/incl/bcar.h +++ b/incl/bcar.h @@ -39,6 +39,10 @@ class BicycleCar: public RRTNode { using RRTNode::RRTNode; // getter + float length(); + float wheelbase(); + float width(); + float dr(); float df(); diff --git a/vehicle_platform/bcar.cc b/vehicle_platform/bcar.cc index a979d80..f014688 100644 --- a/vehicle_platform/bcar.cc +++ b/vehicle_platform/bcar.cc @@ -18,6 +18,22 @@ along with I am car. If not, see . #include #include "bcar.h" +// getter +float BicycleCar::length() +{ + return this->length_; +} + +float BicycleCar::wheelbase() +{ + return this->wheel_base_; +} + +float BicycleCar::width() +{ + return this->width_; +} + float BicycleCar::dr() { return (this->length_ - this->wheel_base_) / 2; -- 2.39.2