|
Re: Suggestion for next year's WPILib
personally, with how our team has set things up if the robot doesn't exit autonomous then its because it was not meant to, by having it run in its own task (as much as i love starting new tasks every couple of lines) it adds layers of complexity to the code setup.
Also from what i have observed it seems to me (read: what could be happening but is most likely me misinterpreting things) that when a task hits a fault it can kill a lot more than just that task, for example: at the beginning of the season we had 2 camera tasks operating on the robot, they conflicted once and caused a rather large and ugly block of text to stream into the console out (memory access violation). The robot then proceeded to stop and we were forced to reboot to get things going again. Now this may have been something completely different, maybe the robot was waiting for a semaphore to be released by the now dead task for example.
Also, a little more recently we observed that sometimes, just sometimes (it is very very annoying to track down as it is random) when starting and stopping tasks quickly or just doing it a lot the main robot task got ended (robot code light went off, task got stopped), because our watchdog expiration time was a bit high (someone got really annoyed with it one day) the robot kept going with the last sent motor values,in one case this sent it careening into a mentor, while no one was hurt and we all got a good laugh about it this is not good, and can cause things to break if the design requires something to stop at a certain place and the motor keeps running.
on the plus side of things however it gives everyone a chance to learn about multi-threading and semaphore, which is very interesting to learn. is it overly difficult for students? I don't think so, but again that isn't saying a lot.
for those that are intimidated by large, poorly edited blocks of text /and or in a hurry i'll summarize:
Good idea as it gives teams chances to learn and grow.
BUT: having more tasks=more complexity (usually) and with this comes a higher chance that something will go horribly horribly wrong
|