![]() |
The Hardest Drive System To Program:
What is the hardest drive system to program?
|
Re: The Hardest Drive System To Program:
Any base drive system is not incredibly difficult to program. Programming an effective control system for a drive system is hard.
see:
I really don't know what to answer your question with, everytime I think of a drive system I think of all the ways I could improve it with pieces of code - would be very difficult to pick a single one, and would require more context. |
Re: The Hardest Drive System To Program:
My opinion would be swerve drive.
Theres pre-made code in WPILIB already for Tank, Arcade, Mechanum and one other I believe. But swerve is the only one out there that requires pretty much completely custom code to get working. |
Re: The Hardest Drive System To Program:
Quote:
|
Re: The Hardest Drive System To Program:
Quote:
Quote:
Quote:
|
Re: The Hardest Drive System To Program:
I would recommend reading this excellent white paper by Ian Mackenzie
http://www.firstroboticscanada.org/s...irectional.pdf |
Re: The Hardest Drive System To Program:
Quote:
|
Re: The Hardest Drive System To Program:
Quote:
|
Re: The Hardest Drive System To Program:
In my opinion how you want to implement the drive will make the programming difficult. For example a competent programmer can program a swerve that can move the wheels forward and rotate them directly with a joystick but making a program that takes into account the position of the wheels relative to the closest direction to rotate and stops the wheels from moving till they reach the correct angle while taking into account the angle of the robot and the desired direction will make the programming more difficult. i have found the most fun is had trying to make an extremely complex drive train simple to use! Now with just the simple setup (aka. nothing unique) i would agree it would be the swerve because of the availability of prewritten code and for the difficulty in making the drive simple to use.
~Jon |
Re: The Hardest Drive System To Program:
Quote:
If a sensor relating to your drive system fails, what is going to happen to your robot? A lot of teams run a separate task on the cRio that monitors for failures and then triggers a state change when a failure occurs. For instance let's say a gyro stops reading values, rather than making the robot spin in circles, the drive system would ignore gyro values. Redundancies being increased reliability of a drive system, http://en.wikipedia.org/wiki/Redundancy_(engineering) > Human error correction How much money would you put on the fact that your driver can hold two joysticks at 50% throttle precisely? Probably not a lot. > Mechanical error correction Motors aren't made equal. Two motors of the same model will rarely go at the same speed. Using encoders and other techniques to correct this. |
Re: The Hardest Drive System To Program:
Quote:
|
Re: The Hardest Drive System To Program:
Quote:
|
Re: The Hardest Drive System To Program:
They're all fairly simple until you get to a full swerve drive. But even then it's just some control loops and a bit of trigonometry.
|
Re: The Hardest Drive System To Program:
Quote:
"Safe Mode": If triggers, switches to bare bone drive code. Multiple sensors to "check" each other We just used dead zones for the human error part We didn't use the encoders because there was too much noise that I did not trust them enough to use it. |
Re: The Hardest Drive System To Program:
Quote:
How ever, I heard that it is the crab drive. |
Re: The Hardest Drive System To Program:
swerve drive == crab drive
and yes, putting all that stuff in (in summary) sounds simple, but seems complicated in comparison to say tank drive which is read left joystick set left wheels, read right joystick set right wheels |
Re: The Hardest Drive System To Program:
Quote:
Actually, I think a 2 wheel system would be fairly hard. |
Re: The Hardest Drive System To Program:
Quote:
|
Re: The Hardest Drive System To Program:
Ackermann steering was the hardest steering I've programmed, but also the most fun. If you're not familiar with it check it here: http://en.wikipedia.org/wiki/Ackermann_steering
The wheel steering angles aren't equal when turning because the wheel axles both have to point at the turning center point. With a hardware linkage, you're limited as to where your turning center can be located, but with a software "linkage" you can place the turning center wherever you like. The HOT team used this in 2008 when I was a member of that team - a fitting drive and steering system for that year's theme. A separate control loop was used for each steerable wheel. |
Re: The Hardest Drive System To Program:
I'd say Unicorn drive is up there. There's so many modes available: tank (uncommon if snake works), full crab (all wheels pointed same direction), snake (front & back point opposite directions), center spin, arbitrary center spin, each potentially with x and y-orientation. The real trick is switching "modes" on the fly. Some have 2 speeds, either mechanical or software-based (less optimal but alright for some games/strategies).
We've been iterating 4-wheel swerve for 2 years (without tank mode). Heck of a ride. Go programmers! The other possibility that comes to mind is Nonadrive. It's incredible, but I have no idea how complicated the programming is. (148, are you here?) Of course, there's always auto-balancing trackballs. Or triple-jointed six legged bots. |
Re: The Hardest Drive System To Program:
Quote:
edit: I don't think the unicorn drive is hard per se, but it would be a pain to make it user friendly |
Re: The Hardest Drive System To Program:
I have helped many teams with base drive code and have encountered quite a few different drive types. The swerve drive that I worked with was 4 swerves, each with independent control, and I would say it was one of the more difficult ones to get working, fully functions, and non-wire-twisting.
Now, the code i have doesnt use PID loops, but rather 'manual' monitoring and speed adjustment of swerve modules based on current and target angles. That being said, had it not been in the heat of competition with the limited time for programming and annoyance of "its just code, whats so hard about it" (as im sure all programmers are used to), I would have taken the time to properly implement PID loops, correct stops, and more features. But what made it difficult and would make it similarly difficult in any build season is the tendency to get 'base functionality' working then add 'slightly more' over and over so you can get more testing done and get it more and more functional but have ugly and hard to manage code, instead of taking the time to properly write it with closed control loops after base functionality was working. The biggest issue was the time limitation we had on programming and had we had more time, maybe it might have been easier to work with. |
Re: The Hardest Drive System To Program:
Quote:
Quote:
The procedure for calculating the wheel speed and steering angle for each of the 4 wheels is presented here. For those who like to have a deeper understanding, the derivation of those equations is given here. |
Re: The Hardest Drive System To Program:
I just realized why more teams don't do swerve: it is hard to do the actually mechanical fabrication than it is to code it. I am not sure if my team is capable of producing such a drive system. Most of the mechanical guys are seniors and are graduating. My mentor will not let me learn any mechanical skills because he deems me as a too valuable of a programmer to be welding and stuff.
The most "advanced" drive we can fabricate will probably be a mecanum drive, possibly an omni drive. But, if there are any teams that are willing to invite me to help program something more advanced, I will be glad to do it. I really have our doubts for next year. Chances are, we will go with our 6 wheel again (which I loath) |
Re: The Hardest Drive System To Program:
Dont worry david i'm in the same boat as you. Our team doesn't have the manufacturing capabilities to do a swerve drive even though i could easily program it and make it easy to use. and I HATE THE 4-6 WHEEL TANK DRIVE
|
Re: The Hardest Drive System To Program:
Quote:
|
Re: The Hardest Drive System To Program:
To me, drive programming isn't hard, it's just really time consuming. Having to write all those limits to make sure you don't go over 1.0 or under -1.0, yelling at your electrical team to hurry up and give you the jaguar channels because you forgot to write them down (I never did ;) ), then having to write all the functions like goLeft, goRight, goForward, etc. All just a total brainhurt, and at the end of the day you probably will have carpal tunnel. Man, those were the days.
|
Re: The Hardest Drive System To Program:
I think this drive base would be the hardest to program. Just watch it as they kick it. It's beautiful. :')
http://www.youtube.com/watch?v=W1czBcnX1Ww |
Re: The Hardest Drive System To Program:
Quote:
|
Re: The Hardest Drive System To Program:
Programming a drive so that you CAN control all of its functions is easy.
Programming a swerve drive so that it's intuitive and easy to control those functions is not. |
Re: The Hardest Drive System To Program:
Quote:
|
Re: The Hardest Drive System To Program:
Quote:
|
Re: The Hardest Drive System To Program:
Quote:
That said, with proper gearing I've heard of teams using anything from Window motors to the FP. |
Re: The Hardest Drive System To Program:
Quote:
I wouldn't recommend doing something solely because it is hard. Most teams do a cost/time vs return analysis and decide that focusing on an effective manipulator and simple drive will result in a better final product. We did this and decided that in this game* a mecanum has some advantages when hanging tubes and we wanted to add it to our bag of tricks. *Chose not to in '07 because we anticipated heavy defense |
Re: The Hardest Drive System To Program:
Quote:
Quote:
|
Re: The Hardest Drive System To Program:
Quote:
* "just" software. I hate that phrase. Don't you? |
Re: The Hardest Drive System To Program:
Quote:
On what do you base tank's perceived inferiority? |
Re: The Hardest Drive System To Program:
Now, for the people that said swerve drive is hard to drive with, can you explain why? I see no reason why it would be hard to drive at all. IMHO it would be harder to maneuver a 6 wheel drive than a swerve
|
Re: The Hardest Drive System To Program:
Probably this one:D
I can't figure out which combination of outputs make it move, let alone reach its top speed of 154 fps or Warp 9 (I am not really sure). Seriously, I think a Field-Centric 3 degrees of freedom drive is the toughest I've seen in FIRST. |
Re: The Hardest Drive System To Program:
Quote:
I agreed - until I picked up the Revolution demobot at IRI and tried to make it drive around without ramming into anyone. Wow it is hard. |
Re: The Hardest Drive System To Program:
I think that all depends on how you program it and how much practice a driver has.
After 4 years of driving Team RUSH's robots, I'd like to consider myself to be a fairly competent chassis driver. That being said, I only had experience practicing and operating with 6wd. I only had one real chance to drive a swerve-based chassis. It was programmed with one stick controlling rotation and the other translation, and it was a completely different beast than standard 6wd. That being said, with more practice it's possible I would've been able to do just as much with swerve as a 6wd robot, but I wasn't since I hadn't practiced with it. |
Re: The Hardest Drive System To Program:
How I interpreted the controls was that the joystick was to move around the field and the shoulder buttons were for zero point turning. The gyros (double redundancy) would orient it self relative to the driver, so when ever the driver presses down, it will come toward the driver.
That sounds a lot easier than how you described it. |
Re: The Hardest Drive System To Program:
That definitely sounds like an interesting control method, and I've never heard it done that way.
That being said, I feel like having a set speed that the robot rotated at might not be the most efficient way of doing things. I'm not sure though and I could be wrong, I'm not very experienced with the programming/control of swerve drives. |
Re: The Hardest Drive System To Program:
Is swerve supposed to be more difficult than Mecanum to drive?
I don't see how it could be that difficult from the drivers perspective. We have a mecanum robot, and our driver did fine even though he had to deal with reversed controls for our first matches and was controlling all the robots functions. After that was fixed we didn't have any difficulty driving. I am trying to figure out what you mean by difficult. is there something that swerve has that makes it more difficult than mecanum. Also our driver had no real prior practice with mecanum. |
Re: The Hardest Drive System To Program:
Quote:
|
Re: The Hardest Drive System To Program:
Just for reference sakes, was 1717's drive system swerve? I first thought it was an omnidrive, but I have also heard that it was a swerve system.
|
Re: The Hardest Drive System To Program:
Couldn't swerve get harder to drive because you have to wait for the wheels to get to the right position before it moves?
That is an interesting question though.. how close should the wheels be to the correct angle before you start driving? For reference, I'm thinking of a three axis joystick where the robot simply moves in the direction the joystick is pointing, and turns with the joystick. What other control schemes would there be for crab drive? |
Re: The Hardest Drive System To Program:
I am pretty sure 1717uses swerve.
Unless the problem lies in how it would be coded I don't think there would be much of a delay, well at least not anymore than a 6-wheel drive. I may be missing something though. I think that you would have to really turn them slowly, less than 60 RPM to get a really noticeable delay. because you are only doing a partial rotation it seems like it would reach its position in less than .5 seconds at 60 RPM no matter what? |
Re: The Hardest Drive System To Program:
Is the weight of the system any issue? It does not seem to be much heavier than a 6 wheel drive with 4 CIMS.
|
Re: The Hardest Drive System To Program:
Quote:
I will add on that if the program lets you start rotating the wheels before they're in position, it will go a little wonky until they get straightened out, which could be weird. Quote:
|
Re: The Hardest Drive System To Program:
Quote:
Quote:
Quote:
|
Re: The Hardest Drive System To Program:
9.1 lbs seems heavy, are you including the drive motors, and other hardware, the modules my team made this year (but didn't use do to time constraints) weigh about 4.5 to 5 lbs a piece including mounting, and with the steering motor on each one is about 6 lbs.
|
Re: The Hardest Drive System To Program:
9.1 is for the entire unit that bolts on to the frame. Cim, rs540, and 256 banebot included.
|
Re: The Hardest Drive System To Program:
That makes sense, it ends up about the same weight as ours if you were to take the CIM and gearbox and add it to ours.
|
Re: The Hardest Drive System To Program:
Last year, the team thought it was a good idea to combine Ackerman and omnidrive. We never got the programming right. Ever. We were supposed to be able to switch back and forth, but the omni drive was too sensitive or sometimes wouldn't even work.
|
Re: The Hardest Drive System To Program:
Quote:
|
Re: The Hardest Drive System To Program:
I'm going to have to agree with all those who said that programming the drive system really isn't difficult at all. The most common systems are ready-made and quite frankly, there's absolutely no good reason other than elitist-ness to rewrite them. If you take programming in FIRST as an opportunity to prepare for programming in the real world, you'll have to realize that you get paid to produce new work, not rewrite already working code. As the old saying goes, don't fix what isn't broken. As for an actual answer, it has to be something complex to the point where you require advanced math, many motors, and coordination of such motors. Or something like what's already been mentioned where you switch between some or many drive systems. Walkers, tripods, and things of that sort will always be more difficult than a wheel system though.
|
Re: The Hardest Drive System To Program:
I found that programming penguins to make the robot move was pretty hard. Those buggers are stubborn once you run out of fish!
(couldn't help myself :) ) |
Re: The Hardest Drive System To Program:
Quote:
|
Re: The Hardest Drive System To Program:
Quote:
-Traction Control (really helpful to a lot of teams in Lunacy) -Automatic, precise turns (really great in Overdrive) -Automatic straight driving code (also awesome in Overdrive) -Automatic current-sensing based shifting -Automatic anti-tipping code (Overdrive) And those are still relatively simple, as those can all be done with just kinematics or simple PIDs with the right sensors. You could push still farther. If you integrate odometry and/or localization systems, you can start to do path planning and following. You can start integrating knowledge about system dynamics to better the path following. You can move up to state-space and non-linear control, and optimize your robot motion for speed and stability given actuator limitations. You can actually make statements like, "This is the fastest my robot can move across the field and keep the sway of my lift under a certain amount." And you can use that knowledge in an iterative process alongside your mechanical design to make better, faster, more stable, more robust robots. Now, I'll admit, this isn't really a "programming" problem. The programming for any of those things is usually pretty easy (sometimes tricky), once you know what the algorithms should be. But it really can be pretty hard to figure out the algorithms. That's the challenging part of programming, anyways. Robot drive control is an active research area for many people doing their Ph.D.'s in Mechanical, Computer, and Electrical Engineering (and Computer Science) and people are still pushing the boundaries further and further. A cursory glance at google scholar yields tons of papers with different control methods for something as simple as skid-steer and systems as complex as mecanum (mecanum is actually really hard to do the dynamics (not kinematics) for, because if you are doing the dynamics you have to model all the wheel slip/skidding). |
Re: The Hardest Drive System To Program:
Quote:
A software problem need not involve advanced math to be complex. It may involve just algebra, geometry, and trig... but require considerable skill and experience to set the problem up properly. In the real world, many software people get paid to rewrite already working code, be it to make it more efficient, make it more maintainable, make it more re-usable, make it conform to a new customer-required (or company-required) coding standard or language, take advantage of the unique characteristics of a new processor, avoid royalties, or migrate away from a legacy language. Rewriting library code just to be "elitist" is immature and counterproductive. But assuming that learning is the motivation, at least one good reason to re-write library code is to learn. Some people learn best by doing. Understanding and analyzing an already-solved problem and designing and coding a working solution is one way to do this. Comparing your solution to someone else's can be rewarding and provide deeper insight. It goes without saying that this learning process should not be allowed to jeopardize the project. |
Re: The Hardest Drive System To Program:
Reading through this thread, I do have a question.
Assuming a robot has a crab drive, how would turning of the actually base fair? I would think that since turning would pretty much be comparable to a 4WD, it wouldn't so hot, but my knowledge of swerve/crab isn't whole. Can anyone confirm this? |
Re: The Hardest Drive System To Program:
The way our swerve drive turns would be to turn the wheels in so that it actually doesn't skid. I know 1717 does this and it is very effective as far as I can tell.
If they didn't turn inward it would be rather difficult to turn I think. |
Re: The Hardest Drive System To Program:
Quote:
Quote:
|
Re: The Hardest Drive System To Program:
Now, this might sound ridiculous, but has anyone thought of putting a "turret". So the Drive train would be a separate system than the turret like a tank.
|
Re: The Hardest Drive System To Program:
Quote:
|
Re: The Hardest Drive System To Program:
Quote:
|
Re: The Hardest Drive System To Program:
Quote:
|
Re: The Hardest Drive System To Program:
Quote:
Quote:
Quote:
|
Re: The Hardest Drive System To Program:
Quote:
Quote:
|
Re: The Hardest Drive System To Program:
Quote:
If the vehicle is mechanically limited to crab operation that may be your only option. If not, it could be argued that it would be easier overall to replace crab software with something more flexible. |
Re: The Hardest Drive System To Program:
1 Attachment(s)
Short answer: Swerve drive with 4 independently controlled wheels.
Long answer: Swerve drive with 4 independently controlled wheels that have a limited range of motion. This forces the programmer to limit how the wheels will be pointed as to not tear out the wires leading to the motor powering the wheel (CIM motor in most cases.) It also requires the wheels taking a specific path in order to do this. This path is not necessarily the shortest and most direct, but it should be no more than 180 degrees of travel. An example of this is the attached picture, a portion of team 2421's creation this year. If someone wants to see the code for it, it is available here. Feel free to PM me with any questions you may have |
Re: The Hardest Drive System To Program:
From what I can see, you only need 90 degrees of rotation. Personally, from the context of this competition, having 4 independently rotated wheels are too much weight. The swerve system it self is quite heavy, adding unnecessary weight should be avoided. I really see no advantage with 4 independent wheels compared to the "crab" drive. At least the negatives far outweigh the positives.
|
Re: The Hardest Drive System To Program:
I agree with david on this one. While i do see the merit in four independently controlled swerve modules, i think the weight and the limited motors outweigh the benefits of the control. For the case of FRC i think that the crab is more than sufficient.
|
Re: The Hardest Drive System To Program:
Quote:
Many teams are capable of making such a drive lighter than most teams invest in traditional drivetrains. They then achieve full omnidirectional motion without the drawbacks of a robot sitting on rollers. |
Re: The Hardest Drive System To Program:
Can someone give me some examples of how swerve drive is controlled via joysticks? :confused:
|
Re: The Hardest Drive System To Program:
There are many ways but two common ways among teams who do it for the first time are
-one joystick with the y axis being speed of the wheels the buttons being rotation of the whole robot and the x being the rotation of the wheels(the easiest) -one joystick with the rotation based on where the stick is on the joystick and speed is the R vector of the x and y axis and rotation on buttons but really there are A LOT of ways to control a swerve. |
Re: The Hardest Drive System To Program:
hardest robot to program as far as drive goes is definitely an omni drive robot that can switch to akermon.... which is similar to a monster truck drive train where the front and back wheels turn all with encoders to exact positions we called it the crazy bot because the watchdogs would go crazy and the r0bot would go plum crazy and head for the nearest programmer for some reason
|
Re: The Hardest Drive System To Program:
Quote:
|
Re: The Hardest Drive System To Program:
The watchdog monitors one thing and controls another.
In the case of the system watchdog, it monitors incoming control packets and controls the outputs of the robot. The deadline is 100ms, and this means that if the incoming packets take longer than 100ms to arrive, the watchdog shuts down the outputs. As an example, lets say that the driver sets the tethered robot to driving forward, and then the clumsy mentor steps on the enet cable, yanking out out of the laptop. Since this breaks comms, the watchdog notices and will shutdown the outputs. Same situation if your laptop runs out of power, you shut down the radio, you yank the enet from the dlink, you lose power to the dlink, etc. If the cRIO doesn't get incoming packets, you don't want the robot to keep driving, and the system watchdog does that. For the User watchdog, it observes your code's ability to call the feed function. If your code doesn't call feed, it shuts down the outputs. As an example, lets say that the robot is driving forward, and the forgetful mentor sets a breakpoint in your teleop function. Without the watchdog, the robot will maintain its current course. With the watchdog, it will halt the motors. The Safety Timers are similar to this, but are I/O specific. They observe the updates to a given output and will shutdown that output if the deadline is missed. Again, this could be due to a breakpoint, delay, infinite loop, dead thread, bad logic, etc. Does that help? Greg McKaskle |
Re: The Hardest Drive System To Program:
Quote:
|
Re: The Hardest Drive System To Program:
Quote:
|
Re: The Hardest Drive System To Program:
Quote:
|
Re: The Hardest Drive System To Program:
Quote:
Quote:
Quote:
Ackermann is a very specific type of front-wheel steering, used by automobiles, in which the vehicle turns around a point lying on the line which is colinear with the axles of the rear wheels. Since an omni-wheel vehicle is holonomic, you certainly could mimic this behavior, but why would you want to? An omni-wheel vehicle can be given a "car-like" driver interface simple by disabling the strafe command - and using only rotate and fwd/rev commands. |
Re: The Hardest Drive System To Program:
Quote:
|
Re: The Hardest Drive System To Program:
Quote:
1) I thought you just said you were using omni wheels. Omni wheels aren't usually steered. Can you post a picture of your drivetrain? 2) I wouldn't suggest using the word "Ackermann" to describe what you stated. The whole idea of Ackermann is that the wheels are steered to different angles, not the same angle. The point of this is so that each wheel's axis will point to the center of rotation of the vehicle so that the wheels do not scrub. 3) Not sure I understand what you mean by "omnidrive, with each wheel receiving the same value from the joystick". Each wheel of an omnidirectional vehicle typically receives different commands, not the same commands. |
Re: The Hardest Drive System To Program:
Quote:
|
Re: The Hardest Drive System To Program:
Quote:
Have you given up, or is your team going to try to tackle this as an off-season learning project? |
Re: The Hardest Drive System To Program:
Quote:
|
Re: The Hardest Drive System To Program:
Quote:
|
Re: The Hardest Drive System To Program:
Is there a paper on all the different types of drive systems? Even just a list of their names and a brief description would be helpful for some sort of regularity/standard for names.
|
Re: The Hardest Drive System To Program:
Quote:
|
| All times are GMT -5. The time now is 02:30. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi