View Single Post
  #2   Spotlight this post!  
Unread 26-01-2005, 23:25
russell's Avatar
russell russell is offline
Registered User
#1430 (WRONG)
Team Role: Electrical
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Anchorage AK
Posts: 402
russell is a name known to allrussell is a name known to allrussell is a name known to allrussell is a name known to allrussell is a name known to allrussell is a name known to all
Re: Have you gotten your robot to go towards the vision tetra?

I got our kitbot camera stuff working great. Only problem is that I still am unsure on how to go about putting it in the autonomous section. I will figure that out once I have our final robot to play with.

Here is what I did:

Once I got the camera to track the targets I mounted it on the robot and connected the left motors to pwm12 and the right motors to pwm11. Then with the robot on blocks I tested it just to make sure it sort of worked. It did. Then I set it up in a carpeted room that had marginal lighting and lots of yellow walls, blue tables, and lights that apparently look green. So I set up a worklight to illuminate the red target and played around some more. The code I was using is at school so all I can tell you will have to be from memory. First I modified the code by creating an if statement directly below the one that does the camera driving in user_routines.c that had all the same conditions as the one above but also the camera was pointing down a certain amount then set both pwms to 127. Then I modified the conditions for that statement that actually does the driving to say only drive it if the camera angle is higher than that same angle. This would have worked OK if we had been using braking but we were not so I also put in another similar statement that made it slow down for the last few feet. One thing I found is that you want to find a good drive speed (about 155 if you are using kitbot) then find a steering compensation variable that works with it. Once you have that if you decide to change the drive speed try to keep the steering compensation proportional to the speed (if you double the speed then double the steering compensation, etc). You may also want to play with a way to change what value the servos use as center. I had some simple way but I foget exactly what it was. I did all of this last week, and we have since dissassembled kitbot.

Anyway kind of long, and nothing really brilliant, but I hope it helps.