Shop OBEX P1 Docs P2 Docs Learn Events
Updated! More Success! Web Controlled bot! — Parallax Forums

Updated! More Success! Web Controlled bot!

DgswanerDgswaner Posts: 795
edited 2008-02-29 18:17 in General Discussion
Ok I'm just a little excited! I just drove my bot around my house (room no web cam....yet) via the web. It's a mile stone I've been working toward for a few months now. I still have to work out a few bugs and most likely trade the BS2 for some thing faster so I can get higher baud rates. but it is operational! yay!!! I'll get some of the bugs worked out and let some of you try it out!

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
A complex design is the sign of an inferior designer. - Jamie Hyneman, Myth Buster

Post Edited (Dgswaner) : 10/26/2007 2:33:20 PM GMT
«1

Comments

  • Steve JoblinSteve Joblin Posts: 784
    edited 2007-10-19 14:48
    Awesome achievement!!! I've been working to try to accomplish this myself, so I appreciate the effort that goes in to making it happen! Can you provide some details on your set up... hardware, software, etc.
  • DgswanerDgswaner Posts: 795
    edited 2007-10-19 15:23
    I'll be doing a full work up on the project including all stamp code, html code and photo shop PSD's. I need to get a few things worked out before I do a complete unveiling. but in brief, from computer to bot here is the line of communication, PINK <---> BS2 parallax's RF Modules <
    > RF modules <----> BS2sx. I have made quite an elaborate, interface, perhaps too elaborate, I'm still working out a few bugs with it. one of the main issues that I'm having is delay, it can take up to 2 seconds for the command to get to the bot. I'm communication at 2400 baud, so I'm considering either a buffer or a swapping out the bs2 for a bs2sx so I can up the baud rates. I'm already seeing a real need for more than just standard controls, I was trying to drive it down a hall way and it was near impossible. so an command like rotate to a specific direction, or turn x degrees will really make it easier to operate. their are some really cool things you can do with sensor inputs, having control over server side variables give you a lot of options

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    A complex design is the sign of an inferior designer. - Jamie Hyneman, Myth Buster

    Post Edited (Dgswaner) : 10/19/2007 3:30:32 PM GMT
  • D FaustD Faust Posts: 608
    edited 2007-10-19 21:04
    Cool!!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --DFaust
  • WhitWhit Posts: 4,191
    edited 2007-10-19 22:07
    Great! Can't wait to see the details.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Whit+


    "We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney
  • StampNut2StampNut2 Posts: 224
    edited 2007-10-21 09:48
    Me too, I am very interested in this means of controlling a bot.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Never give up when things go wrong.

    robosapienv2-4mem8.page.tl/
  • Rob7Rob7 Posts: 275
    edited 2007-10-22 13:35
    Great job !
    I have been working on a similar project but with the eb500 and MSRS with not so great results.
    But this is trully exciting !!
    Please, when you can share with us as much information as you can.
    I am new to the eb500 and writing programs for VB is let's say fustrating for a newbe.
    Can you post some pic's before you release some info ?
    Rob7
  • AdamSAdamS Posts: 7
    edited 2007-10-22 23:31
    I took a radio shack wheels and added it to a laptop body. I can quickly add anything USB and other devices.

    How can I remotely reset the Parrallax USB Servo controller. I use a Web Cam to remotely guide the unit over WiFI. When I run into walls other other things the USB drops out. I need a way to reset the servo without pushing the button.

    Any ideas?

    This project was three years in the making. I am working on stability. I want to build something I can clean up my yard remotely.

    Depending on the platform, Microsoft has a portmon executable that will help with the serial I/O problems to the USB or serial. Also Microsoft has a USB View program that can help you work through the problems with too many USB devices on a single USB Hub or controller.
  • AdamSAdamS Posts: 7
    edited 2007-10-22 23:44
    Good work and hope I did not offend anyone.
  • WhitWhit Posts: 4,191
    edited 2007-10-23 12:23
    Dg,

    You've got to get up a screen shot of the control panel and some more info on this. Very cool.

    By the way, this is off subject but I got this ad this morning - http://www.buy.com/retail/product.asp?sku=203922248&adid=17653&dcaid=17653 - it is about the Roomba. Watch the video - I guess I didn't realize how much this thing is doing some of the stuff we've talked about as regards mapping. Hard to believe for $149 bucks!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Whit+


    "We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney
  • Skywalker49Skywalker49 Posts: 172
    edited 2007-10-23 15:13
    Great Dg,

    look forward to get the details and once we have a Mapping-Bot .. whaaaw, then we make it Web Controlled.

    regards,
    Ed
  • DgswanerDgswaner Posts: 795
    edited 2007-10-23 16:37
    Thanks for your help Whit, I guess I did promise some info on this, Here is a screen shot, I threw on some labels so hopefully it will make sense. I have this setup working, but I need to iron out a few bugs, I also need to update the code for the PINK-bs2 as well as the BASIC stamp. right now the PINK-bs2 just monitors a single variable, and transmits it to my bot via RF, the Bot cycles through a loop receives the data from the PINK, and executes commands accordingly. IF x = 1 go forward .... 2 reverse. etc. the stamp also stops automatically if the IRPD sensors see something. so I have quite a bit of work to do on the stamp coding, and I want to add features like only xmitting if something changes, right now it will send the same data repeatably, which sometimes causes lock ups. I also need to speed up the communication as much as possible.

    added:
    as soon as I have this working solid I will post all my code and info.


    Skywalker... I've been severely side tracked on the mapping bot, I am hopping to wrap this up in the next few days and get started on the mapping quest! I'm also working on a wheel encoder solution.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    A complex design is the sign of an inferior designer. - Jamie Hyneman, Myth Buster

    Post Edited (Dgswaner) : 10/23/2007 4:43:01 PM GMT
    800 x 514 - 261K
  • Steve JoblinSteve Joblin Posts: 784
    edited 2007-10-23 17:54
    Awesome work dgswaner!!!!! I can't wait for you to post the code and details so others (like the very jealous me!!!) can create their own!!!
  • DgswanerDgswaner Posts: 795
    edited 2007-10-26 13:47
    Thanks to Harrison I have a web cam with x-y tilt. which is also powered by AJAX, It's on 2 servos and a home made pan tilt setup. I was working on the code really late and didn't realize I have one of the sliders backwards, but it works fine. Check out my messy desk! if you have no video open port 85 on your firewall. http://71.219.95.150/Ajax/webcontrol1.htm


    added:
    this is just a video test page, the arrow controls won't work. only the sliders, the camera is on my desk not on my bot. which you can see if you look in the lower left of the field of vision.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    A complex design is the sign of an inferior designer. - Jamie Hyneman, Myth Buster

    Post Edited (Dgswaner) : 10/26/2007 2:58:23 PM GMT
  • Steve JoblinSteve Joblin Posts: 784
    edited 2007-10-26 15:32
    The video doesn''t seem to be showing... it looks like when I press one of the arrows the command gets processed and updates the "move" counter, but I can't see any image.
  • DgswanerDgswaner Posts: 795
    edited 2007-10-26 15:37
    the video is working, I just tried internet explorer and it doesn't worh with IE. looking into it. if you use Foxfire it should work.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    A complex design is the sign of an inferior designer. - Jamie Hyneman, Myth Buster
  • DgswanerDgswaner Posts: 795
    edited 2007-10-26 16:17
    I updated the code with IE friendly code the video should work now.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    A complex design is the sign of an inferior designer. - Jamie Hyneman, Myth Buster
  • Steve JoblinSteve Joblin Posts: 784
    edited 2007-10-26 16:21
    That is great!!!!! I am really impressed!!!!

    So what's the chance that you can be convinced to write up a set of instructions so others (like the very jealous me!) can replicate your great work?
  • DgswanerDgswaner Posts: 795
    edited 2007-10-26 16:33
    I was planning on waiting until I get every thing up and running but I guess it doesn't matter. this portion is 100% complete so I'll see if I can't write up something in my down time today. one of the problems about writing up instructions is that I don't really have a full understanding of how it all works..... yet. I can manipulate it to some extent so perhaps I'll do a write up and the real brains behind the code and AJAX, Harrison can add to it and/or answer questions.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    A complex design is the sign of an inferior designer. - Jamie Hyneman, Myth Buster
  • WhitWhit Posts: 4,191
    edited 2007-10-26 18:14
    Dg,

    Check this viideo out. http://www.youtube.com/watch?v=jxMVshpYYyk

    How's that for mapping!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Whit+


    "We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney
  • DgswanerDgswaner Posts: 795
    edited 2007-10-26 19:01
    OK here it is:

    Bot Control with Cam X/Y tilt.

    Hardware/software requirements:
    • PINK for hosting and storing variables.
    • BS2 or other processor to read/write the variables
    • RF communication to your bot. I'm using the parallax RF modules.
    • a RF enabled bot (of course)
    • a Wireless web cam
    • Video Streaming software I'm using VisionGS BE $30.00


    PINK
    *The Pink is The key to this, I'm using an original pink (non-updated). as far as the example code goes here is my Variable usage:
    • Nb_var00 holds the IP address of the camera, I recommended this as when you local to your cam you can't view it threw your external IP. so rather than rewrite the code you just change the variable.
    • Nb_var20 holds a value of 1-255 (the horizontal slider)
    • Nb_var21 holds a value of 1-255 (the vertical slider)
    • nb_var25 holds a single digit for the direction pad. 8-forward 7-left -9 right 5-stop 2-rev (look at the num pad)
    I found variables 00-09 too hard to deal with when sending variables because the server variables needs to have a leading "0" Nb_var01 not Nb_var1 which I found hard to get a basic stamp to send 01 in a variable. so I just avoided the extra code for 10 variables and decided to make them all server/web variables only. IP addresses web user names etc.

    BS2
    The bs2 just cycles through a loop reading var's 20,21 and 25. and xmits the value to the bot. fairly simple. I eventually want to write some code that only x-mits when a variable changes, and perhaps some error checking. and also provide support for multiple robots. depending which ones are logged on.
    more var's are used on the sensor side but I won't get into that here.

    RF Modules
    I'm using http://www.parallax.com/detail.asp?product_id=28180. these work fairly well. because I'm using a bs2 I'm limited to 2400 baud, and even the pink docs recommend 2400 baud with this stamp. as also recommended by the docs I'm using simple variables for xmitting, rather than using natural language for variables, "forward" I'm using "8" I did notice a big difference when I implemented this.

    your bot

    for testing I have my bot running through a loop reading in the var data from the pink and then branching to the approperate code section to move the bot accordingly. I did IRPD over ride, to help with a loss of communication and lag. if the bot sees something with it's IRPD it stops and only lets you go in reverse. I'm going to expand this a little but I think it's necessity for my bots safety. I going to xmit distances using a PING but it's mostly going to be for user info. showing open areas, not directing the bot.

    To handle the sliders I found the extents of my servos, 300 and 1500 for using pulsout. I then cam up with the following formula. 1500-300 1200 is my range of movement. 1200/255 (slider max value) =4.7 going to round down since I would rather my servo travel short rather than lToo far. my pulse out command reads Xcam (slider value) * 4 + 300. I'm adding 300 to make the low end work. so if the slider is 1 the result would be 1 * 4 + 300 = 304 this formula seems to work well. I will be adjusting the range of the slider so it more evenly divides into the range of the servo so I get more accurate results. but at 2:00am that's the best I could come up with. is it sits now i have dead spots at the end of my sliders.

    Wireless Web cam ok I confess I don't actually have a wireless web cam. I'm using a USB quick cam. the vision GS software supports most cams including wireless IP cams. I've trying to decide if I want to keep my onboard PC, which would eliminate the need for a wireless cam, or to off load to a stand alone PC. I've decided that if I go wireless I'm going to choose one that is both Vision GS, and roborelm. so I don't end up buying another.

    Vision GS
    This is a great program, I use it in our office for security, I've caught the cleaning crew eating office snacks, it supports multiple cams and has motion detect recording (security bot), it can post stills to a FTP server stream live video and also stream live images. what's the difference...
    live video requires a video player, where streaming images just rapidly refreshes images to produce video. I could not get any less than a 5 second buffer for video streaming. unacceptable in this circumstance. still streaming I Was able to achieve less than a second delay. give or take.

    I'm more than happy to answer anything I can, I'll post Code later this evening.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    A complex design is the sign of an inferior designer. - Jamie Hyneman, Myth Buster

    Post Edited (Dgswaner) : 10/26/2007 7:20:52 PM GMT
  • D FaustD Faust Posts: 608
    edited 2007-10-26 19:52
    Whit, cool videos. By the pattern that the roomba made it doesn't look as if it is mapping, just moving randomly and hoping it cleans everything. I think the second video is really cool.

    Dg, I tried out the video thing, really cool!!!! (Except for the reversed x axis)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --DFaust
  • DgswanerDgswaner Posts: 795
    edited 2007-10-26 19:58
    Ya I got to fix that! can't until I get home.

    Whit! I would love even 1/4 of what that mapping bot can do! very cool. that bot is going to put me out of part of my job. I often go to job sites to measure them because the record sets are too lousy to be trusted. I have measured entire buildings before.... not fun! the bot can have that part of my job! I just worry what will happen when the bot gets sick of that job too.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    A complex design is the sign of an inferior designer. - Jamie Hyneman, Myth Buster
  • Steve JoblinSteve Joblin Posts: 784
    edited 2007-10-26 20:09
    Ahh... so you are using a PINK! I made this post quite a while ago wondering why there weren't any "pinkbots" being made... looks like it was just a matter of time!

    Of course, Dgswaner, you know I'm going to ask you about your willingness to post the code... any chance?

    Again, great work!!!
  • DgswanerDgswaner Posts: 795
    edited 2007-10-26 20:13
    I had the same thought! where are the pink bots... or apps!!! I will post code this even when I get home. I don't have access to my stamp code from work.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    A complex design is the sign of an inferior designer. - Jamie Hyneman, Myth Buster
  • Steve JoblinSteve Joblin Posts: 784
    edited 2007-10-26 20:19
    Thanks! I just found my posting about wanting to create a "pinkbot"... http://forums.parallax.com/forums/default.aspx?f=6&m=151027... it was posted year ago!!! Just goes to show ya... if you wait long enough, everything will be invented and discovered [noparse]:)[/noparse]
  • WhitWhit Posts: 4,191
    edited 2007-10-26 21:18
    Dgswaner said...
    Whit! I would love even 1/4 of what that mapping bot can do! very cool. that bot is going to put me out of part of my job. I often go to job sites to measure them because the record sets are too lousy to be trusted. I have measured entire buildings before....
    Dg,

    I've done the same thing - sometimes in buildings with all sorts of nasty angles.

    Thanks for the the posts too!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Whit+


    "We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney
  • DgswanerDgswaner Posts: 795
    edited 2007-10-26 21:25
    cool! I like doing what was once thought not possible!

    I can give you info on my "Pink Base station" if you like, it's part of what I talked about. I have the pink bs2 and rf modules in an enclosure, looks like a homemade wireless router. I build a LM7805 based power supply for it also. the one power supply powers the PINK, bs2, rf Modules and status LED's as well as a cooling fan. I'm having communication problems with it so I haven't posted it in the completed projects section yet. but I think I figured out what was going with it last night.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    A complex design is the sign of an inferior designer. - Jamie Hyneman, Myth Buster
  • DgswanerDgswaner Posts: 795
    edited 2007-10-26 21:34
    Whit... can you try the video let me know if it works. try it with in AOL and out. so far everything works. I'll know Iphones work tonight.

    ...... I don't have to measure too many buildings these days, I'm getting more into civil and Site design.

    if someone with vista could let me know also.

    Thanks

    dg

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    A complex design is the sign of an inferior designer. - Jamie Hyneman, Myth Buster
  • CapdiamontCapdiamont Posts: 218
    edited 2007-10-27 01:52
    Video works good, sliders works good. what does the buttons do? win vista, with firefox
  • DgswanerDgswaner Posts: 795
    edited 2007-10-27 06:23
    Thanks for testing that, as far as I can tell this is cross platform. just need Linix and os/2. The buttons are to steer the robot. but I don't have it connected at the moment.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    A complex design is the sign of an inferior designer. - Jamie Hyneman, Myth Buster
Sign In or Register to comment.