Shop OBEX P1 Docs P2 Docs Learn Events
Roborealm Boe Bot is here at last — Parallax Forums

Roborealm Boe Bot is here at last

T0mT0m Posts: 124
edited 2009-08-12 17:08 in Robotics
BoeVision with eb500 and Roborealm is finaly a reality. We owe a great deal of thanks to STeven at Roborealm, Jeff aka Unsoundcode, and Andy Lindsay for contributing. Jeff's help has been fantastic despite his screen name, I can honestly say we would still be waiting had it not been for Jeff's insight. Anyway here it is, as promised in one of my posts a few weeks back. To use this code you should checkout the color tracking tutorial at roborealm's web site.

Bs2 code:

' {$STAMP BS2}
' {$PBASIC 2.5}
x VAR Word
y VAR Word
main:
SERIN 0,84,[noparse][[/noparse]WAIT ("!"),DEC4 x,DEC4 y]
PULSOUT· 14, x
PULSOUT· 15, y
PAUSE 5
GOTO main

VB code for Roborealm:

· ' initialize our start motor values to neutral
· left_base = 750
· right_base = 750
· ' get current image size
· width = GetVariable("IMAGE_WIDTH")
· center = width / 2
· ' get the size (width or height) of the current
· ' bounding box
· size = GetVariable("COG_BOX_SIZE")
· ' if it is equal to "" then no object was detected
· if size <> "" then
··· ' get the horizontal center of gravity found by the COG
··· ' module
··· cogX = GetVariable("COG_X")
··· ' if it is less than 75 the blob is on the left side
··· ' of the screen so move that way
··· if cogX < center-5 then
····· left_base = 750-(center-cogX)/2
····· right_base = 750
··· ' otherwise move to the right if above 85 pixels (and no
··· ' movement if 75 < cogX < 85 )
··· elseif cogX > center+5 then
····· left_base = 750
····· right_base = 750-(cogX-center)/2
··· end if
··· ' if the ball is too close then we have to move backwards
··· if (size>90) then
·left_motor = left_base-((40-size)*2)
····· right_motor = right_base+((40-size)*2)
·' otherwise move forward
··· else
····· left_motor = left_base-((size-40)*2)
····· right_motor = right_base+((size-40)*2)
··
····
··· end if
··· ' set the final motor values to be picked up by
······· SetVariable "LEFT_MOTOR", CInt(left_motor)
··· SetVariable "RIGHT_MOTOR", CInt(right_motor)
···
end if

serial·send sequence·for Roborealm:

! [noparse][[/noparse]Left_motor] <lf> [noparse][[/noparse]Right_motor] <lf>


Enjoy
Tom

P.S. If you see ways to improve this code please let us know. Thanks



·

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Robot vision is the the future, and Vision will take us there.

Post Edited (T0m) : 4/20/2007 6:23:47 AM GMT
«13

