Menu

Can we run this on Quickbot?

Anonymous
2015-03-25
2016-10-24
  • Anonymous

    Anonymous - 2015-03-25

    Hi

    Thanks for this simulator. Is there a way to run this simulations on actual Quickbot?

    Thanks

     
  • Tim Fuchs

    Tim Fuchs - 2015-03-26

    Hi,

    Yes, there is a way. Unfortunately, I don't have a QuickBot, so I can only test the code up to a certain point, thus there's only an "unofficial release". On the other hand, some people have tested it with their QuickBots and reported relative success.

    There are two ways of running the simulations on the QuickBot - one is to have the supervisor on the PC, and the other one is to have it on the QuickBot. The second way makes the robot more autonomous and reduces lag - you only use the main computer to change gains and set other supervisor parameters - but it of course requires changing the code on the robot and is more difficult to debug.

    The files are available at https://sourceforge.net/projects/pysimiam/files/releases/

    The first way requires downloading pysimiam-realbottest-pwm.zip. The README file has all the instructions, but, basically, you should change worlds/test_realtime_pc.xml to contain the right IP addresses and ports. THen you run test_pcloop.py

    For the second way download pysimiam-remote.zip. It contains, among other things, a folder "QuickBotServer" that should be put on the QuickBot, and the file pysimiam_roboloop.py should be run with the full name of the supervisor class as an argument (e.g. week5_switching.QBSwitchingSupervisor). On the PC side run qtsimiam_remotecontrol.py and enter the robot's IP and the port number (I think the port is 7788, it is written in pysimiam_roboloop.py).

    Please tell me if it works or if you have any problems.

     
  • Dmitry Ananyev

    Dmitry Ananyev - 2015-05-11

    Hi, Tim.
    Thank you very much for this simulator - pysimiam.
    I hope it will be official and replace somewhen the one with matlab.
    Awesome work!

    I've implemented my hardware version of the QuickBot on the Arduino platform with bluetooth module. It can use joystick app for android. Here are the repos:

    Arduino Bluetooth QuickBot GitHub repository: https://github.com/altexdim/arduino-bluetooth-quickbot
    Android Bluetooth Joystick GitHub repository: https://github.com/altexdim/android-bluetooth-joystick

    Photos: https://github.com/altexdim/arduino-bluetooth-quickbot/tree/master/photos
    Video: https://drive.google.com/file/d/0B4F2-uZsSusnc2JXcFBnS0lNSzg

    My Arduino QuickBot uses the same commands as original, so the next step i've connected it to the simulator and run programming assignment week6 on the real hardware.
    I've successfully connected it to the simulator from week6.

    Bluetooth connection is just a serial connection (with rfcomm driver) on windows platform.
    So i've written small python script that proxies all udp packets to serial connection and vice versa.
    Simulator simply sends UDP packets to that proxy script, and proxy script connects to the quickbot using virtual com port (using bluetooth).

    It seems like it works.

    One reason it's hard to say more precisely, because pysimiam does not send enough udp packets to update model 20 times per second, it can get only ~10 updates per second. I do not know why exactly. It's possible that the bluetooth connection is slow or simulator is slow or anything else.

    The other reason is that all of my programming assignments seems to work quite a bit differently on the real hardware with real sensors and real signal noise. So i've made some filters to reduce noise. But it looks like it's not enough. I need to improve the controllers itself.

    Another reason is that the ir proximity sensors calibration data is different in the datasheet of the ir sensors and in the simulator, i've fixed it according to datasheet. So it's not realy a problem for now.

    For example in the simulator week6 assignments all robots moves smoothly and very accurate, but in the real world the real hardware robot moves a little bit too quickly and sometimes does not follow wall in the follow-wall scenario. But sometimes it works quite good.

    I'll keep improving it, but i'll appreciate your help in debugging the issue with slow sample rate of pysimiam.

     
  • Anonymous

    Anonymous - 2016-08-20

    Hi Tim,

    I am trying to run the autonomius code as per your instructions above from 26.03.2015.

    First it reported error that it can't load module pylygon (I hope this is typo, it sholud be polygon) from simobject.py. I installed Poligon2 and this error is gone. Now the error is in /scripts/roboloop.py,line 32, init() takes exactly 1 argument (2 given). What shall I do?

    Thank you,
    Emil

     
  • Tim Fuchs

    Tim Fuchs - 2016-08-20

    Hi Emil,

    something seems to have been packaged wrong. I will have to have a closer look, but your particular problems can be solved the following way:

    1) The file "pylygon.py" (it's not a typo, it's a pygame module) should be put into the scripts folder: https://github.com/typograph/pysimiam/blob/master/scripts/pylygon.py
    2) The line 32 should read "self.robot = QuickBot()"

    Unfortunately, I cannot guarantee that there will be no further errors, but I can try to solve them as fast as possible.

     
  • Anonymous

    Anonymous - 2016-08-20

    Hi Tim,

    Thank you for the quick responce.

    Unfortunately the error moved to qb_embedded.py line 142 self.info=Struct() , NameError: global name 'Struct' is not defined.

    Just in case this is teh ussue I am runnign python 2.7.3 and numpy 1.4.1.

     
  • Tim Fuchs

    Tim Fuchs - 2016-08-22

    OK, i think i got it to the state where it will run. I have uploaded a new archive (pysimian-remote.zip) . Tell me if it works.

     
  • Anonymous

    Anonymous - 2016-08-22

    Hi Tim,

    Now the code on the beaglebone starts and prints: SwitchingSupervisor and starting main loop.

    The code on the PC starts too but when I put the IP for the robot it reports: [Errno 10061] No connection could be made because the target machine actively refused it

    Do I need to put somewhere the password for the wifi or the password for the beaglebone?

    Thank you
    Emil

     
  • Anonymous

    Anonymous - 2016-10-14

    Hi Tim,

    I was able to get the robot to move on its own, but it never stops. It looks that it does not update it's position (x,y,theta). In the supervizor there are some metods left empty. Do they have to be implementad to get the coordinate update working?

    Regards,
    Emil

     
  • Anonymous

    Anonymous - 2016-10-16

    Hi Emil,

    Which supervisor are you using? I believe that in week5_switching.QBSwitchingSupervisor, that is there in the archive, there are no undefined methods, and the supervisor should be following the position correctly.

    I think it might be a problem of the robot class itself. Please check if robot.info.wheels.left_ticks and right_ticks are changing with time. If there are not, one should check the robots/qt_embedded.py for mistakes, like if all the necessary methods are actually called. I have had a look, and the two variables should be updated in update_external_info, but only if reading the encoders actually works. It might be that it doesn't, and I couldn't check this without a QuickBot.

    Good luck,
    Tim

     
  • Anonymous

    Anonymous - 2016-10-20

    Hi Tim,

    I do not see where Quickbot.run is called. Do you know where it should be called?

    Regards,
    Emil

     
  • Tim Fuchs

    Tim Fuchs - 2016-10-21

    Hi Emil,

    I believe it is never called. It cannot be called, because the QuickBot class does not have an 'update()' method which it references, and also it shouldn't be called, because it blocks execution. I think it makes most sense to move the call to encoderRead.start() to the constructor and the blinking code to the RoboLoop class, and then remove the run() method.

    Best,
    Tim

     
  • Anonymous

    Anonymous - 2016-10-24

    Hi Tim,

    After adding the encoderRead.start() in the constructor of Quickbot the encoder possions started updating. I had to also change the call for x and y in the distance to target calculation.

    The robot got to the target (1,1) only once but I consider this as success.

    My next task is to imlement "follow wall" and run the robot in real maze.

    Regards,
    Emil

     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.