You're welcome to all of it:
https://github.com/ligerbots/Recycle...ree/dartFriday
Specifically, if look at line 149 of Robot.cpp in AutonomousInit(). You'll see a commented out line:
Code:
autonomousCommand = (CommandGroup *)new DrivePID(100.0, 100.0);
Note that DrivePID is a command (i.e. derives from the WPILib Command class). The assignment above shouldn't work. But it does. It's the only thing we've gotten to work in autonomous -- running a single command.
When we assign a class that instead derives from CommandGroup (so we can do things like AddSequential and AddParallel),
which is how we thought this was supposed to work the first call to Scheduler::GetInstance()->Run(); in AutonomousPeriodic goes away and never returns. I traced a couple of instruction into it, and it definitely looks like its been passed a class other than what it expects and is thus calling through a random vtable pointer. We don't get a segfault, but nothing in the program runs after that.
The code at that Git repository right now is the code that fails (but that might change if I can find a fix tonight).
John and I have been trying to find examples of a working Iterative Robot C++ autonomous without success so far, but we'd be very happy if someone can look at our code and tell us we've done thing stupid and obvious..