experiment with reverse
authorBernhard Tittelbach <bernhard@tittelbach.org>
Tue, 26 Mar 2019 13:24:38 +0000 (14:24 +0100)
committerBernhard Tittelbach <bernhard@tittelbach.org>
Tue, 26 Mar 2019 13:24:38 +0000 (14:24 +0100)
cpp/openCVnaiveObstacleAvoidance/openCVnaiveObstacleAvoidance.cpp

index 9758346..5c8807c 100644 (file)
@@ -58,6 +58,7 @@ class MyListener : public IDepthDataListener
     const string bobbycar_forward = "f";
     const string bobbycar_left = "l";
     const string bobbycar_right = "r";
+    const string bobbycar_backward = "b";
 
     uint8_t bobbycar_reversing = 254;
     royale::Vector<royale::String> boobycar_reversing_script ={"s","b","b","b","b","r","b","r","b","r","b"};
@@ -269,7 +270,7 @@ private:
     void naiveObstacleAvoidanceDemo()
     {
         if (bobbycar_reversing<boobycar_reversing_script.size()) {
-            std::cout << boobycar_reversing_script.at(bobbycar_reversing++);
+            std::cout << boobycar_reversing_script.at(bobbycar_reversing++) << std::endl;
         }