Skip to content
Snippets Groups Projects
Commit 1c455202 authored by Felix Agner's avatar Felix Agner
Browse files

Bug fix in dummybot, and completed controller example

parent 53fa1fec
No related branches found
No related tags found
No related merge requests found
......@@ -85,8 +85,7 @@ def run_omnibot_with_controller(HOST,verbose=False):
ts = 0.1 # sampling time
with OmniBot(HOST,verbose=verbose) as bot:
no_error = True
while state.on and no_error:
while state.on:
t0 = time()
# Get gamepad updates.
......@@ -100,8 +99,8 @@ def run_omnibot_with_controller(HOST,verbose=False):
for i,v in enumerate(dphi):
bot.set_speed(i,round(v))
print('x:'+bot.get_x())
print('y:'+bot.get_y())
print('x:'+str(bot.get_x()))
print('y:'+str(bot.get_y()))
sleep(max(0,t0+ts-time()))
......
......@@ -34,8 +34,8 @@ def run_dummybot(HOST,verbose=True):
bot.set_speeds([-vset,-vset,-vset])
print('x:'+bot.get_x())
print('y:'+bot.get_y())
print('x:'+str(bot.get_x()))
print('y:'+str(bot.get_y()))
sleep(max(0,t0+ts-time()))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment