]> rtime.felk.cvut.cz Git - hubacji1/iamcar.git/commitdiff
Update constants in bicycle car
authorJiri Hubacek <hubacji1@fel.cvut.cz>
Tue, 3 Jul 2018 08:07:28 +0000 (10:07 +0200)
committerJiri Hubacek <hubacji1@fel.cvut.cz>
Tue, 3 Jul 2018 08:07:50 +0000 (10:07 +0200)
- Add `const` to constants.
- Add turning radius.
- Add MAXSTEER macro.

incl/bcar.h

index 8a9947e4d523254a9f8b66b3d17dfeb3525d0706..678e064ce6a79c635a1f96b4d0c7b4806dcd6e31 100644 (file)
@@ -21,14 +21,17 @@ along with I am car. If not, see <http://www.gnu.org/licenses/>.
 #include <vector>
 #include "rrtnode.h"
 
+#define MAXSTEER(wb, tr) ((wb) / (tr))
+
 class BicycleCar: public RRTNode {
         private:
                 // see https://en.wikipedia.org/wiki/Fiat_Punto
-                float height_ = 1.450;
-                float length_ = 3.760;
-                float safety_dist_ = 0;
-                float wheel_base_ = 2.450;
-                float width_ = 1.625;
+                const float height_ = 1.450;
+                const float length_ = 3.760;
+                const float safety_dist_ = 0;
+                const float turning_radius_ = 10.82;
+                const float wheel_base_ = 2.450;
+                const float width_ = 1.625;
         public:
                 using RRTNode::RRTNode;