View Single Post
  #3   Spotlight this post!  
Unread 18-01-2014, 08:07
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: Disadvantages to CAN?

Quote:
One other thing to pay attention to, is the fact that Jaguars are little computers on their own. When the voltage drops too low, like when a few CIM's stall, they reboot. If you are using any closed loop control, this will be flushed, and the default voltage control will be what you will come back to. You have to devise your own recovery code to restore the mode and parameters, unless you are just using the default mode.
This was the biggest challenge for us in using CAN Jaguars on our competition robot.

In normal match conditions, you WILL experience CANTimeoutExceptions due to voltage drop.

You need to handle these exceptions, but also be VERY careful about how you handle them. Trying to simultaneously recover multiple browned-out Jaguars by re-sending configuration commands too quickly can cause even more problems.

It is very possible to flood your CAN bandwidth, and cause the entire chain to become unresponsive / laggy. If you commit to the CAN Jags, I would recommend a 2CAN for your competition robot to give you the most CAN bandwidth. You won't end up using it all under normal conditions, but will thank me when some of your Jags reset, and you want to recover them while still sending updates to the remainder of your working Jags.

Here's code for our 2013 robot's drivetrain, which includes CAN error handling. It was a 4 Jaguar drive. We had 5 more Jaguars on the communications chain for various other mechanisms. This robot was driven off the Black Serial Adapter, but we definitely pushed the limits of it:

https://code.google.com/p/robotics61...riveTrain.java


We used to use CAN Jaguars where we wanted PID control. Our team has skilled-up significantly in our programming expertise over the past few years, and our student programmers now prefer to code their own software PID controllers. The Jag's Speed Control mode lacks Feed Forward, which is something our team feels is a requirement for effective speed control. Also, we have never been able get the expected/desired results from the Derivative term in either Position or Speed Control mode for some reason.

Honestly, I find the true strength of Jaguars to be during the prototyping phase. They are the best for getting a quick PID system running within a matter of minutes. A Jag, battery, encoder/pot, a laptop w/ black serial adapter and BDC-Comm. They were game changers for us in 2013 when we had several frisbee shooting prototypes, and were able to put very good closed loop control on each and every one.
__________________
In life, what you give, you keep. What you fail to give, you lose forever...
Reply With Quote