diff --git a/README.md b/README.md index 00b276c8fd29fd61e4ef8b359458f473484517ba..0371dfa3380c363df7c1abcda3f76756b6d09114 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 ab47eba11f984f145ed685b83e9d55de27c7813b..0e52f96e0647a45e3294cc525d345ddbec7c8e8a 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: