|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
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 Last edited by davidthefat : 27-08-2011 at 18:10. |
|
#2
|
|||||
|
|||||
|
Re: Swerve Gear Box
Properly set up bevel gears shouldn't be behind spur gears at all in terms of efficiency.
|
|
#3
|
|||||
|
|||||
|
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. |
|
#4
|
|||||
|
|||||
|
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. |
|
#5
|
|||||
|
|||||
|
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. |
|
#6
|
|||
|
|||
|
Re: Swerve Gear Box
You mean like this statement you just made?
|
|
#7
|
|||||
|
|||||
|
Re: Swerve Gear Box
We made one and got it running in both configurations. I don't see how my statement about the length of the code we wrote for our "unicorn" crab is simpler than the code for our "2+2" (drive and steer pairs) crab is speculation...
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? ![]() Last edited by AdamHeard : 27-08-2011 at 22:01. |
|
#8
|
|||
|
|||
|
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. |
|
#9
|
||||
|
||||
|
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. |
|
#10
|
|||||
|
|||||
|
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. |
|
#11
|
||||
|
||||
|
Re: Swerve Gear Box
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|