Log in

View Full Version : 1058's Field Oriented Drive


PVCMike
25-02-2010, 14:43
Here is some video of our field oriented drive system for 2010. Basically no matter which way the robot faces if you push the joystick forward it will go forward.

I know it's been done before but it's beautiful anyways and it uses some neat technology to automatically reset its position when pushed or after going over the bump.


http://www.team1058.com/media/video/FieldOrientedDrive2010.mov

elbuo
25-02-2010, 16:35
I got to say....that is by far the smartest bot I've seen...

I understood and even think I can replicate the field orientation with the gyro, but...how does the positioning work ?

Again...I'm highly impressed.

Andy L
25-02-2010, 16:40
Here is some video of our field oriented drive system for 2010. Basically no matter which way the robot faces if you push the joystick forward it will go forward.

I know it's been done before but it's beautiful anyways and it uses some neat technology to automatically reset its position when pushed or after going over the bump.


you're selling yourself short in this post I think, that is probably the smartest robot I've seen, and it would probably be very easy for a rookie driver to pick up the joysticks and learn quickly how to drive.

Have you tried using a gamepad of some sort instead of joysticks?

beautiful programming though

James1902
25-02-2010, 16:43
Very slick code work and explained so well that even I, a programing illiterate, could understand it.

Good work

dodar
25-02-2010, 16:49
That is amazing! just like in the posts above, i cant do crap with programming and yet i could now describe how this works to our programming team

you guys should get a big award for this cause that ROCKS!

Akash Rastogi
25-02-2010, 16:55
Very impressive programming. One of the most intuitive robots of the year so far.

PVCMike
25-02-2010, 17:43
Thanks for the compliments! I'm not going to give away all the secrets without permisson from the 2 guys who programmed it (Brendan the guy in the video being one of them)

We're really happy with how it worked out. We ended up buying a nice 3axis joystick so you can just twist the handle to rotate the robot. We also added some automatic features for balancing on the bump and aiming purposes. Check out this video to see the bot on the bump and we'll see you at GSR and Chesapeake!

www.team1058.com/media/video/Drive_Test_2010.mov

Tottanka
25-02-2010, 18:04
That is very impressive, i can easily see how that software would make for a huge advantage in the 08 game. This year it might cause some problems as you can't climb the bumps while not directed right in front of them, but you must save it for future years, it's amazing.

Bob Steele
25-02-2010, 18:21
Very impressive programming.
Our robot uses the same idea this year... I think it will serve us well.
We use a single joystick for that translational motion and a dial to rotate the robot on its center (We are using a mecanum)

I will be interested to see how you do on the field. I bet it will be very useful!!

Great job on both the programming AND the explanation...

I hope we see you in Atlanta!!

BrendanB
25-02-2010, 18:41
Very nice Brendan! I remember you telling me about it at the unveiling, but I didn't think it would work. That is really cool! I want to drive it!:p

See you at GSR!!:)

CraigHickman
25-02-2010, 18:52
Wow. Your team should be incredibly proud, as that is one of the smartest drive systems I have seen in FIRST. Seriously good work.

Out of curiosity, what sensors did you throw on there? I'm guessing gyro and compass, possibly accelerometer, but I'd be curious to see how they interact, and what controls what.

PVCMike
25-02-2010, 18:53
That is very impressive, i can easily see how that software would make for a huge advantage in the 08 game. This year it might cause some problems as you can't climb the bumps while not directed right in front of them, but you must save it for future years, it's amazing.

Don't worry. We have a solution for that! We get over the bumps just fine! :D

familyguyfreak
25-02-2010, 20:58
Amazing! I'm speechless!:eek: Awesome work guys!

Good luck in all of your regionals!

Tanner
25-02-2010, 21:09
Really neat drivetrain control system! Really wish our team used a drivetrain like that so we could program it to act as such.

Very nice job. Bravo.

-Tanner

BEEKMAN
28-02-2010, 21:51
Wow, I just was just informed about this thread...

Thanks guys!!!!!!

I didn't realize people would love our drive system so much...Me and my friend Brian spent about 3 math classes (with somewhat aprooval of our teacher) writing psudo-code for this....because the code that WPI gives us was lables as "experimental" so we decided to write it all custom...plus its more fun that way :)

AmoryG
28-02-2010, 22:25
Wow. Your team should be incredibly proud, as that is one of the smartest drive systems I have seen in FIRST. Seriously good work.

Out of curiosity, what sensors did you throw on there? I'm guessing gyro and compass, possibly accelerometer, but I'd be curious to see how they interact, and what controls what.

The amazing thing is you really only need a gyro to do something like (beats me how you program an omni wheel drive using this implementation, never have done it or thought about).

