This is part of a series of posts called
Drinking From The Firehose on getting Dr Joe back up to speed on All Things FIRST.
In particular, I just posted a question on
Jags v. Vics
Today's topic:
We eat what we CAN, and what we can't, we CAN...
Yeah, I know the subject makes no sense, but there is that old joke I love about the farmer's answer to his city relative's question, "What do you do with all those tomatoes?"
The REAL topic is Jags and CAN.
Here is what I have heard from sources usually deemed reliable:
First, one danger of using CAN there are some cases where the CAN message blocks (i.e. halts) the code execution of the cRio. Threads can be used to help to contain the impact of the problem but it doesn't fully solve the problem. There are a bunch of smart folks working to try to fix this, but the end result is still uncertain.
Can anyone comment on this?
Second, if you get more than 3 Jaguars on the CAN bus, you get to the point where you can send out to the speed controller faster via PWM. From what I hear, you can send out all PWM signals at a rate of 200hz (5msec between updates) via PWMs. Note this is faster than your joystick data is coming over from the robot which I understand is 50hz (20msec).
On this topic, I am mixed. Yes there are times (in some special cases during autonomous mode, implementing a fast PID loop where sample times are critical, etc.) where 5msec update are an important feature, I can't see this being very often.
AND, if I am going to implement CAN, I am going to use PID on all but the most simple motor application, in which case, there is certainly no reason to update the Jaguars 200 times per second.
Does anyone have data on what the PID update rate is?
On another topic, I have a notion that I want to have my drive motors in PID mode but closing the loop not on position (via a pot input or via the encoders) but closing the loop the way motor control gurus have done for years, a fast loop based on velocity (in the Jaguar, hopefully) and a slow loop based on position.
There are several problems with this idea, the first of which is that the Jaguars do not support this mode.
I think it is worthy of a new thread...
All for now.
Joe J.