![]() |
Swerve Gear Box
If your team has made a swerve drive system in the past, did you use helical, bevel or worm gears to drive the wheel? Why did you come to that decision and how has it worked out for you?
|
Re: Swerve Gear Box
I haven't made a swerve drive, but you missed a pretty big option. Containing the motor within the swerve module drastically simplifies the gearing. Definitely something to consider. See Wildstang.
Of teams who do go with a coaxial approach, the vast majority use bevel gears. I'll let people with more experience than me post reasons. |
Re: Swerve Gear Box
Quote:
|
Re: Swerve Gear Box
Quote:
|
Re: Swerve Gear Box
Quote:
|
Re: Swerve Gear Box
Well, it seems like from looking through CD Media that most of the teams used bevel gears as opposed to helical or worm gears. Mechanically, it seems simple to produce. Is it harder than it looks to physically make? Programming an intuitive system is no problem. What was the biggest issues in controlling swerve for teams?
|
Re: Swerve Gear Box
Bevel gears require extreme precision in three dimensions. Both the top and side must be precisely machined, and you must have some way to precisely locate the bevel gears on the shaft. Definitely a job for machine tools. As a mental exercise, picture the number of ways a bevel gear's alignment can be "off," versus spur gear alignment.
Selection of bevel gears is another hurdle. Choosing an appropriate pitch, pressure angle, size, etc. is critical for good performance. Again, I'll let those with experience with these things elaborate further. And even if you get it all right, bevel gears still create a noticeable drop in efficiency when compared to spur gears. Another argument for the self-contained approach. |
Re: Swerve Gear Box
Quote:
|
Re: Swerve Gear Box
Quote:
It's really really simple, unless you actually do it. |
Re: Swerve Gear Box
Quote:
Additionally, the primary reason for using helical gears in a car is their noise level. Helical gears have quite similar efficiencies to spur gears, but run much quieter, due to the more gradual engagement of the teeth. |
Re: Swerve Gear Box
Quote:
perhaps the worst part for ANY swerve is deciding how you want it to drive... hence why I am more of a fan of mecanum than swerve for competition bots that strafe... if I am going to write a lot of code, I'd rather it be on my manipulator/camera tracking than on my drive code. that is, unless you pull a 148 and have crab and no manipulator (tumbleweed, 2008), which in that situation was nothing but epic... for off season/fun, any swerve can be fun... or not fun... it depends on how you go about it. |
Re: Swerve Gear Box
Quote:
PID loops are not hard. It is just all ratios, it just sounds hard. Sure, it is a lot of code, but it does not make it any harder. The hardest thing might just be incorporating a gyro scope, but that is not all that difficult unless there is a lot of inaccuracies in the readings. |
Re: Swerve Gear Box
Quote:
Quote:
|
Re: Swerve Gear Box
Quote:
|
Re: Swerve Gear Box
When designing something complex, it is very important to have faith that you can do it.
However, do not confuse faith in your ability to overcome challenging obstacles, with the difficulty of the obstacles themselves. Believe that you can do it, but believe that it will be hard, take a while, and throw unexpected challenges at you every step of the way. |
Re: Swerve Gear Box
P= Error*Pconstant
I=((Previous Error*change in time + Error*change in time)/2)* Iconstant D=((Error-PreviousError)/change in time)* Dconstant output = P+I+D + 127 60 < Pconstant < 95 5 < Iconstant < 25 0 < Dconstant < 5 The time can be obtained from the FPGA |
Re: Swerve Gear Box
Properly set up bevel gears shouldn't be behind spur gears at all in terms of efficiency.
|
Re: Swerve Gear Box
Quote:
Believe me when I say that this is the easy part of a PID. I'm sure Ether knows better than I but my experience has always been contrary to GI Joe's claim that knowing is half the battle. Knowing is maybe 10% of the battle. 10% is actually writing the code. and 80% is a mix of debugging and ripping your hair out. There may be some crying/cursing mixed into the last section depending on how you react. |
Re: Swerve Gear Box
Quote:
Our 2011 robot has about as much code running the drivetrain as it does running the elevator/claw system as a whole (minibot is separate, and much smaller). Why? Closed-loop drive control has a few blocks to it, logic to coast out stops, logic to hold position, gain scheduling based on shift state, etc. Autoshifting has a block to it, its a lot of tuned logic operations. Lift piston management has a few blocks, to lift the rear wheels when turning, and another one to lift the inner one in an arc. HMI has a bunch of blocks, for arc management, speed derating at high elevator positions, drive line inversion, and such. The elevator and wrist, on the other hand, has: A really big state machine that actually runs the elevator A reality check that prevents driving through the elevator with the wrist (or the wrist with the elevator), some of the going backwards logic. A P controller with gain scheduling An anti-stall-death algorithm What I'm saying is that the little code things you write to optimize performance in the drivetrain add up to the one really big state machine plus a few other blocks you write for the mechanism. For us, the optimization effort is worth it, I guess that depends on your teams coding resources. |
Re: Swerve Gear Box
My first question to you is what machining capabilities do you and your team have? You'll need someone experienced in machining to thousandths of an inch accuracy. And preferably someone who has experience working with gears. I can tell you it will take an incredible amount of talent to make a working swerve module with a drill press and a hacksaw.
Second PID loops are great and all, but there's a lot more to it than that. To make an intuitive setup you'll need to figure out exactly what way you want to map user input to outputs. There are about 10 ways to do it that will work, but a lot fewer that are considered good. Again you'll need to scale these inputs usefully. My first time programming a omni directional drive it was very easy. It took only 3 lines of code(4 omni wheels at 90 degrees from one another). And yeah it worked first go kudos to me. Then one of the drivers said what happens when we turn, tapped the joystick full left for a second and the robot spun in place at 14 feet per second with its arm sticking out 4 feet almost hitting several people. Ok that's easy to fix, just tone down the spin modifier. That worked to keep it from being a death trap, but then thanks to slowing its turn, getting a smooth strafe/twist couldn't happen over a certain speed because the twist modifier couldn't twist enough. In the end my pretty little 3 lines of code which worked turned into a pretty large function to control the omni bot properly. And I didn't even use PID, not to mention there's a little bit more to keep track of in a swerve drive. I'm sure you're thinking pfft that's nothing, I got this. You probably will get it eventually, but keep in mind the sheer number of stumbling points waiting for you, and if you attack it with the same arrogance I read in your posts, you'll lose a lot of the people whose help you will need to complete the project. |
Re: Swerve Gear Box
Quote:
Quote:
Well, I am saying that I am not scared of 30 file projects with thousands of lines of code. I actually like doing that; that is the whole fun of coding. It is those times that I feel like quitting and bashing my head on the wall that really satisfies me. It's because you really have to experience suffering before you know what joy really is like. I like tackling big projects head on. As far as machining capabilities go, I can probably call somebody up to help make it and teach the team. |
Re: Swerve Gear Box
Quote:
|
Re: Swerve Gear Box
Quote:
But I did notice you left out how you plan to calculate "error". |
Re: Swerve Gear Box
Quote:
|
Re: Swerve Gear Box
Quote:
|
Re: Swerve Gear Box
Quote:
|
Re: Swerve Gear Box
Quote:
|
Re: Swerve Gear Box
Quote:
|
Re: Swerve Gear Box
Quote:
Quote:
|
Re: Swerve Gear Box
Quote:
Say I have a mechanism, and want to go to 50 units. I am currently at 30 units. The formula you gave would output error as (50-30)/50 = 20/50 = 0.4 Now say I want to go back to 30 units, from the 50 units I was just at. The formula you gave would now give me (30-50)/30 = -20/30 = -0.6667. Not the inverse of what we just saw, this is very different. As for versatility, the P, I and D parameters should be expected to be tuned to fit a particular system. Thinking that scaling the input will make these magically work for everything is just wrong. As for input of rate vs distance, an input of rate requires integrating the output of the PID controller so that the output drives the change in motor power. The alternative is to use the I term as the P term (with other terms changing positions and such) or use a feed-forward plus a PID (with the I term still doing a lot of work). Thus, any sort of interchangeability between inputs of rate and distance goes out the window. |
Re: Swerve Gear Box
Quote:
|
Re: Swerve Gear Box
Quote:
Also, you could just take the lazy way and copy the functions Ether posted. We converted our 2008 crab prototype to an independent drive and steer crab, it runs, and the code is short. Most other statements in this thread are pure speculation. |
Re: Swerve Gear Box
Quote:
|
Re: Swerve Gear Box
Quote:
My statement wasn't meant to be a personal attack, I just think it's invalid to say I prefer x to y when you've only done x. This isn't quite a black and white area though. EDIT: Gotcha, you mean my speculation about speculation. Most was probably a strong word to choose. Some, is that more accurate? ;) |
Re: Swerve Gear Box
Quote:
I actually completely agree that Unicorn is simpler than 2+2 to program (I'm not as qualified to comment on building them outside of vex/lego scale so I will defer to those who have experience there). Edit: I do hate the phrase "speculation that it is speculation" sounds almost xzibit-ish. |
Re: Swerve Gear Box
Quote:
|
Re: Swerve Gear Box
Quote:
Quote:
Think about it. |
Re: Swerve Gear Box
Quote:
The initial derivation does indeed give you one equation, but that one equation has a lot of variables. The number of variables is so large it would be difficult to manipulate them all for the entirety of the match without really good (expensive) joysticks, and even then, it is sometimes just easier to have constants that can be used in place of certain variables. this also has the potential advantage of making the robot respond faster for two reasons. By pre-calculating certain parts of the equation, the code can execute faster, and, since certain values plugged in for some variables can result in the angle output for some modules return the same value despite the other inputs changing, by adding modes to set the values so that this is the case, mechanical reaction time improves at the cost of reduced maneuverability. I hope that makes sense, If unicorn drive were Moby Dick, I fear I would have to be Captain Ahab, I hope I haven't reached the rambling stage yet. |
Re: Swerve Gear Box
Quote:
This is very intuitive to control, one stick translates (move that way, it goes that way), and another is your rotation (move this and it rotates (in addition to the translation)). Check Ether's uploads for his equations, you'll see it's almost a trivial problem at that point. |
Re: Swerve Gear Box
Quote:
94.4707521 + 24.8607242 + 4.97214484 = 124.303621 (truncated = 124) If that was the opposite and we were at 359 and wanted 2 it would be trouble. -357/2 = -178.5 (that is -178.5 PERCENT, which is a big no no.) We can deal with it this way: just regulate the error percent to be -1.0 to 1.0 or regulate the output at the end. It would both deal with that problem. Yes my method does favor the going from a low to high than high to low. You can say that it is an error on my part, but that is the beauty of engineering; you rarely get it right the first time. Also I can just do higher # - lower # then divide by the higher # to always give -1 to 1. Then just put the desired input- current input as a variable and just mask out and & the number to get the + or -. I'll clarify in teh morning. I sound like gibberish at night. |
Re: Swerve Gear Box
Quote:
|
Re: Swerve Gear Box
Quote:
|
Re: Swerve Gear Box
Correct me if I am wrong, but weren't slip rings legal this year? I thought I read something about using them on CD, I don't recall what the GDC decision was.
|
Re: Swerve Gear Box
Quote:
They were legal up until 2010 (mostly because no one ever said anything about them, I think), and then in 2010 the wiring rules were written more specifically and the GDC "accidentally" (is the thought) disallowed them in the wording. In the 2010 Q&A they stuck with the wording, but since then they've obviously decided that they're intent is otherwise. |
Re: Swerve Gear Box
Slip rings that are rated for the sort of current that an FRC drive module draws are not commercially available within FRC cost limits, and I shudder to think of a home-made slip ring drawing 100+ amps.
|
Re: Swerve Gear Box
Quote:
Probably not physically possible, but I can't say it isn't. |
Re: Swerve Gear Box
Quote:
|
Re: Swerve Gear Box
A less sophisticated version would be to use two attached wires similar to speaker wire in the appropriate gauge. Run it down through the center of rotation, you could then experimentally determine how much slack you'd need in the wire and how many twists you could handle before damaging the wire.
I know when I build tube amps I do something like this with the AC heaters and I'm able to get a good 10-20 tight twists in a 6 inch length. Using a little bit of clever coding you can ensure that your robot wont exceed so many twists in one direction. Certainly not as elegant as a slip ring, but quite effective within the rules as I understand them. |
Re: Swerve Gear Box
Quote:
Same comment for limited-range steering (ie less than 360 degrees). |
Re: Swerve Gear Box
Quote:
|
Re: Swerve Gear Box
Quote:
I'd also be interested to hear if any teams know how many revolutions they make in an average match. I'm thinking it can't be more than a dozen in one direction, but having never used a swerve I can't say for sure. It works perfect in my mind, but reality has a way of making fools of us all. |
Re: Swerve Gear Box
Quote:
|
Re: Swerve Gear Box
Quote:
this is incredibly intuitive; move that way that fast, and spin this way this fast. I don't understand how this isn't "unicorn drive". |
Re: Swerve Gear Box
Quote:
|
Re: Swerve Gear Box
Quote:
That doesn't have any proof in it really, it's just working code that takes the translation and rotation inputs and generates the 8 outputs (angles/speeds). Working code is a darn good argument in my opinion though (and in our case, working code on a robot). |
Re: Swerve Gear Box
Quote:
Quote:
The latter scheme, as Adam pointed out, is similar the prior, but much simpler (less inputs, less inverse kinematics). This makes it easier for someone to control it, but with has "less control" over the outputs of the system. However, this can be overcome by "transferring" some of the complicated "inverse kinematics" back to the human driver: by training, the human driver could learn to control the three inputs they are given in this scheme to produce very similar results to the above control scheme (e.g. the driver could drive in an arc/spline while rotating by learning how to perfectly alter and coordinate the X-Y vector and Z-rotation joysticks). |
Re: Swerve Gear Box
Quote:
I guess what is better for human control is more a matter of opinion than anything. |
Re: Swerve Gear Box
Quote:
In hindsight the wording I used in my last post might have been confusing, but by "prior" I meant what PAR_WIG1350 posted and by "latter" what you posted. |
Re: Swerve Gear Box
Quote:
Any desired motion of the vehicle, including making the vehicle revolve around an arbitrary external point while simultaneously rotating about its own center of geometry, can be commanded by specifying the (time varying) values of the above mentioned 3 degrees of freedom. One example is given here, which shows how to convert an Ackermann steering command into the 3 degrees of freedom. Quote:
Specifying an external point around which you want the vehicle center-of-geometry to instantaneously be revolving is simply a different way to specify the vehicle's instantaneous 2D translational motion. The interface presented to the driver should be as intuitive as possible for the types of vehicle motions the driver wants the vehicle to perform. |
Re: Swerve Gear Box
Quote:
|
Re: Swerve Gear Box
Quote:
|
Re: Swerve Gear Box
Quote:
I would argue, however, that the control algorithms work best when fed vx, vy, and omega, since these are exactly the time derivatives of the three degrees of freedom of a solid body in two dimensional space, and can therefore describe any and all motion (using very simple kinematics). Then you just need to be able to convert whatever inputs from the driver to these parameters (also using simple kinematics). And vectors make all the math much, much happier. |
Re: Swerve Gear Box
Quote:
Quote:
Quote:
|
| All times are GMT -5. The time now is 12:31 AM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi