|
Re: Yaw Rate Sensor.. Questions
1. Right, my code doesn't initialize the yaw value correctly. Duh. Anyway, I reset the value when transitioning to autonomous so it sort of doesn't matter.
2. I like working in degrees. That allows for more than simply tagging when the robot has turned 90... I.e. I can trace paths. Because there is plenty of power available I maintain a floating point accumulator. It isn't that much more expensive than calculating long values and scaling is brain dead simple.
3. The budget is pretty reasonable: two encoders + gyro and you really don't need anything else. The current IFI controller is powerful enough to do just about anything you want. Everything else is off-budget (banners, etc).
Things I do add: an RS232 buffer for the TTL serial port so I can have debug & download at the same time (the IFI terminal window is pretty wretched). I also add a quad opto-isolator. The LED side I connect across the main motor circuit breakers so if one pops, I can tell and then shut down the other side. That way the robot still goes straight, rather than slewing side-to-side as breaker do their thing. The goal is to avoid popping circuit breakers, but you never know.
|