Comments

  • WarrlokWarrlok Posts: 77
    edited 2007-04-21 03:32
    Awsome job guys ,, I was just getting into roborelm when i had to reinstall windows so it,ll be awhile before i can try it ,, i really want to try using ir cameras and scanning ir lasers jumpin.gif

    again thanks for the effort

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Problems are the "roads" of life,
    solutions are only "onramps" to the next problem



    ············································· "Brad Smith"
    ·
  • T0mT0m Posts: 124
    edited 2007-04-21 23:12
    Hi Guys,

    Here is a link to Video of Boe Bot with eb500 running with roborealm. The cam is placed between BOE board and aluminium base at front. I will have·the cam·mounted on pan and tilt accessory soon. Video is here http://www.youtube.com/watch?v=mngim02Cqec·I have modified the code alittle more (after some strange behavior from Boe Bot) and will be posting it soon.

    Tom

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Robot vision is the the future, and Vision will take us there.
  • T0mT0m Posts: 124
    edited 2007-04-23 03:19
    Here is an update to roborealm vb script program. Some bugs have been worked out. I'm running Roborealm with camera setting at 160*120 if you run it at any other size you will have to adjust script where size·is called.
    Tom

    Thanks Jeff

    ' initialize our start motor values to neutral
    left_base = 750
    right_base = 750


    ' get current image size
    width = GetVariable("IMAGE_WIDTH")
    center = width / 2

    ' get the size (width or height) of the current
    ' bounding box
    size = GetVariable("COG_BOX_SIZE")

    ' if it is equal to "" then no object was detected
    if size <> "" then

    ' get the horizontal center of gravity found by the COG
    ' module
    cogX = GetVariable("COG_X")
    ' if it is less than 75 the blob is on the left side
    ' of the screen so move that way
    if cogX < center-5 then
    left_base = 750-(center-cogX)/2
    right_base = 750
    ' otherwise move to the right if above 85 pixels (and no
    ' movement if 75 < cogX < 85 )
    elseif cogX > center+5 then
    left_base = 750
    right_base = 750+(cogX-center)/2
    end if
    ' if the ball is too close then we have to move backwards
    if (size>90) then
    left_motor = left_base+((40-size)*2)
    right_motor = right_base-((40-size)*2)
    ' otherwise move forward
    else
    left_motor = left_base-((size-40)*2)
    right_motor = right_base+((size-40)*2)
    end if
    ' set the final motor values to be picked up by
    ' the SSC module
    end if
    if (size<20) then
    left_motor=750
    right_motor=750
    end if
    SetVariable "LEFT_MOTOR", CInt(left_motor)
    SetVariable "RIGHT_MOTOR", CInt(right_motor)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Robot vision is the the future, and Vision will take us there.

    Post Edited (T0m) : 4/23/2007 4:02:37 AM GMT
  • WhitWhit Posts: 4,191
    edited 2007-04-23 05:11
    Is the BOE Bot running on a BS2 or some other Stamp? Great video!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Whit+
  • T0mT0m Posts: 124
    edited 2007-04-23 05:15
    Hi Whit,
    Running on bs2.
    Heres the code for bs2:

    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    x VAR Word
    y VAR Word
    main:
    SERIN 0,84,[noparse][[/noparse]WAIT ("!"),DEC4 x,DEC4 y]
    PULSOUT 14, x
    PULSOUT 15, y
    PAUSE 5
    GOTO main

    Thanks for the compliment.

    Tom

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Robot vision is the the future, and Vision will take us there.
  • T0mT0m Posts: 124
    edited 2007-04-23 17:50
    Hi Guys,
    Next is the code for Pan and Tilt.·It is my hope that I can have the Boe Bot Pan around when Roborealm loses sight of object. Attached is a pic of my Pan and Tilt setup with camera mounted

    Tom

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Robot vision is the the future, and Vision will take us there.
    723 x 633 - 80K
  • WhitWhit Posts: 4,191
    edited 2007-04-23 22:56
    T0m said...
    Hi Whit,
    Running on bs2.
    Heres the code for bs2:

    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    Duh! Sorry I didn't look at the program. It just seems to move quickly and smoothly.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Whit+
  • WhitWhit Posts: 4,191
    edited 2007-04-24 01:42
    TOm,

    I'd love to see a video of the pan and tilt setup in operation. You're milling of the parts is really nice.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Whit+
  • T0mT0m Posts: 124
    edited 2007-04-25 18:14
    Here is a new video of Boe Bot with Pan and Tilt accessory.

    http://www.youtube.com/watch?v=gbf0zaxWjvI

    Tom

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Robot vision is the the future, and Vision will take us there.
    1024 x 768 - 346K
    1024 x 768 - 335K
    1024 x 768 - 338K
  • XNORXNOR Posts: 74
    edited 2007-04-25 19:41
    T0m said...

    Image Attachment: DSC00024.JPG

    Hi Tom,

    I like your bumper design.

    It looks like the bumper attachment screws move through the PVC frame when the bumper gets depressed.
    How do you keep the screws from binding in the PVC when they get pushed in?

    Thanks

    smile.gif
  • T0mT0m Posts: 124
    edited 2007-04-25 21:18
    The holes are oversize and the springs are recessed and captive.
    Tom

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Robot vision is the the future, and Vision will take us there.

    Post Edited (T0m) : 4/25/2007 10:40:06 PM GMT
  • WhitWhit Posts: 4,191
    edited 2007-04-25 22:45
    Tom,

    The pan and tilt is really neat and the video really shows how well it works. The pictures of the contruction of the whole unit are nice too. All the details are nicely done. It must be fairly light too (or does the battery on the back help·counter the weight of the pan and tile and camera (roborealm components)?·Excellent job with the whole project. What is the approximate cost (including the roborealm components)?






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

    Post Edited (Whit) : 4/25/2007 10:50:45 PM GMT
  • T0mT0m Posts: 124
    edited 2007-04-25 23:30
    Hi Whit,
    The Roborealm software is a free down load at their site ( www.roborealm.com ). The bluetooth adapter eb500 is here http://www.parallax.com/detail.asp?product_id=30068·for $69.95 I have·a Pan and Tilt listed on ebay here:

    http://cgi.ebay.com/Boe-Bot-Robotics-Pan-and-Tilt-addon_W0QQitemZ290109787771QQihZ019QQcategoryZ19198QQssPageNameZWDVWQQrdZ1QQcmdZViewItem

    The Pan and Tilt assembly is fairly light, expanded pvc, and mini servos. The camera battery does help. If I were not using the 9 volt battery I would have to turn the servos over to have the axles closer to the front. I have used the pan and tilt accessory with a ping sensor and without the camera battery, with the servo axles foward it worked great. The picture in my previous post shows boe bot with axles foward although it is alittle hard to see.

    Tom

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Robot vision is the the future, and Vision will take us there.

    Post Edited (T0m) : 4/25/2007 11:40:34 PM GMT
  • Tom CTom C Posts: 461
    edited 2007-04-26 01:44
    Hi T0m,

    What kind of bluetooth rf modem are you using with your pc to communicate with the eb500-SER?

    I am presently considering the eb501-SER Serial Adapter made by A7 Engineering which makes the eb500-SER.

    The eb501-SER Serial Adapter has a SMA antenna connector so an external antenna can be added to the·unit·to extend its range out to 1Km.

    Regards,

    TCIII

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If you are going to send someone to save the world, you·better make sure that they like it the way it is!
  • WhitWhit Posts: 4,191
    edited 2007-04-26 02:41
    Tom,

    Great. Who makes the camera?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Whit+
  • T0mT0m Posts: 124
    edited 2007-04-26 02:43
    Hi Tom C,

    I am using a Kensington model 33348 Bluetooth USB Adapter 2.0

    Thanks
    Tom

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Robot vision is the the future, and Vision will take us there.


    http://www.youtube.com/watch?v=gbf0zaxWjvI

    Post Edited (T0m) : 4/26/2007 2:48:29 AM GMT
  • T0mT0m Posts: 124
    edited 2007-04-26 03:36
    Hi Whit,
    The camera is one of those cheap spy cams from ebay. I have seen them anywhere from $25.00 to $50.00 Here is link to one I found today:
    http://cgi.ebay.com/New-Wireless-Pinhole-Spy-Camera-Hidden-Spycam-Nanny-Cam_W0QQitemZ110119296258QQihZ001QQcategoryZ48632QQrdZ1QQcmdZViewItem

    Tom

    P.S. there are currently 40 spycams listed on ebay.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Robot vision is the the future, and Vision will take us there.


    http://www.youtube.com/watch?v=gbf0zaxWjvI
  • WhitWhit Posts: 4,191
    edited 2007-04-26 04:04
    Tom,

    Thanks!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Whit+
  • Tom CTom C Posts: 461
    edited 2007-04-26 06:44
    Whit,

    I have one of the spy cameras that T0m linked to ebay except that I got it from computergeeks.com for $39 plus shipping.

    If you follow T0m's link you will notice that the receiver has a tuning knob on the back.

    The more expensive receivers do not have the tuning knob on the back and switch channels by button selection.

    There are apparently four camera channels available and the spy cameras have a dip switch to select a transmission channel.

    The bottom line is the manually tuned receivers can be hard to tune to the appropriate camera transmission frequency especially if the camera is fairly far away.

    I plan to replace the manually tuned receiver with one of the button selection style units since I have more than one robot with an attached spy camera.

    Just a thought.

    Regards,

    TCIII





    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If you are going to send someone to save the world, you·better make sure that they like it the way it is!
  • T0mT0m Posts: 124
    edited 2007-04-26 14:41
    Hi Tom C,
    Thanks for the tip. I was looking for a way to make a soccer bot with the pan and tilt, but I was stuck on the cam frequency. At least now I can have 4 players. And just for the record I have had no trouble tuning my cam and the range is more than adequit for my application. How much do the more expensive ones cost and where can I find one?
    Thanks Again
    Tom

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Robot vision is the the future, and Vision will take us there.


    http://www.youtube.com/watch?v=gbf0zaxWjvI
  • Tom CTom C Posts: 461
    edited 2007-04-26 19:11
    Hi T0m'

    I have seen the more expensive ones at like Frys Electronics and are usually made by Swann and cost around $90.

    You can checkout a selection of wireless cameras for robotic purposes here: http://www.superdroidrobots.com/shop/category.asp?catid=37

    Hope this helps.

    Regards,
    TCIII

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If you are going to send someone to save the world, you·better make sure that they like it the way it is!
  • XNORXNOR Posts: 74
    edited 2007-04-26 20:47
    T0m said...
    The holes are oversize and the springs are recessed and captive.
    Tom

    Hi,

    Sorry for my ignorance of mechanics, but what does "the springs are recessed and captive" mean?

    Thanks again

    smile.gif
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-04-26 20:58
    Theres no special meaning in mechanics for the phrase

    recess - an indentation or small hollow
    recessed - an item placed within a recess
    captive - kept in confinement or restraint

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • WhitWhit Posts: 4,191
    edited 2007-04-26 21:07
    The picture above (and at the link below) shows the recesses in the bumper. You can see how it holds the springs in place (that is captive).
    http://forums.parallax.com/attachment.php?attachmentid=46842

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Whit+
  • T0mT0m Posts: 124
    edited 2007-04-26 21:09
    Sorry about that, words are words to me, wether they be in mechanics or screen plays.
    The springs hold the Bumper in position and keep the screws centered in over size holes. As Paul has pointed out the springs are placed in a recess and are held in confinement so that they cannot move in a radial manner.
    Tom

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Robot vision is the the future, and Vision will take us there.


    http://www.youtube.com/watch?v=gbf0zaxWjvI
  • WhitWhit Posts: 4,191
    edited 2007-04-26 21:17
    Tom C,

    Thanks for the good tip on the spy camera. I'll check it out.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Whit+
  • WarrlokWarrlok Posts: 77
    edited 2007-04-28 02:25
    T0m said...
    Hi Guys,
    Next is the code for Pan and Tilt.·It is my hope that I can have the Boe Bot Pan around when Roborealm loses sight of object. Attached is a pic of my Pan and Tilt setup with camera mounted

    Tom
    Ive got to get to work on this ,,,problem 1,, i thought ypu had to have 2 eb500,s to make it work so i ordered a iogear bluetooth serial adapter and usb BT adapter sort of wanted one anyway for my ssc 32(roborelm has support for it too i see)·anyway coding should work the same??,,, 2 i need a better battery ,,batteries,,heres my baby so far

    http://img407.imageshack.us/my.php?image=dscf0115um9.jpg

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Problems are the "roads" of life,
    solutions are only "onramps" to the next problem



    ············································· "Brad Smith"


    Post Edited (Warrlok) : 4/28/2007 2:32:06 AM GMT
  • T0mT0m Posts: 124
    edited 2007-04-28 03:36
    Warrlok
    Cool Robot can you tell us more about it
    Tom

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Robot vision is the the future, and Vision will take us there.


    http://www.youtube.com/watch?v=gbf0zaxWjvI
  • WarrlokWarrlok Posts: 77
    edited 2007-04-28 13:20
    Thanks Tom its your basic BoeBot with a ssc32 and MATTRACKS·and a 4 DOF arm made from lynxmotion·· ses parts and a wirelesscamera with a ping on top its soon to have a iogear BT serial adapter and gps ,,,

    It needs another BOE body attached in tandum·too balance it (i got 2-9.6 batteries weighing down the rear,,,i think i,m gonna rework the arm and shrink it down so i can have my gripper back ,,,got to get more parts,,,i had the arm with gripper attached to the front,,,there so many ways these things can go together ,,,i see on your bot that you got those servocity super servo,s did you gear it up for more speed?...and where did you get that camera mount·thats what i was looking for !!!....

    I wish i could pull the parallax andthe lyxmotion guys together they got some sick robots coming out and u guys have got the chips and the brains make them work ,,,i think this is the year of the robot we just have to nudge it along and if i can get roborealm working it,ll open doors ..............................



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Problems are the "roads" of life,
    solutions are only "onramps" to the next problem



    ············································· "Brad Smith"
    ·
  • T0mT0m Posts: 124
    edited 2007-04-28 19:05
    Hi Brad,
    One thing I can see that might help with balance is to flip the servos over so that the axles are further foward. You should see a big difference. I made the camera mount on my mill.
    Tom

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Robot vision is the the future, and Vision will take us there.


    http://www.youtube.com/watch?v=gbf0zaxWjvI

    Post Edited (T0m) : 4/28/2007 7:19:36 PM GMT
Sign In or Register to comment.