View Single Post
  #6   Spotlight this post!  
Unread 26-01-2013, 22:06
Andrew Schreiber Andrew Schreiber is offline
Data Nerd
FRC #0079
 
Join Date: Jan 2005
Rookie Year: 2000
Location: Misplaced Michigander
Posts: 4,057
Andrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond repute
Re: pic: Team 610 - 2013 Electronics Board

Quote:
Originally Posted by Mr. Lim View Post
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.
__________________




.
Reply With Quote