Yeah. When we enable autonomous, the Robot Code and then the Communication lights cut out. Our autonomous function looks like:
void Autonomous(void) {
d_base->SetSafetyEnabled(true);
Timer timer;
timer.Start();
while (IsAutonomous()) {
[INDENT]Aim();
GetWatchdog().Feed();
Wait(0.01);
}[/INDENT]
}
d_base is our RobotDrive, Aim() uses a modified version of the 2012 Vision example, and there’s a problem that may or may not be related. In messages, whenever the robot starts, we get “ERROR: Attempted to reuse allocated resource: Forward Relay 1 (Module: 1) …in Allocate() in C:/WindRiver/workspace/WPILib/Resource.cpp at line 76.”
When we comment out the vision code, autonomous doesn’t cut communication, but the reuse error still comes up and it prints “ERROR: A timeout has been exceeded: RobotDrive… Output not updated often enough …” etc even though Expiration is set at 0.1s and we are feeding the watchdog every 0.01s. We also kind of need the vision code working to help aim/autoaim. Help would be appreciated.
I would put a smiley here, but they are too smarmy for my tastes, so I’ll put them lower instead.