haraisao / JumpingSumo-Python

Controller for the JumpingSUMO written in Python
21 stars 12 forks source link

Only working from command line? #1

Closed edwanvi closed 9 years ago

edwanvi commented 9 years ago

I can call all the functions of this module perfectly if I do it on the command prompt. Try to string them together into a file and nothing happens. Please let me know what other info I may need to provide or how I can fix this.

haraisao commented 9 years ago

Hi, thank you for trying my library. What code did you use? The 'move(10)' means the robot move forward with speed '10'. So if you code following, the robot move with speed '10' and then the robot will stop immediately;

import sumo cnt = sumo.SumoController('MyCtrl') cnt.connect() cnt.move(10) cnt.move(0)

If you want to move the robot for 3 seconds, please use followings;

import sumo import time cnt = sumo.SumoController('MyCtrl') cnt.connect() cnt.move(10) time.sleep(3) cnt.move(0)

Thank you.

edwanvi commented 9 years ago

I realized today I forgot to add a delay.... I feel like an idiot... I will try to do this again later today, and will close this issue if it works then. Great library by the way, it makes my life saner.

On 8/18/15, Isao Hara notifications@github.com wrote:

Hi, thank you for trying my library. What code did you use? The 'move(10)' means the robot move forward with speed '10'. So if you code following, the robot move with speed '10' and then the robot will stop immediately;

import sumo cnt = sumo.SumoController('MyCtrl') cnt.connect() cnt.move(10) cnt.move(0)

If you want to move the robot for 3 seconds, please use followings;

import sumo import time cnt = sumo.SumoController('MyCtrl') cnt.connect() cnt.move(10) time.sleep(3) cnt.move(0)

Thank you.


Reply to this email directly or view it on GitHub: https://github.com/haraisao/JumpingSumo-Python/issues/1#issuecomment-132068195

Sincerely, Caleb

edwanvi commented 9 years ago

Closing, as it works perfectly and I'm an idiot. :+1: