Quote:
Originally Posted by Mr. Lim
We coded our robot in Java using the Command-based template.
Within each subsystem that used a Jaguar, we ensured that whenever we caught a CANTimeOutException, we called a subsystem-specific recovery method to re-initialize and verify the configurations of all Jags within that subsystem.
This ended up being a bit tricky for some sub-systems, as we switched Jaguar configurations depending on the task we were doing. i.e. the drivetrain could be in VBus, Position, or Speed mode at different times in the match. We had to keep track of these states, and restore them gracefully.
We had to handle the deadlock condition as well, because sometimes the error recovery would cause more CANTimeoutExceptions if the affected Jag wasn't ready to be re-initialized. Gracefully handling this condition without stopping your entire CAN communications bus was a bit tricky.
At worst we only wanted a single sub-system to "pause" just long enough to gracefully re-initialize the Jaguars after an exception. All the other sub-systems had to keep going as if nothing happened.
|
Interesting, maybe I'll have to chat with you guys in more depth post season about this. We use Iterative and C++ so your approach wouldn't work for us.