If you know what angle you have to be (gyro angle) and the angle you want to be (controller) then you know your angle error. Your robot's turning speed should be based on that error.

But obviously it takes a lot of fine tuning to get something like what PVCMike's team has done work well. It may look pretty in the video, but our team did something similar in last years competition. The wheels of our crab drive would face the direction we pointed our joystick, and another joystick would control the direction our robot was facing. Unfortunately, it was a bit sloppy and the trailer made driving the thing horrific.

jspatz1
01-03-2010, 02:04
We have accomplished this same field oriented steering with our swerve drive this year, and it does indeed provide some advantage with this game. Drivers tend to do well the first time they touch the stick. Its so easy even a mentor can drive it! Nice to see someone else has done it too. Great minds think alike!

JVN
01-03-2010, 02:12
Very, VERY cool. In order to make a holonomic drive useful, you need to make sure the driver can utilize it. This usually means it needs to be intuitive for the driver to use. Your implementation is absolutely fantastic.

Our team opted to make the system mechanically intuitive, whereas you solved it with some GREAT software (this is where my coworkers would mock me for always opting for mechanical complexity instead of a "line of code").

Are you using a gyro for orientation? Does it still function after going over the bump? What are you bolting on top?

-John

ICntIHaveRbtics
01-03-2010, 07:51
Hey I just found this thread too! Thanks Mike!

Just putting it out there, as Brendan (BEEKMAN) said, they spent hours of time both at team meetings at at home working on this. Hours. They may have actually surpassed my amount of "FIRST dedicated time" (people who know me know that's like 75% of the hours I'm awake daily) to do this. So I just wanted to put a little more emphasis on that crazy dedication they had.

&& the frame that it's on right now isn't the frame we used. We transferred the electronics over to a new basic KOP frame and (of course) we have some PVC on top to keep balls from getting stuck on top.

Can't wait for GSR!

Dale
01-03-2010, 11:31
One of the biggest problems to overcome with this kind of system is gyro drift. The more turns and bumps a robot encounters the more the gyro and the code tends to drift in its understanding of where "North" (not magnetic north, just a consistent orientation) is. Noise on the analog line will also add to this...there's always noise.

When we tried doing this a few years back, with the old IFI system, we could only get good results for the first 20 seconds or so before the errors accumulated so badly as to cause the system to need recalibration. Have you noticed that to be a problem with the cRIO and it's better A/Ds? Is there a way for the driver to reset the definition of "North" if the gyros loose their way?

PVCMike
01-03-2010, 14:08
One of the biggest problems to overcome with this kind of system is gyro drift. The more turns and bumps a robot encounters the more the gyro and the code tends to drift in its understanding of where "North" (not magnetic north, just a consistent orientation) is. Noise on the analog line will also add to this...there's always noise.

When we tried doing this a few years back, with the old IFI system, we could only get good results for the first 20 seconds or so before the errors accumulated so badly as to cause the system to need recalibration. Have you noticed that to be a problem with the cRIO and it's better A/Ds? Is there a way for the driver to reset the definition of "North" if the gyros loose their way?

From what I understand through testing Brendan and Brian also discovered that through out the 2 minutes and especially going over the bump the robot would lose its calibration. To solve this they have used some additional sensors (other than the gyro) to automatically re-calibrate the gyro every so often on its own. They have also programmed in a button on the joystick so you can position the robot and click the button to recalibrate which seems to work well too. Feel free to come by our pit at GSR (Team 1058 the PVC Pirates) and ask for Brian or Brendan and they'll be able to tell you all about it!

artdutra04
01-03-2010, 14:36
One of the biggest problems to overcome with this kind of system is gyro drift. The more turns and bumps a robot encounters the more the gyro and the code tends to drift in its understanding of where "North" (not magnetic north, just a consistent orientation) is. Noise on the analog line will also add to this...there's always noise.

When we tried doing this a few years back, with the old IFI system, we could only get good results for the first 20 seconds or so before the errors accumulated so badly as to cause the system to need recalibration. Have you noticed that to be a problem with the cRIO and it's better A/Ds? Is there a way for the driver to reset the definition of "North" if the gyros loose their way?The combination of the 12-bit ADC on the cRIO (versus 10-bit on the older IFI system) and the faster polling rate make gyros much less susceptible to noise.

From what I understand through testing Brendan and Brian also discovered that through out the 2 minutes and especially going over the bump the robot would lose its calibration. To solve this they have used some additional sensors (other than the gyro) to automatically re-calibrate the gyro every so often on its own. They have also programmed in a button on the joystick so you can position the robot and click the button to recalibrate which seems to work well too. Feel free to come by our pit at GSR (Team 1058 the PVC Pirates) and ask for Brian or Brendan and they'll be able to tell you all about it!What the degree/second rating of your gyro chip? If it's already a 300 deg/sec, you could measure the drift over time. Sometimes the noise is biased in one direction, and you can offset this just by adding/subtracting a coefficient at your software at regular intervals.

