I have been playing around with RoboRealm’s software and I am able to get a servo to move in response to an object, but then I just realized that you need the SSC-32 for other servos as well, such as for walking.
If the SSC-32 is hooked up to the PC with RoboRealm sending commands, I won’t be able to send commands from the bot board to the SSC-32 since it is connected via the serial port. The only solution I can think of is to use another SSC-32 for just walking, but then how would you communicate between the first and second SSC-32 to respond to the video? You would want the bot to move to track a moving object.
For a rover it would be ok since you can use a speed controller to move the bot left or right, but for a legged bot, a camera servo is needed as well as the other servos for walking controlled from the same board.
Anyone have any ideas?
In the mean time, here is a VBScript that I modified to work with a pan and tilt servo. Min and Max servo movements sould be adjusted per the users configuration:
NOTE: The VBScript Pipeline should be placed above the SSC-32 pipeline.
' first check that something moving is in view
if GetVariable("COG_BOX_SIZE") > 10 then
' get the current screen width so we can calibrate movement
width = GetVariable("IMAGE_WIDTH")
height = GetVariable("IMAGE_HEIGHT")
' get the current center of movement
x = GetVariable("COG_X")
y = GetVariable("COG_Y")
' scale the image space into the servo space
x = CInt(((x/width)*2000))+500
y = CInt(((y/height)*2000))+500
' set the variable for use in the servo controller
SetVariable "servo_position_x", x
SetVariable "servo_position_y", y
end if