Quote:
Originally Posted by ratdude747
... if I am going to write a lot of code, I'd rather it be on my manipulator/camera tracking than on my drive code...
|
I will disagree with you on this one.
Our 2011 robot has about as much code running the drivetrain as it does running the elevator/claw system as a whole (minibot is separate, and much smaller).
Why?
Closed-loop drive control has a few blocks to it, logic to coast out stops, logic to hold position, gain scheduling based on shift state, etc.
Autoshifting has a block to it, its a lot of tuned logic operations.
Lift piston management has a few blocks, to lift the rear wheels when turning, and another one to lift the inner one in an arc.
HMI has a bunch of blocks, for arc management, speed derating at high elevator positions, drive line inversion, and such.
The elevator and wrist, on the other hand, has:
A really big state machine that actually runs the elevator
A reality check that prevents driving through the elevator with the wrist (or the wrist with the elevator), some of the going backwards logic.
A P controller with gain scheduling
An anti-stall-death algorithm
What I'm saying is that the little code things you write to optimize performance in the drivetrain add up to the one really big state machine plus a few other blocks you write for the mechanism. For us, the optimization effort is worth it, I guess that depends on your teams coding resources.