From b54e543f3ec11b500bfc7ecd089faa1f4aa0ef1f Mon Sep 17 00:00:00 2001
From: Felix Agner <felix.agner@control.lth.se>
Date: Wed, 2 Nov 2022 10:50:34 +0100
Subject: [PATCH] bug fix in dummy bot and examples

---
 README.md               | 14 +++++++++-----
 src/omnibot/dummybot.py |  2 +-
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/README.md b/README.md
index 00b276c..0371dfa 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,9 @@ Note that this package covers the *client side*. For information about setting u
 
 ## Installation
 On linux:
-`pip install git+https://gitlab.control.lth.se/processes/omnibot/omnibot.py`
+```
+pip install git+https://gitlab.control.lth.se/processes/omnibot/omnibot.py
+```
 
 ## Usage
 
@@ -33,10 +35,12 @@ with Connection(HOST) as bot:
         
         # Target speed for servos
         vset = 100
+        
+        # Record start time
+        t0 = time()
 
-        # Go one way
-        while time() < tstart + 3:
-            t0 = time()
+        # Go one way for 3 seconds
+        while time() < t0 + 3:
 
             # set speeds
             bot.set_speeds([vset,vset,vset])
@@ -51,7 +55,7 @@ with Connection(HOST) as bot:
 **Example:**
 A pre-defined script which rotates first one way, then the other, and prints logged angle:
 ```
-from omnibot.Dummybot import run_dummybot
+from omnibot.dummybot import run_dummybot
 
 # Insert suitable IP-adress
 HOST = "localhost"
diff --git a/src/omnibot/dummybot.py b/src/omnibot/dummybot.py
index ab47eba..0e52f96 100644
--- a/src/omnibot/dummybot.py
+++ b/src/omnibot/dummybot.py
@@ -25,7 +25,7 @@ def run_dummybot(HOST,verbose=True):
 
             bot.set_speeds([vset,vset,vset])
               
-            print('theta:'+bot.get_theta())
+            print('theta:'+str(bot.get_theta()))
 
         # Go the other way
         while time() < tstart + 6:
-- 
GitLab