My FLL team has run into trouble because the robot behaves very differently depending on the charge of the battery. Is there a way to monitor battery voltage? How do other teams deal with this problem?
I can’t speak for the NXT, but teams using the RCX had this problem too. There is an easy way to deal with it–the rotation sensor. Use that instead of a timer, if you aren’t already, and the only thing that’ll happen is it’ll take a little longer to get to the target.
I don’t know how you’d monitor the voltage. There ought to be a battery indicator that’ll help, but I don’t kow how much or where.
Back in the days of the RCX, we had a terrible time with changing voltage. Are you using AAs or that nifty rechargeable battery pack? With AA, we found that if you put a new pair in, they have an initial voltage (charge) peak, but after a full table run through or two, the voltage (essentially the charge) remains pretty stable for multiple full table run throughs. After that, the turns started changing. I’m not sure about the battery packs, but they might have a similar behavior.
As Eric said though, making your turns use rotations instead of time will help alleviate the problem, but if you’ve got a long program these errors in rotations will still add up (or, they did with the RCX anyways).
If these still don’t help, perhaps you could follow a line to your location, or more accurately determine your location once you’ve arrived. If your robot bumps against two of the walls and you count how many rotations away from them you are, you can accurately determine your position, for example.
If using Robolab, there is a capability to read the battery voltage (on either the RCX or NXT). I don’t know if the capability exists if using NXT-G.
if you’re using leJOS, theres also a lookup for battery voltage and you can work out a simple table of Voltage against RPM.