|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
||||||
|
||||||
|
Jaguars and FAST PID Looptimes
First off, I am back. This time I'm working with Overclocked, #246.
Second, you'll all be shocked SHOCKED our Fall Practice Project* is a swerve drive chassis** Third, since we want to this chassis to go the direction we want it to go and we don't want to be waiting around for the steering error to settle down to an acceptable level, we are going to put as much power as we dare into the steering angle drive . Bottom line, we are using a Banebot RS775-18 on each wheel (and there are 4 of course, 4 wheel independent steer swerve -- how could we do less?). So... we get the torque we need and still have the speed we want. BUT... speed has a dark side. Speed is hard to control, especially at 50hz update rates typically used in FIRST control loops (I want to have 90 degree step change in steering angle in under 60ms -- probably too fast to have a 20ms loop time). I hear good things about the not yet available Talon SRX (coming soon to a FIRST Legal robot near you) but hearing good things doesn't help me today if it isn't available. So, we are left with Jaguars. Now comes my question: Has anyone had good luck using the Jaguar's in their PID mode with high speed actuators and very fast loop times? If so, please let me know in the comments below. I want to know the good the bad and the ugly. Also, Jaguars are also unavailable for sale these days. Anyone willing to sell (or loan) me 4? If so, PM me with details. Stay tuned for more results and videos as the project progresses. Joe J. *Yes, Fall Practice Projects are a thing. If your team is not doing one or more of them, you should be. **Super Thanks go to Anthony Lapp and his company, Team221 Robotics, for helping us out with Wild Swerves. Literally wouldn't have been able to do this practice project without building off a solid swerve design. Last edited by Joe Johnson : 27-10-2014 at 09:25. |
|
#2
|
||||
|
||||
|
Re: Jaguars and FAST PID Looptimes
First off, Welcome back!
It is good to hears from you again. In fact, I was literally just thinking about you this morning while considering a simple transmission design. I'm looking forward to what you find in your search for the ability to do a 90 deg step change in under 60ms. This should be FUN!! |
|
#3
|
|||
|
|||
|
Re: Jaguars and FAST PID Looptimes
Quote:
How did you come up with 90 degrees in 60 ms? |
|
#4
|
||||
|
||||
|
Re: Jaguars and FAST PID Looptimes
I remember seeing something that said although the jags can do PIDs, they are hard to implement.
|
|
#5
|
|||||
|
|||||
|
Re: Jaguars and FAST PID Looptimes
Quote:
On the other hand, velocity PID on a Jaguar is much harder to do. Fortunately, once you understand why it doesn't work the way it "should", tuning it becomes a lot less frustrating. |
|
#6
|
||||||
|
||||||
|
Re: Jaguars and FAST PID Looptimes
Here's a summary of update rates
Servo: 50hz Victor and Talon: 100hz (changeable with SetPeriodMultiplier) Jaguar PWM: 200hz Jaguar PID: 1000hz, but you can't read status or set setpoints anywhere close to that fast Driver Station: 50hz Java iterative methods: synced to driver station C++ iterative methods: synced to driver station by default, changeable with SetPeriod WPILib PIDController: 50hz, changeable by changing period parameter in constructor Last edited by Joe Ross : 27-10-2014 at 15:17. |
|
#7
|
||||||
|
||||||
|
Re: Jaguars and FAST PID Looptimes
Quote:
Kinda creeped me out frankly. I know that the Jaguar comes with it's own baggage but at least it lets me find out if an updated loop time allows for sufficient control. I may try a half measure where for this project (not FIRST legal obviously) where I put a coprocessor between the CRio and a Talon that is doing the PID loop itself. Kind of a Kludge but answers the question of "can a Talon SRX do this?" As to the oddly specific spec of 90 degrees in 60ms, it falls out of a calculation for path following at the various speeds of interest. But in actual fact, it is somewhat arbitrary (faster is better could have been the spec), but part of the point if a Fall Practice Project is to discover the edges of what is possible. The easiest thing in the world is to slow the steering rate down. And I may have to go there, but i am not starting there. Joe J. Last edited by Joe Johnson : 27-10-2014 at 14:06. |
|
#8
|
||||
|
||||
|
Re: Jaguars and FAST PID Looptimes
Good to see you coming back to your roots with swerve.
The issue with all this is available energy and where it gets absorbed. We used window motors for steering for years until the rules limited them to 2. Then we decided on AM9015 motors because the range of BaneBot motors is more versatile. It became quickly obvious that four 85 amp motors and four 120 amp motors all turning on at the same time was more than the battery could supply as the voltage at the terminals of a fully charged Enercel fell to 8 volts. We monitor battery resistance and cycle test and haven't found another brand that is better yet. Some are worse. Most battery specs list max current draw at 20 or 50 amps. We know that isn't possible. We also shorten the 6 gauge wire as much as possible and use 10 gauge to larger motors. This actually makes the problem more acute. This year we are limiting the AM9015s to 75% output but if driving aggressively, the two 775s driving the catapult don't get enough energy to fire. They draw close to 40 amps to start. We used Talons for the drive motors and Jaguars for the rest so we couldn't deduce all power consumed. Next year should be easier as the PDP will allow monitoring of all current sources. The robot will just make it through a 2 minute match with normal driving and defense before the battery charge is reduced to the point that it affects operation. That reads about 80% charge on a Battery Beak after a match. More aggressive steering with defense or a less than absolutely fully charged battery hinders performance by the end of the match. Bottom line is you can choose to steer fast or accelerate fast but not both at the same time. Whatever is left has to operate also. If the Catapult delays firing for a second the shot is usually missed. I'm looking into improving steering efficiency and reducing motor size but until then power management is the only option. This never seemed to be a problem before the larger steering motors arrived. |
|
#9
|
|||||
|
|||||
|
Re: Jaguars and FAST PID Looptimes
Quote:
How much acceleration is needed for swerve steering? Is Dr. Joe correct about 90 deg in 60 ms? What trajectory, maybe some kind of spline to reduce or eliminate jerks? How important is swerve module moment of inertia about the steering axis? How important is scrub? Will overhung motor mass and fat treads be significant factors? (Is Ether reading this?) John, what do you think are the window motor attributes that kept this from being a problem in the past? Can a motor engineer help with this? |
|
#10
|
||||
|
||||
|
Re: Jaguars and FAST PID Looptimes
Quote:
One thing I blew over was whether the strategy is to turn to the intended direction before driving the wheels. Our main driving mode relies on constantly correcting the direction which means running all motors at once. |
|
#11
|
||||
|
||||
|
Re: Jaguars and FAST PID Looptimes
I am lurking <smile>.
The 90deg/60ms discussion reminds me of a sentence in the last two paragraphs in the swerve inverse kinematics paper1 I posted in March 2011. Quote:
1 FWIW, I recently wrote an integer-math implementation of swerve reverse kinematics for Anthony Lapp for a project he was working on to run swerve on ATmega2560. He has a video posted here. |
|
#12
|
||||||
|
||||||
|
Re: Jaguars and FAST PID Looptimes
ChiefDelphi never disappoints.
Thanks to all for the great input. As to John Novak's comments, you've definitely given me a lot to think about. When the Bomb Squad speaks about swerve, you'd have to be a fool not to listen. I am curious about a window motor working better than a higher power motor. It's not obvious why you couldn't gear the higher power motor down to the point that it was pulling less power than the window motor (which is purposefully designed to be inefficient so that it will not backdrive and let your windows fall as you drive). In any case, I will take your advice to keep an eye on overall current draws, especially when shooting mechanisms that are current sensitive are involved. I have a question about the speeds you discuss. You say you have a 9:1 ratio and I think you guys are a 4" wheel shop these days (which roughly checks with your 12 fps top speed). You happy with that? Do you guys wish you had a bit more metal in the pedal when zipping back and forth across the field? Do tell. As to Joe Ross, do the Jaguar's really have 1ms update periods when in PID mode? I don't need to read the sensor anywhere near that fast so that doesn't both me but I would like the faster loop time. (Yes, I know Jaguars have other baggage - but remember this is a Fall Practice Project -- I can afford to take risks now that I would be very hesitant to take come January). Finally, a question for Ether, but of course, all are welcome to comment. Given a 4 wheel independent steer swerve, with the 12fps top speed our good friends from Mountain Home report, what is the minimum steering angle speed you'd recommend before the vehicle kinematics would be compromised? Joe J. |
|
#13
|
|||
|
|||
|
Re: Jaguars and FAST PID Looptimes
Quote:
|
|
#14
|
||||
|
||||
|
Re: Jaguars and FAST PID Looptimes
Quote:
Quote:
|
|
#15
|
||||
|
||||
|
Re: Jaguars and FAST PID Looptimes
Quote:
As a practical matter, as the steering response gets slower and slower, you get more and more wheel scrub, especially during rapid evasive maneuvers. Eventually I suppose you'll reach a point where the vehicle starts exhibiting undesired or unpredictable "macro" behaviors. Calling all teams who have deployed successful "Unicorn" swerves with 3DoF driver interface: please share your experience/data concerning steering dynamic response. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|