Shop OBEX P1 Docs P2 Docs Learn Events
Ideas for making a web controlled robot arm? — Parallax Forums

Ideas for making a web controlled robot arm?

vanmunchvanmunch Posts: 568
edited 2014-04-12 09:14 in General Discussion
Hey Everyone,

My wife and I recently moved to Boston and I've been trying to keep in touch with my table top gaming buddies back in Iowa. I'll join them for a game every so often using Skype, but it doesn't work very well (can't point at things, move things, zoom in). I've been toying around with the idea of building a remote controlled robot arm that I can control through the web and I was looking for suggestions. My first thought is to use a Spinneret, but I've never used one before and I didn't know if it would be a good fit.

Anyhow, any thoughts? Or should I just make new friends? :)

Dave

Comments

  • PliersPliers Posts: 280
    edited 2014-04-09 12:57
    Sorry, can't be done. We just don't have the technology. But seriously....... I would like to do this too.
  • NWCCTVNWCCTV Posts: 3,629
    edited 2014-04-09 15:11
    can't be done
    Just the right comment to get someone to tell you how to do it!!!! I say it can be done and I believe a Spinnernet is the perfect start. I can turn on LED's over the internet so why not control a bot arm????
  • ercoerco Posts: 20,256
    edited 2014-04-09 15:27
    Quick turnkey method: Get a used Rovio. Neat omniwheeled camera platform comes with a browser interface, no arm but it's a cheap driveable telepresence bot. You can raise & lower the camera/head to 3 positions, which you could sort of use for pointing. Start with that and hack freely!

    They often sell for under $100 on Ebay:
    http://www.ebay.com/sch/i.html?_from=R40&_sacat=0&_nkw=wowwee+rovio&LH_Complete=1&rt=nc

    But all I see right now is one for $350. Pass on that one. :)

    Also pass on this $3 Hobby King HXT900 servo, currently on sale for $313 (free shipping, though): http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=370648951905
  • prof_brainoprof_braino Posts: 4,313
    edited 2014-04-09 18:36
    vanmunch wrote: »
    Hey Everyone,

    My wife and I recently moved to Boston and I've been trying to keep in touch with my table top gaming buddies back in Iowa. I'll join them for a game every so often using Skype, but it doesn't work very well (can't point at things, move things, zoom in). I've been toying around with the idea of building a remote controlled robot arm that I can control through the web and I was looking for suggestions. My first thought is to use a Spinneret, but I've never used one before and I didn't know if it would be a good fit.

    Anyhow, any thoughts? Or should I just make new friends? :)

    Dave

    I tried to make new freinds, but I keep running out of parts.

    I think you could do everything you want for under $100 US in hardware, not counting your custom robot arm.

    Prop - run the arm. connect over serial to one of the linux units:
    RPi - run the camera and the HDMI monitor, you can see your freinds and they can see you
    DIR505 - ethernet and wifi, and its another RPi class linux box. (Ethernet to reach the RPi, WiFi to reach the local network, you will inevitaly want the robot mobile).
  • mindrobotsmindrobots Posts: 6,506
    edited 2014-04-09 19:12
    I tried to make new freinds, but I keep running out of parts.

    Prof, that's one of the funniest comments I've read in a long time!

    How about a laser pointer on a pan/tilt platform? A spinneret should have the extra I/O pins to drive that. It even has enough for two servos to drive wheels and the pointer. If you want more telepresence, a RasPi could let you see and point - it can drive servos.

    If your friends keep telling you the batteries are dying and you are winning, then it's time for new friends....or a higher powered laser!!
  • Heater.Heater. Posts: 21,230
    edited 2014-04-10 01:31
    Vanmunch,

    What you are proposing can of course be done. After all we have surgeons operating on people by remote control now. Not to mention rovers on Mars. Etc etc.
    However it does not seem like a weekend project.

    After a couple of years tinkering with this robot project you will look up to find you have no friends in Iowa or Boston. You will be cooking your own dinner as the wife will have left months before.

    Better make it a very nice robot as it might be the only company you have:)
  • Mike GMike G Posts: 2,702
    edited 2014-04-10 04:22
    My first thought is to use a Spinneret, but I've never used one before and I didn't know if it would be a good fit.
    Any device that can control motors and has network access will work; Spinneret, W5200 for the Quick Start, Spinneret 2, PC and uController.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-04-10 06:20
    For game playing, I don't see any problem with this. Someone years ago I had run across had a toy tank that ran over the internet. The only drawback is there will be delays. I tried running the toy tank from Taiwan and delays were significant as it was in the USA. I am not sure if a Linux platform was used or what.

    You could use a Linux box from any old PC, add wifi or Xbee, and then have a Propeller run your robotic arm. There would be a huge advantage of buffering and you could have an open Skype feed for video.

    You don't really need the Wifi or Xbee with a stationary robotic arm, you could use a RS232 cable or USB.
  • Martin_HMartin_H Posts: 4,051
    edited 2014-04-10 06:35
    You would need two parts to this project, the remote control and the feedback. The feedback could use an application like Skype and solve the problem out of the box.

    The remote control is the harder portion. I've seen people use the Processing IDE to generate commands to control a robot arm. Some of these emit servo positions, other emit gcode. Under the covers Processing uses Java Applets as the execution environment, but the code uses local serial ports when talking to a microcontroller. To get the code on a web page it would need to be compiled using the regular JDK as an applet. To get a Processing project to remote control a robot arm over the internet it can't connect to a local serial port. Instead the code would need a class which tunneled over HTTP to the server which in tern connected to a local serial port.

    That last sentence is likely to be the hardest part of the project. I've actually done exactly this with streaming data in the past. It took me at least one forty hour work week to get it right, so as a hobby effort it could take a few weekends. There are commercial products that can do this as well, but I've never worked with any open source ones. A quick Google search turned up the following which might work:

    https://code.google.com/p/java-serialport2socket/

    BTW Javascript is wholly inadequate for this task in spite of anything Heater tells you. Don't listen to his siren song of Javascript destruction.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-04-10 06:46
    I am currently trying to get a Propeller to be used as a g-code interpreter for X, Y, Z, and E axes. The application intended is a 3-D printer.

    But it would be easiy adaptible to a robotic arm. The OBEX does have a MDI (manual data input) XYZ CNC object that might be adaptible. The main problem I see is that you might have an arm dealing with space in an entirely different way than XYZ coordinates. But if your PC could generate the g-codes, the Propeller execute. You might have to create a special input device to mimic the arm's motion.

    Try looking at LinuxCNC for the means to drive the robotic arm. Then find the means to do so remotely with 'tunneling software'. It might require a second computer for arm movement at both ends, but a tiny Linux SBC at each end could do the trick... just two Raspberry Pi's maybe.

    If not, try one Raspberry Pi and one CubieTruck board.. more power, even a remote control input interface and a SATA hard disk interface.
  • Heater.Heater. Posts: 21,230
    edited 2014-04-10 06:58
    Martin,
    Javascript is wholly inadequate for this task in spite of anything Heater tells you. Don't listen to his siren song of Javascript destruction.
    Chokes, stops singing, bites lip, counts to 10, trying very hard not to reply. It's no use:

    I venture to suggest that with modern state of the art if it cannot be done in JS then it cannot be done.

    There are always those "stick in the muds" who will say the old ways were best:)
  • Mike GMike G Posts: 2,702
    edited 2014-04-10 07:22
    The remote control is the harder portion. I've seen people use the Processing IDE to generate commands to control a robot arm. Some of these emit servo positions, other emit gcode. Under the covers Processing uses Java Applets as the execution environment, but the code uses local serial ports when talking to a microcontroller. To get the code on a web page it would need to be compiled using the regular JDK as an applet. To get a Processing project to remote control a robot arm over the internet it can't connect to a local serial port. Instead the code would need a class which tunneled over HTTP to the server which in tern connected to a local serial port.
    I built a remote robotic arm several years ago using only a custom proxy and JavaScript. I created something similar, no robotics, using a Spinneret and web camera.
  • Martin_HMartin_H Posts: 4,051
    edited 2014-04-10 08:00
    Mike G wrote: »
    I built a remote robotic arm several years ago using only a custom proxy and JavaScript. I created something similar, no robotics, using a Spinneret and web camera.

    Did the remote control portion have point and click style controls, or did you type in the desired arm position?

    In spite of my earlier dig, I think Javascript and web sockets could be used to connect to a proxy on the web server which in turn connected to a local serial port. The problem I see with building the arm GUI in a web page is inadequate control widgets. The last time I worked with an HTML5 widget library it was more text centric with calendar controls, input forms with validation, combo boxes, tree controls, grids, and fancy buttons. But there was a distinct lack of more graphic controls.

    The control I saw in processing was an XY grid where the user could click and drag to control the gripper's XY position, and a Z slider to control the height. The open/close were controlled with another widget. To do something similar in HTML5/Javascript you would need to use a canvas tag and build your own, unless something like that has been built already.

    Here's a pointer to one of the Processing projects I connected to my own robot arm:

    http://mattgreensmith.wordpress.com/2011/11/26/making-an-arduino-controlled-delta-robot/
  • vanmunchvanmunch Posts: 568
    edited 2014-04-11 07:43
    Wow! thanks for all of the responses! I'm going to take a look at Erco's suggestion of getting a used Rovio and "reassembling it" :)

    Longer term I'd like to learn how to use the Spinneret. Any simple demos or walk throughs for a "setting up server" novice? It seams like there is a lot of information for people who already know about sockets and web servers, but not a lot of information for starting at the very beginning? Maybe I'm missing something?

    Dave
  • mindrobotsmindrobots Posts: 6,506
    edited 2014-04-11 08:38
    Dave,

    Mike G's Spinneret site contains some very good tutorial and background info. It's having issues right now, he is moving it to a new host. He pretty much starts from the beginning.

    That forum section is really loaded with some good information but you need to go prospecting to find some of the real gems. Take a laptop and start browsing and just cut and past to a text file - that's often how I go prospecting.

    I have two that I have had up and running various things, started with Mike's code, ran PropForth for a while, went back to newer versions of Mike's code. It's all pretty cool!
  • Heater.Heater. Posts: 21,230
    edited 2014-04-11 11:52
    Martin_H,
    The last time I worked with an HTML5 widget library it was more text centric with calendar controls, input forms with validation, combo boxes, tree controls, grids, and fancy buttons. But there was a distinct lack of more graphic controls.
    Seems you are a little behind the times here.

    You know how in a 3D first person shooter game on a PC, like Quake I, II, III, you can drive the whole thing from the mouse and a few keyboard hits?

    Well, all of that can be done in the browser now. Forget about text and forms and all that old stuff.

    As an example here is a little toy I made recently. A simple 3D world. A road, some cars (yeah they are just boxes). A billboard by the road playing videos. Use the mouse to move around the world, scroll wheel to zoom. You can even click on those cars and move them around with the mouse.
    http://the.linuxd.org:3000/billboard-viewer/billboard-viewer_2.html

    Given all this one can stream video from your friends at the remote end. You can control that robot arm in the video. The possibilities are amazing.
  • jazzedjazzed Posts: 11,803
    edited 2014-04-11 12:10
    Hmm.

    Initially got the impression you were going to say that Quake can now be played with robot drones in a real fps theater. Kind of like the old RobotWars show on steroids.

    Expensive entertainment opportunity? I've seen online gaming competitions. Maybe the physical reality would interest a larger audience? Life size drone/droid RoboBall?

    Heater. wrote: »
    Martin_H,

    Seems you are a little behind the times here.

    You know how in a 3D first person shooter game on a PC, like Quake I, II, III, you can drive the whole thing from the mouse and a few keyboard hits?

    Well, all of that can be done in the browser now. Forget about text and forms and all that old stuff.

    As an example here is a little toy I made recently. A simple 3D world. A road, some cars (yeah they are just boxes). A billboard by the road playing videos. Use the mouse to move around the world, scroll wheel to zoom. You can even click on those cars and move them around with the mouse.
    http://the.linuxd.org:3000/billboard-viewer/billboard-viewer_2.html

    Given all this one can stream video from your friends at the remote end. You can control that robot arm in the video. The possibilities are amazing.
  • Heater.Heater. Posts: 21,230
    edited 2014-04-11 12:35
    Jazzed,

    No idea. Just saying that a browser today can do a lot of weird stuff you might never have imagined would happen.

    The Firefox guys have recently demoed browser to browser video conferencing with no server, like Skype, in the middle.

    Makes me think the opening posters request is not so impossible.

    Turns out there is no such thing as HTML5. It's just a continuing roller coaster of browser features that more and more make the operating system it runs on irrelevant.
  • Martin_HMartin_H Posts: 4,051
    edited 2014-04-12 07:30
    Heater. wrote: »
    Martin_H,

    Seems you are a little behind the times here.

    You know how in a 3D first person shooter game on a PC, like Quake I, II, III, you can drive the whole thing from the mouse and a few keyboard hits?

    Well, all of that can be done in the browser now. Forget about text and forms and all that old stuff.

    As an example here is a little toy I made recently. A simple 3D world. A road, some cars (yeah they are just boxes). A billboard by the road playing videos. Use the mouse to move around the world, scroll wheel to zoom. You can even click on those cars and move them around with the mouse.
    http://the.linuxd.org:3000/billboard-viewer/billboard-viewer_2.html

    Given all this one can stream video from your friends at the remote end. You can control that robot arm in the video. The possibilities are amazing.

    It doesn't work with Chrome running on Android, so I'll look at it later from my desktop machine.

    Yes, I've seen Chrome Experiments, and yes there are great demos. But there's a gulf between the demos and what is being done with practical projects. Personally, if I was trying to build a Web controlled robot arm, I wouldn't want to also take on building a bunch of controls as well. I would use already working out of the box technology.

    Something to consider is that Google has been trying to sell a web-based OS using Chrome and Javascript for years, but all of their success appears to be in native clients for phones and tablets! Compare the Chrome app store to what is available in the Android app store. Java (and to some extent C) are the languages of Choice for Android because it's basically Linux under the covers. Although this is true for ChromeOS as well, they're pushing the Javascript/HTML path and it is failing in the marketplace.

    Basically I've been hearing "this time it's different" mantra for thin clients since the late 1990's, and I'm still not seeing much practical success.
  • Mike GMike G Posts: 2,702
    edited 2014-04-12 08:07
    IMO, the opening post is a "How do I get started" question. It's not "What's the best way to write a UI".
    My first thought is to use a Spinneret, but I've never used one before and I didn't know if it would be a good fit.
    The Spinneret can control stuff over the interwebs. Its 4-6 open IO pins may or may not be a deal breaker - dunno. As mindrobots pointed out, research and playing around may be in order to solidify your understanding. The Spinneret is plenty powerful for many hours of TCP/UPD fun and learning.

    And I have the tutorial up...for now anyway.
  • Martin_HMartin_H Posts: 4,051
    edited 2014-04-12 08:44
    Well it seems to me that making it Web controlled makes writing the remote UI the kernel of the problem.

    Update: but I'll take the hint and avoid cluttering the thread up further.
  • Heater.Heater. Posts: 21,230
    edited 2014-04-12 09:14
    Martin_H,

    Making some controls in the browser may not be so simple, but it's not going to be horribly hard either. A ready made solution might be great. Do you know of one?

    None of what I'm suggesting here is restricted to Google or Chrome. This all works in FireFox and IE as well. Version 11 anyway. I believe it works on Safari on the Mac as well.

    I don't see the JavaScript/HTML thing failing anywhere. "web apps" seem to be sprouting up all over the place.

    No idea about Chrome OS. Only last I heard the Samsung Chromebooks were best sellers on Amazon for a while.

    No idea about the "thin clients" mantra either. Web apps can be pretty fat and work locally as well. All seems like a plan to me. In a project like the one that is the topic of this thread that is going to be networking anyway an HTML5 solution seems ideal.

    Not that I'm ready to give up my Debian yet:)
Sign In or Register to comment.