|
Re: Help! Velocity control with Jaguars and CAN
Not sure exactly what you're looking for, but I think you were asking how teams handled the situation of having multiple drive motors physically connected together and doing closed loop speed control.
On my team, we offloaded the PID control to the robot side of things. We use the encoders connected straight to the Jaguar for logical and wiring simplicity, and query them on the current rate through CAN, then use our own PID code to adjust the output of the Jaguars based on the encoder feedback, and using the PercentVbus control mode, which allows us to command the Jaguars to a certain proportion of their maximum output. We also make use of the Jaguar sync groups to keep them updating together. We wanted to implement a balancing scheme based on current flow, but that's been bumped to an off season project due to time.
As far as your problems go, it sounds like you have spotty communications, make sure your motors aren't fighting each other (which could cause overcurrent faults and voltage dips), make sure your CAN network is properly terminated (an unterminated network can have all kinds of weirdness due to communication breakdown). For reference we use a similar delay of about 0.05 in our code to prevent CAN overload.
Good luck,
Matt
__________________
Matt Krass
If I suggest something to try and fix a problem, and you don't understand what I mean, please PM me!
I'm a FIRST relic of sorts, I remember when we used PBASIC and we got CH Flightsticks in the KoP. In my day we didn't have motorized carts, we pushed our robots uphill, both ways! (Houston 2003!)
|