View Single Post
  #1   Spotlight this post!  
Unread 11-02-2005, 17:08
SeanCassidy's Avatar
SeanCassidy SeanCassidy is offline
Antiregistered User
#0263 (Aftershock)
Team Role: Programmer
 
Join Date: Oct 2003
Location: Holtsville, NY
Posts: 37
SeanCassidy is an unknown quantity at this point
Camera stops working when we use camera_set_servos()...

Ok so we're trying to make our camera pan back and forth until it sees the vision tetra, then lock and track. However it appears that whenever we call camera_set_servos() it stops searching for a color, and when we tell it to look for a color ( camera_find_color() ) it then appears to recenter the servos; we're stuck. Is there any solution to our problem?

This code block is inside Camera_Processing(), before it's own tracking routine.

Code:
  if(!tracking)
  {
    camera_set_servos(cnt,128);
    cnt += dir;
    if(cnt == 210)
      dir = -5;
    else if(cnt == 40)
      dir = 5;
    
    printf("Didn't find it: %d\r",cnt);
  }
Now, when we had it in other places using 'if(cam.conf < 60)' or something similar to track it, we had the same problem. I believe the problem with the reseting servos, is using camera_reset() in camera_find_color(). But, the real problem, IMO, is the mysterious breaking of the camera while using camera_stop() (and therefore camera_getACK(), while using camera_set_servos). I really hope it's something really silly.