Roborealm Boe Bot is here at last
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
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
Comments
again thanks for the effort
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Problems are the "roads" of life,
solutions are only "onramps" to the next problem
············································· "Brad Smith"
·
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.
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
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
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.
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.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Whit+
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+
http://www.youtube.com/watch?v=gbf0zaxWjvI
Tom
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Robot vision is the the future, and Vision will take us there.
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
Tom
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Robot vision is the the future, and Vision will take us there.
Post Edited (T0m) : 4/25/2007 10:40:06 PM GMT
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
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
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!
Great. Who makes the camera?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Whit+
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
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
Thanks!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
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!
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
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!
Hi,
Sorry for my ignorance of mechanics, but what does "the springs are recessed and captive" mean?
Thanks again
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.
http://forums.parallax.com/attachment.php?attachmentid=46842
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Whit+
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
Thanks for the good tip on the spy camera. I'll check it out.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Whit+
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
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
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"
·
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