View Single Post
  #30   Spotlight this post!  
Unread 26-01-2013, 21:39
Mr. Lim Mr. Lim is offline
Registered User
AKA: Mr. Lim
no team
Team Role: Leadership
 
Join Date: Jan 2004
Rookie Year: 1998
Location: Toronto, Ontario
Posts: 1,125
Mr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond repute
Re: pic: Team 610 - 2013 Electronics Board

Quote:
Originally Posted by Andrew Schreiber View Post
Im interested in the CAN Error Recovery stuff. Could you elaborate?
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.
__________________
In life, what you give, you keep. What you fail to give, you lose forever...
Reply With Quote