|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools |
Rating:
|
Display Modes |
|
#46
|
|||||
|
|||||
|
Re: pic: FRC973 Presents Emperor Swerve
We have a working idea of a 4 wheel path planner that assures we completely avoid the issue. The downside is that you are spending a little bit longer steering in most cases.
In the initial code, we didn't change drive directions to make it easier on the steering. We realized this is totally against our team's philosophy and we'll flip drive directions to reduce response times. If it breaks, we'll make it stronger. This changes our maximum error from 180* to 90*, already greatly helping the problem. We also plan to limit the drive output as a function of error (starting with cosine because it's convenient, maybe testing other functions. I think we shouldn't ever drive with more than 45* of error, and scale up from there). This has the added effect of avoiding the side scoot. We feel with these two changes we may be able to avoid the tediousness of a 4-wheel path planner, but testing will tell. Driver practice should massively help as well, as they'll learn how to properly drive it for maximum response. My fear is we will have to start limiting drivespeed as a function of the error any wheel happens to be pointing at as well, our current code lets a wheel with zero error go full power when pointing at a wheel completely normal to it. Now, this case is unlikely to develop, but only testing will tell. At some point we plan to record all important values of the robot, so we can pull it off the robot to graph. This will allows to see what bad cases we're running into, and also what cases the driver is routinely driving. Hopefully we'll be able to optimize the code to improve this. Our team, like several other west coast teams, is used to fast and responsive 6wd's that never feel laggy. Our goal is to get the crab to where a driver from any of these teams wouldn't complain about the "lag" of crab. It's a high goal, but when we reach it it should result in one heck of a system. I'm really rambling now, but as a controls/mechatronics concentration in my Mechanical Engineering major, I love this robot. More than any system we've made in the past I've really been able to show the kids what it is that I do, and although they can't derive some of the higher level stuff on here, they all understand the concept of it. It's also spurred one of the biggest design/controls debates we've ever had on how exactly we want to solve the path problem, with kids really coming up with some good ideas (and even spotting the crashing case well before it even occurred to me!). Quote:
|
|
#47
|
|||||
|
|||||
|
Re: pic: FRC973 Presents Emperor Swerve
We fixed the "weird electrical issues" and got it driving in much more responsive fashion.
If you try to read more than 4 encoders at 4x resolution, the remaining encoders will always repeat a zero value. After hours of debugging, seeing the encoders actually generate pulses, but not increment, we were going crazy. Austin on 254 tipped us off to the issue and we fixed it. Video was taken, but it was on a tether cable. I promise we'll get good video this coming weekend when we drive with radios. |
|
#48
|
|||
|
|||
|
Re: pic: FRC973 Presents Emperor Swerve
I like the module concept. Swerve is complex and many modes of failure . With independent modules if something goes wrong don't fix it on the bot. Remove the module and replace it. Fix it later. We can remove a module and have the new one installed in less than 10 Minutes. How fast can you remove one of you modules?
Yes, you can use a quadrature encoder with indexing for the steering but , why not use an absolute encoder? The C-rio only has 4 4x encoders. Why not save them for velocity needs? I believe the code is cleaner with absolutes. You mention that you are not doing least distance calculations for steering angle. A properly coded least distance algorithm will not allow the wheels to be in a conflicting position. There is always a smooth transition from current position to the new set points. It also makes the steering much more responsive. If you using window motors, I hope you have removed the locking pins and are using victors. We have not found that multi-speed is needed. It also is 1 more degree of freedom for the driver to have to master. Field centric control? From our experimentation I do not believe there is an affordable gyro or INU that can remain accurate over the time frame of tele op. However we will have a gyro on the bot for 2012 to assist with autonomous navigation. The one problem with swerve is the robot doesn't like to go straight with dead reckoning for very far. Why go thru the pain and suffering of swerve development? Because it is hard. It's amazing how the stress of swerve development has made our students and team grow intellectually and from and organization perspective. Also , it was pure joy when a tank bot came flying at us from across the field and our driver executed the side slip move. We also can have our way with mecanum bots. Do you have a 3d model of the module that you could post. This is ours let's see yours. http://wiki.team1640.com/index.php?t...II_Drive_Train |
|
#49
|
|||||
|
|||||
|
Re: pic: FRC973 Presents Emperor Swerve
Quote:
We ran our encoders at 1x for the entire season, doing full teleop speed control, without resolution issues (we did, however, find a bug in the FPGA code which calculates rate, and used the workaround of not using those encoder modules). We used 250 count AM encoders to 6" wheels (direct). Although I do agree that, in general, absolute sensors are better for absolute positioning (such as a crab pod, elevator, arm, etc.) |
|
#50
|
|||
|
|||
|
Re: pic: FRC973 Presents Emperor Swerve
Adam what were the encoders you used? Link/part number?
Last edited by Akash Rastogi : 03-10-2011 at 09:32. |
|
#51
|
|||
|
|||
|
Re: pic: FRC973 Presents Emperor Swerve
Quote:
PHP Code:
Last edited by Tom Bottiglieri : 03-10-2011 at 11:11. |
|
#52
|
|||
|
|||
|
Re: pic: FRC973 Presents Emperor Swerve
There are digital SPI encoders available that reasonably priced.
http://products.cui.com/CUI_AMT203-V...df?fileID=3125 But then how good is the c-rio SPI implementation? |
|
#53
|
||||||
|
||||||
|
Re: pic: FRC973 Presents Emperor Swerve
Quote:
Quote:
I recommend the opposite if you're using the FPGA's rate. With 4x encoding, you get more noise in the velocity due to quadrature phase errors in the encoder wheel. I recommend 1x for velocity and 4x for distance. |
|
#54
|
|||||
|
|||||
|
Re: pic: FRC973 Presents Emperor Swerve
Quote:
Lots of questions here. First, we'll likely never build a robot without shifting. The speed it allows without compromising defense ability and the ability to withstand defense is awesome. We're using incremental encoders so that we never, ever have to zero encoders. We had the zeroing of absolute sensors as painless as possible last year, but still would like to take that few minutes of time to zero time. The other advantage of incremental encoders is an incredible increase in precision over analog sensors. This is primarily a time saving measure (on that note, we can easily replace a wheel module, or an entire corner module, within a 5 minute period to fit in a time out). I used to be a huge fan of absolute sensors for absolute systems, but we've changed our mind recently; we'll likely never use another absolute sensor for any FRC system. The first iteration of code did the least distance for steering, but didn't flip drive. We are now flipping drive as well. This has greatly increased the response and handling of the system. Since it is solved for on an individual wheel basis, it is still possible to have momentary disagreement between wheels (but a much more rare occurrence). I'm unsure what you're saying exactly, as each wheel always has a smooth transition and the PD steering works great, but they can cross each other if the situation is right (or wrong I guess). We've barely put any testing time on it, so we'll make a more informed decision of where to go from here after some testing. We will not be using field-centric as the primary driving mode, but it will be there as an option. The code is trivial really. We'd likely only ever use it as a button Akash, the encoders we're using are leftover s4's from usdigital. |
|
#55
|
|||
|
|||
|
Re: pic: FRC973 Presents Emperor Swerve
The encoder issue seems to have split in 2 directions. I was talking about using quadrature encoders to provide absolute position for the swerve steering. If I understand it right, the crio is configured with 8 counters. So if 4 4x encoders are used for swerve wheel absolute position then the counters are used up. I suggest that 4 analog voltage absolute encoders be used for wheel position and then the counters can be used for wheel velocity or distance and any other bot mechanism needs. On our bot we used 4 analog absolutes for steering and 1 for our arm. We just used a tachometer on the wheels so we have plenty of counters for future needs. My point was quadrature with index is not the best strategy for measuring wheel position for swerve.
|
|
#56
|
||||||
|
||||||
|
Re: pic: FRC973 Presents Emperor Swerve
Quote:
|
|
#57
|
|||||
|
|||||
|
Re: pic: FRC973 Presents Emperor Swerve
Quote:
We also aren't measuring wheel speed at all. Instead we opted to put a pair of follower wheels (oriented x-y obviously) and a gyro for all position and velocity calculations. Last edited by AdamHeard : 03-10-2011 at 13:10. |
|
#58
|
||||
|
||||
|
Re: pic: FRC973 Presents Emperor Swerve
Question for those teams who have incorporated wheel speed reversal (for better steering response) into their swerve control software: what inputs and thresholds did you use? For example, what steering angle threshold did you use to enable wheelSpeed reversal? 90 degrees, or something greater? (and was this determined empirically or by analysis). And, did you factor the wheelSpeed process variable into that decision? (i.e the angle threshold varies with the wheel speed). Also, did you look at what the other wheels are doing, was each wheel controlled independently? |
|
#59
|
|||||
|
|||||
|
Re: pic: FRC973 Presents Emperor Swerve
Quote:
We plan to test and tweak up until season, we have discussed the following; -Changing angle for determination of "shortest path" based on current steering speed (as you really want the fastest path, not the shortest path). -Generating steering paths as a function of all 4 wheels to ensure they always place nice. -Some sort of filtering and prediction on the inputs from the joysticks to save slight amounts of time in steering (being able to determine if the driver is going all the way to the other side, or merely returning to center, etc...). -Recording all variables, inputs and outputs for the entire drivetrain and graphing overtime to better understand what is happening. We chose to steer with window motors are they are the worst motors in the kit, we knew it'd be trivial to change to other motors for season and the windows would force us to truly optimize the code to make the system as responsive as possible (like I've said before, I want a driver from our team, 254, 330, 1538, etc. able to drive it without complaining about the lag time. These are all teams that usually go with very fast and responsive 6wds here on the west coast). Last edited by AdamHeard : 03-10-2011 at 13:44. |
|
#60
|
||||
|
||||
|
Re: pic: FRC973 Presents Emperor Swerve
Any recent developments with Emperor Swerve? I hope you can post at close-up pictures of the swerve modules. I am dying to see it in detail.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|