Nadav Zingerman
01-03-2010, 17:01
Isn't this just the functionality provided by the "Meccanum - Cartesian" block in WPILib (in LabVIEW) with a PID controlling the rotation input?

Vikesrock
01-03-2010, 17:13
Isn't this just the functionality provided by the "Meccanum - Cartesian" block in WPILib (in LabVIEW) with a PID controlling the rotation input?

No, the system in the video implements field oriented control. This means that when the driver pushes the joystick straight away from them, the robot moves away from the driver, regardless of it's current orientation.

The WPILib Mecanum functions are robot-centric. Pushing away from the driver on the joystick will drive the robot "forward" which may be towards the driver, away from the driver, left-to-right, right-to-left or any direction in between.

EDIT: As we're not using holonomic drive this year, I only took a brief look at the new Mecanum Cartesian VI. Looks like I missed the Gyro Angle input terminal up on top. The system discussed in this thread appears to be a more robust implementation of the same concept.

indubitably
01-03-2010, 17:57
Isn't this just the functionality provided by the "Meccanum - Cartesian" block in WPILib (in LabVIEW) with a PID controlling the rotation input?

Yes actually it is the same.
Our team did driver centric/field oriented drive code also. we had it done very early and I was surprised when i updated week five and saw the code just laying there.

Oh well it was a great learning experience and allows us to fine tune it much easier.

I thought everyone that did mecanum would have used that but judging by the posts on this thread i guess not.

EgROS
01-03-2010, 19:23
Wow! That is really impressive!!!!

My team is doing a field centric controll scheme but it is nothing like this. This is really amazing!

BEEKMAN
01-03-2010, 20:17
Isn't this just the functionality provided by the "Meccanum - Cartesian" block in WPILib (in LabVIEW) with a PID controlling the rotation input?

Not really, for one, the WPICode (if you actually read their code, is labled as "experimental" and for programmers like us, we found the bugs quite easily).....so our system is 100% fool proof, will work every time, all the time. The gyro will never walk, making it a seamless system...and a lot of fun

Cyberphil
01-03-2010, 21:08
that is SICK!!!!!!!!!! Awesome Programming!!! Amazing job guys!

Tom Bottiglieri
01-03-2010, 21:25
Very cool. I was able to drive 190's 2005 robot, which implemented the same type of control scheme. I found it was extremely easy to just pick it up and start doing some really complex maneuvers within about 15 seconds of driving it. If yours is anything like theirs, you will be driving circles around all the other bots at GSR. :)

To echo some of the previous questions... what type of additional sensors did you use to re-zero the gyro? I can imagine some range finders picking up the wall, but that's noisy at best. It just seems like a chore to have the driver re-zero the drive base a few times per match.

CraigHickman
02-03-2010, 01:04
Not really, for one, the WPICode (if you actually read their code, is labled as "experimental" and for programmers like us, we found the bugs quite easily).....so our system is 100% fool proof, will work every time, all the time. The gyro will never walk, making it a seamless system...and a lot of fun

Now you've really spiked my interest! Do you mind sharing your method for keeping the gyro from walking? Are you re-zeroing with some kind of sensor off of the arena wall, or do you have a compass as well to aid the gyro in keeping a clean reading?

R.C.
02-03-2010, 01:24
Now you've really spiked my interest! Do you mind sharing your method for keeping the gyro from walking? Are you re-zeroing with some kind of sensor off of the arena wall, or do you have a compass as well to aid the gyro in keeping a clean reading?

I'm with Craig on this one, I know a lot of people on CD would be interested especially me. We have noticed with our Gyro that it walks and that over a bump or two its completely off.

More info would be amazing.

-RC

jspatz1
02-03-2010, 01:54
I'm with Craig on this one, I know a lot of people on CD would be interested especially me. We have noticed with our Gyro that it walks and that over a bump or two its completely off.
-RC

With our filed oriented steering we have not experienced much trouble with gyro drift. Not sure what we are doing right to avoid that. We're not doing a lot of frequent bump crossing so maybe that helps. We do have a gyro reset button at the driver's thumb. If he feels it is off he can quickly reset whenever the robot is square with the field.

indubitably
06-03-2010, 23:53
I'm with Craig on this one, I know a lot of people on CD would be interested especially me. We have noticed with our Gyro that it walks and that over a bump or two its completely off.

More info would be amazing.

-RC

Two things we are doing is fine tuning the gain on the gyro and we have a temperature sensor.