Quote:
Originally Posted by kamocat
If you're talking about a physics simulator, I can tell you why I haven't done it:[list=1][*]It would take more work to make an accurate one than actually testing it on the robot.[*]You'll only get the results you expect. If you program a simulator, you're going to program it how you think it will act, leaving out all those quirks that you don't yet know about. This is, in effect, trying to get good functional code without ever testing.
|
I completely disagree with this.
We test autonomous via non-physics based simulation every year. We put countless hours worth of coding and debugging via simulation long before the robot ever gets built. Once we finally get to the robot it usually takes about 15 minutes to get the sensor/motor polarities all correct, about 30 minutes to tune PID gains, and about 0-15 minutes for bugs not found in simulation. Then the robot accomplishes the autonomous task to about 98% of the desired accuracy on the first run. We usually seem to get about 4 hours to test autonomous before the robot ships, so without the simulation we would be dead.
Another good example is our kicker from last year. Due to the mechanical design, a lot was required of the software. We wound up having to implement the attached state machine. It took about 15 minutes to throw together a quick simulator that got 95% of the bugs out of the software. Why not just test it on the robot? 1) it wasn't build yet, 2) even if it was build, I didn't want to break anything.