Katy Levinson, Don't Fix It In Software, Defcon 19

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so hi everyone my name is Katie Levinson and this presentation is called don't fix it in software and you may be asking what happened what's happening here and the long and short of it is that just said I I got I got drunk and mouthed off at Def Con 17 and and you know some and someone showed up a longer story is it somebody showed up when I speaker didn't show up and said you know entertain the crowd and and you know and he was whining about how his robot didn't work in software and it didn't work and he was going to use software to fix it and the problem was basically that his that he said it didn't drive straight and I'm finally like what's the ratio of your drive base and he's like you know are you driving the rectangle with the fat side forward or the skinny side forward and he says the fat side and like if you look at the nice fat rec - I would I have a laser pointer this means I'm in charge could you look at the fat rectangle if you imagine wheels on the end of this as you go like as you as you go forward at all you're basically levering against yourself to walk down and it's not really magical that you're getting out of alignment and if you if you want to only go straight you know you drive it with the skinny side of your rectangle forward and then enjoy figuring out how to turn but you know so this is this is a situation as I you know and this goes on more questions that I wind up doing this this very academic intelligent rant which I'm I'm really sure probably look more like that but the long the short of it is afterwards security comes and takes me aside and this this makes me nervous because I don't have the best history with authority figures but you know it says why don't you do that this is a talk and I was pretty excited because you know the bottle of vodka man offered and unfortunately some scoundrel absconded with my vodka I'm really proud I got to use those words it's like my vocab words of the day and and but now thankfully someone else would give me vodka props to you dude haha but the long the short of it is now we're coming up and I'm going to do this big list of all the ways in which I all the things I wish someone had told me before I started building robots competitively and professionally at the very least I can show you some pretty pictures I do Photography and so most of these slides are pretty pictures I'm really that boring it's just there's some pretty pictures for you to look at alright my best qualification is the experience of doing stuff wrong as I'm sure you know all Def Con speakers are only admitted if they are exceptionally qualified so that that's how that's how things are these are qualifications I'm probably more likely to put on my resume I just want to like say right now thanks to originated I just started with them like a little bit ago and they're totally like yeah you can do this talk that's basically self humiliation you could do it in RNA they often printed me an awesome hoodie which I unfortunately left on the floor because I plan ahead but they are awesome and if you are sick of your boss's consider applying yeah so basically if you have a question just like ask and if we run out of time I'll have to ignore you and you can email me but I'd like just to be you know casual and interactive as much as possible was what no no this was this was DEFCON 17 where I went up and like oh that sounds terrible we should do something about that guy's Q&A afterwards all right all right so the outline we're going through some good ideas oh we got some bad ideas and we're going to go through some things that people generally just don't think through the whole way so starting right off with the good ideas let's go through physics torque is angular force if you were to take a wrench and apply some force to a bolt in a nice in a nice you know arc that is torque speed is how fast you do it physicists will get snobby and tell me that I'm not saying this correctly I don't care this is just a working definition for us idiots okay first item is pulse width modulation previewing it to PWM sometimes you want your robot to be going at a speed somewhere between zero and in tax people frequently decide that the way to do that is to just feed less energy into the motors and that's a bad idea you really should not be doing that motors do not output power linearly they you can see this straight line is actually is that is the the the force output you can see on the when it hits the side with a torque that's called a stall torque that's where it's not withing at all where it hits the the the x-axis that is called the freerunning speed where there's nothing on it at all and you know that the variations come in between there you can see the power that is output in total on the curve line and and you'll notice that like it is not the same at all points so you actually want to put it where it's getting I'm sorry guys over there I'm going to laser this one and try to describe as best as possible but I apologize in advance you want to put it you know somewhere near the top so you get out as much power as possible and less inefficiencies alright so basically you want to pick a good point on that curve and stick with it as much as possible gear your gear everything you know how fast you want the robot to go so take the motor at the torque and on power output you want and just gear it so that the wheels actually turn at approximately the speed you're looking for um and the question is you know oh sorry nope we're looking now this is an oscilloscope looking at a PWM output and so you can see that basically the line goes up and down it's about one third down two thirds up so if you do this insanely fast to humans it looks like the motors just running at a slower speed and so if they're if the line is up two thirds of the time it's going 2/3 of its max speed and this is a real way you control speed on robots without totally messing up your power output and the question is you know how do you pick the point that you run this square wave at and the important thing to remember is that climbing takes force unless you're going to be constantly operating on a perfectly smooth surface you're going to need a little bit extra boost to get over whatever you happen to run into and what happens very often is that people they put themselves right at this total peak and then they have to go up a hill so now they're moving slower so now they get pushed down this side of the curve they're outputting less speed is coming out as torque now the motors are sufficient so they can shove further down the curve and further on the curve further down the curve and just willing in place and really not getting anywhere so you want to optimally pick a place a little bit over towards the speed side is so if you hit a bump you don't wind in this horrible downward spiral of getting nothing done at all and the expected terrain will change approximately where on the speed side of the curve you want to set your running point generally speaking yeah I hope I'm going into okay speed this is uh you can see at the bottom these things here I'm going to like I feel I can being a total dick here these things at the bottom these are pwms usually do this as a hardware object you buy them the Internet sells them they're like a hundred bucks they're cheaper if you like fire but like you know a good trustworthy like I would feel comfortable putting this on my robot and it will probably not be the thing that catches fire about a hundred bucks this guy removed all the cooling systems because he likes fire that's his prerogative you do get to at least see the insides of them which is interesting to some people all right next item I really shouldn't have to have a whole series of slides on this but software people think threads are just kind of magic it's like I've applied a bolt to this problem and now all my physics are solved and it's like no people major in this and it's kind of complicated so but once over lightly this is a bolt this is not a bolt every time you call this a bolt I die a little inside and I need to drink this is a screw the end is pointy you don't have to drill a hole first when you put it in you don't put a nut on the end so I don't know what this chick's problem is but you don't need to put a nut on the end of this also the bolts need to have something on the other end of hold them on you either thread the piece of metal or wood or whatever that you're putting them into or you put a nut on the end this is wrong you're just going to rip the head off the bolt here you see the arrows imply the force you're going to rip off the head of the bolt you're going to rip the the twirly okay the threat yeah we we are extremely technical around here you're going to rip the threads off the screw if you do this don't do this okay this is also wrong this is a machine that does nothing but bend your screws and by screws I mean bolts all right this is going to get a lot interesting really fast all right this is wrong this is also wrong in this one you are not bending your bolt but you're going to sheer it because you're using the bolt as the major pieces that keeps it together and they weren't actually in the same way that you know you work off the head you'll just share these things in half they're like zinc plated like they're really not made for this okay don't do this this is also wrong this is a it's no light dude this is right okay this is how you do it the bolt is actually not the object that is holding the pieces of metal together but both is the object that holds the pieces together enough for static friction to take over and actually do your major holding force like it's like you don't like the force should not be physically in the bolts the forces in the fact that that static I'm just going to repeat myself you got it okay all right next this is a puppy because we're changing ideas and people say I talk too fast so I just put puppies and kittens and those things in whenever we have to transition ideas I hope you guys are cool with that puppies are awesome though so I really hope you are next item drivetrain ratio okay we're going to consider the the places where the wheel forgives from the four-wheel robot here because we're simple okay so assume that the the points where the wheels touch the ground are points you make them into a shape um if it's a square then your you know you can go forward and turn you know if you if you want it to be super agile you know you have the big like crazy angle thing or you drive the rectangle with the short side forward if you just want it to go straight almost all the time this is not terribly complicated but a lot of people are just like I'm making a robot I'm going to put some wheels on supply wood you know so think about this when you're setting up your stuff okay the other thing that people default to is a car though you know all of you who drive though that cars aren't actually like particularly nimble objects they need to lay that's just like trying to turn a bicycle they need to go forward in order to turn also making the wheels swivel properly is a pain in the ass so unless you have a good reason for this this is probably not the default that you want to go to even though it's what you see most often in your daily life tank is actually a pretty good default just put the wheels down the side put them all forward to go forward put these guys forward and these guys backwards to turn turns on a dime pretty clean you'll scuff up everything if you care about that because basically the whole art of it turning is it doing little micro hops so and in particular if you have large threads and then you previously had rug in your house some people will do like two wheels tank driven and then casters or Omni wheels on the front as a slightly less brutal alternative that that will that will save your carpet significantly but no guarantees man Omni wheels unless you have a good reason you should just buy these so many people want to make them I warned you so they're happy with the resistance they permit like some people will do like they will have a set of wheels going this way on the robot and then a set of wheels going this way on the robot and what you can do is by driving different sets of wheels independently you get a robot that goes this way and goes this way without turning cute trick terrible lateral traction for pretty obvious reasons this thing in the middle here is an omni wheel I'm going to I I'm sorry I the speakers in the way I really can't even see that one I'm so sorry guys um but yeah this thing towards the middle is an omni wheel and as you can see it's a yo dawg i heard you like wheel so i put some wheels on your wheels these little black things are free-floating so this is this is why you can have the wheels go opposite ways of each other and not have anything actually fight this is also the transition side towards vector drives which are these things with like the miniature hair hair curler rolling pin things you'll notice these are at an angle which means that this wheel when you turn it most people when you turn it they just want to go forward this wheel wants to go forward and also in the direction of the little hair curlers and so when you look at this if you put four of them on there like default state is that they all have a direction they'll have two directions that they're pushing and if you balance them right you actually now have a like fully manipulatable crazy thing so if you imagine that you drove all these wheels towards this point right in front of the robot here then they were going to what oh man thank you awesome dude thank you so much FairPoint man okay so if you drove all the wheels going towards this way you'll see that this arrow will balance that with this arrow and the wheels will actually and the robot will actually go that way whereas if you've drove all the wheels towards that know if you drove all the wheels towards this point in the middle the wheels will all turn inwards and you're actually going to go up and down this way it's like kind of sick so everyone got that okay people look at me weird when I explain this the first time it's really sick drawbacks you're losing a lot of power the robots constantly fighting itself also if one of your wheels leaves the ground you are so it's not even funny this is not an all-terrain vehicle by any means at all this is a very nice indoor flat level guaranteed surface toy where you can frequently swap out the batteries all right next thing the motor direction so many people they're like oh I have my plywood and I slap two wheels on the side and I gun them full forward even with the PWM it lists this is because brushed DC motors have a preferred direction that they like to turn and if this one's going if this wheels going this way and this one's going this way and the motors are towards the center the rotors are actually turning opposite directions or to make the robot go forward and brushed DC motors work better in one direction than the other how do you know you're using brushed DC motors because you didn't pay extra to be not using brush DC motors so you need to watch this this is just a like one of those things watch out for any kind of encoders or anything we'll fix this don't just vary the power output first there's a curve and then there's a thing that as your battery charge changes it will change so like you will have it tuned perfectly for a full battery and then as the battery goes low your butt will start listing again and you'll be sad don't do that guys this is a panda pandas are awesome okay now ready to go on to some bad ideas yeah those were the good ideas guys it's gonna get great from here first item this is a tether cable yes we're from the 90s when we program our robots deal with it so usually these usually this is what you do to program the robot it's really important that you take the screws out of the tether cable because how many people here have had software not do what you want to do the first time you run it oh you guys are okay so when your software controls a hundred fifty pound robot that can be awkward and when you have screwed in the robot to your laptop that can be really awkward and you're gonna say Oh Katie you know you warned me about this there's no way I'm going to do this now isn't fiery bulb destruction that used to be my you know expensive equipment but the reality is is that you have friends and your friends are probably as dumb as you are and they're going to think that they're helping but really they're not really they have terrible ideas so just take my word for it my teams have lost two laptops this way take out the pins on the tether cable and everyone's just a happier person ah next item speaking of like that goes wrong you need a big red button that makes the robot stop this big red button needs to pull the power from the battery to the rest of the robot and full stop it just like a switch comes open and there's no more electricity anywhere in the robot it cannot rely on software this needs to like you need to physically disconnect this you also need one on the robot and one on the driver's side because frequently it'll stop listening on the track the software runs like new the driver station the Harvard on the robot this is because chasing down your robot to tackle it is awful see this guy this guy on the back he's like why didn't you put a button on there like don't don't do that ah just like tackling a person's bad elf robots are made of metal as I know if your robot weighs more than 100 pounds I recommend these during debugging I'm not I'm not kidding you like these are actually Gen especially that 4:00 in the morning all we'll just see what it does like it's it just it just makes your life better and I mean like you can look dorky but at least you don't come out with bruises ah next item this is a set screw awesome there is a grub screw it goes into robots you can see here if they're being tightened with this little allen key to to to keep a you know an item mounted on a shaft of some sort they're awful don't use them they will shake loose they will rattle loose they will fall out mr. yuk says no don't do this I use key stock instead key stock is and this is basically they cut a little notch in the in the axle and then they'll cut a corresponding notch in your sprocket or your gear your whatever and this little piece of metal will slide in between them and this is so much better and my phone's ringing okay um this is so much a better way to go it and and and do like I've met so many people or who like the I know a team wants that their set screws failed so often they just bought a box of cheap drill bits from China and every time it came loose they would drill into it and snap off the bits lush the life that people wind up going to to like to compensate for the fact that set screws are awful are impressive during competition you guys are going to be so frantic for time just just these just avoid these this is a bunny what the is up with my phone man hold on there we go okay so next item reviewing fizzes again velocities acceleration integrated position is velocity integrated so you might ask can i integrate acceleration twice a good position and the answers yes you can look I did this formula this super pixelated formula down here alright and then you might ask yourself so I can use accelerometers to figure out position because figuring out where robot is it's like a significantly like painful and important thing so this is really exciting can I use my accelerometers position sensors no you cannot this is why okay so you can see like I mean you have to trust me on the math on this but basically when you when you've integrated twice you have CT plus D if T is time as time goes to infinity C times some nonzero constant your error as your robot remains on as time goes to infinity your error goes to infinity this is yell right don't do this so many people have tried and they just don't do the calculus out on this they're like I almost have it working it works when it boots up I just have to debug it it's really hard to watch so please please guys this is a cat all right these are potentiometers you turn them they have basically a resistor that in varying thickness as you go through it on the one side the resistance is thin and the other hot sides resistance is thick they will calculate your position or rotation one thing is support is they have a limited number of turns don't put this on your wheels so me they like it they figure it out pretty quick but it's really sad to watch so don't do that this is for robot arms for other things that have a limited range of motion audio potentiometers which are like the potentiometers that you find in your speakers or bad because audio drops off log rhythmically unless you would like to do math 2d logarithmic Phi that's a word your inputs I really thought that had this fantastic photo of this rookie team that had a driver control station where they just like embarked off the positions of their arms like one two three and it goes like like like one two three like just don't do that though they'll do that by the right potentiometers you want linear potentiometers next item potentiometers are held on with set screws as previously discussed set screws are awful so find something else find anything else this is like one of the few like pseudo legit uses of a set screw because they really don't get a lot of choice with lot of manufacturers but once again don't use this if you if you cannot find something other than the set screw to lose at least make sure that there's no significant like amount of torque or like speed that's going on here because these will slip next item so optical encoders are there's no interesting pictures this is kind of so optical encoders are essentially black and white stripes and you have you know a little a little sensor that will be like I see white now I see black now I see white now and you have these arranged around a spoke and as the as the wheel turns it'll change from black to white to black to white to black to white um people wind that they don't want to make these if you're broke use a sharpie and a CD we had one year in competition where they wouldn't permit us to use anything that was in the kit of parts they gave us some dreamweaver cds we found a use for them um this is perfectly legitimate it I mean like you know it dropped with you like we poor freshman's like carefully measuring out these perfectly spaced black lines but it will work you can also order them online if you don't have freshmen laying around the other thing it's important is today oh yeah to check I put the slide and awesome so these will only figure out absolute measure is it's black it's white it's black it's white if you are going the other way it won't know the difference so what you need to do if you want to know the direction and the and the absolute value is you need to have two stripes slightly offset from each other so you imagine them like this as it comes past if you hit this guy first then this guy you're going this way if you hit this guy first and this guy you're going this way pretty cool okay topping two layers of metal there's so many jokes so tapping is when you put the threads for your bolt physically into the metal um okay sorry I thought someone was telling me to get off the stage already so so basically what happens is people what you put the threads into the metal and then you don't need a nut on the other end this is really handy when you're going into deep metal um if you have two layers of metal and you put them on top of each other and you tap through them and then one of the metal the layers of metal rotates the threads don't line up anymore this sucks the preferred solution is just drew a clean hole through this guy and put the threads in the lower guy IKEA is or pro at this we actually what yeah no not like we struggle this now we're like assembling IKEA head we like those crafty Swedes they figured this out all right next item sprockets this is a sprocket sprockets interface with chain okay these are gears gears interface with gears this is another one of those things that you'll make me cry when you get it wrong as a matter of fact I found this image when I search for sprocket and I just felt like this needed to be addressed alright chain you all know what chain looks like here it is chain stretches I know it's metal but it stretches this is because there are a little late though you can see the little links like these guys a little basically they're up there their little 8 shaped things and you put a post through the two ends of it and as they where the holes get bigger so chain as you use it will stretch about 5% and people don't expect that because they're not used to the concept of metal stretching but it really does stretch so you need to make things adjustable um you need like if you have you know a sprocket here a sprocket here this needs to be in a slot so that when the chain stretches you can just jam it back and bolt it in again it's much easier than all of the alternatives that I've seen that make people really miserable you also need to have a minimum of 180 degrees of rap on any you understand right needles wrap this is a sprocket and the chain goes around that's the wrap on the chain minimum of 180 degrees on anything that is driving anything else so I've learned you can go with less but if it's the motor output or like the next stage input that needs to have 180 degrees of rap oh so you have scaling issues when you combine the 5 percent and the hunt the the the five percent of stretch and 180 degrees of rap because if you have too many teeth in your hundred eighty degrees of you will eventually just randomly get another tooth on your chain in the process of it going around so if you have more than about 70 teeth on your sprocket you may want to re-examine something just this is pro tip for people who just decide they want to manufacture their own sprockets next item these are idlers on a bicycle this is okay these are spring-loaded idlers basically it keeps it tense because there's a there's a spring pushing it down this is okay because bicycles only go in one direction if the bicycle starts going the other direction you just yank it the opposite way of the way with the spring and your idler is gone so you need to put the idlers on the unloaded side you can only have spring idlers on single Direction movement be cool that it's kind of like I know it's kind of it's really hard to get a picture that demonstrates that okay this is a honey badger what happened to this oh no this is my photo of Bob Roth's but apparently he doesn't want to come to Def Con so what if you paint your robot one thing we did this one year with some sponsor it was like we're going to donate a free powder coat painting powder coat is like super awesome it's the way they paint cars it's very very very slick on and so we had this on a friction mount for our adjustable chain um and this was really embarrassing especially to the sponsor who had just sponsored a very nice powder coat job so yeah no painting on friction mount parts next item is no painting on friction mount parts in general because now they're thicker than they used to be and you're never going to get them apart again you need to do and the other thing about this intolerance stack of in general if this one is plus or minus like if this piece interfaces with B if a is plus or minus you know an eighth of an inch and B is plus or minus an eighth of an inch together they are plus or minus a quarter of an inch you don't average these things you always assume worst case scenario it's really important other like it's really expensive too when you when you when you manufacture custom parts all right now we're going to go forward to thinking things through the whole way this is I really shouldn't have to go through this but I do both have a size so many people they design their frames do the maximum we go by competition and then they have a bolt sticking out there's nothing sadder than to watch a freshman rookie team like filing bolts off the side of their robots um really guys just robot the bank my coach used to say robots grow so always give your robot about an inch on any side for you to up both of a size during installation you can see here but this bolt fits but there's no physical way to put it in bolts are installed with tools and if there's nothing else I can have you take out of this please repeat after me I will always have to take my robot apart again thank you so much this just thing things break things break all the time things break at the worst time assuming you have to take it apart next item I will have to drill more holes in my electronics board yeah pretty much speed holes make the car go faster man um but quite seriously this is the reason that you don't make your electronics board out of conductive material because oh my goodness we're we're on in like five minutes I have to mount this extra speed controller let me just take this drill and drill through the metal plate and bolt my speed controller on and oh look now there are metal shards and all my really expensive electronics use lexan use wood use anything else guys really I'm not more issues you need to access the electrical boards to plug and unplug things to debug things you will replace parts electronics board you need to be able to take objects on and off you need to be able to take the whole board out for when you like frantically are drilling holes in the side of your frame because you are over the weight limit just be able to take the whole thing out put it somewhere else screw with your design and put it back you know get the canned air dusted off by the lake and air saves lives you know you have to do like those those those final matches because like usually you know you have you've downtime between matches final matches are back to back to back turn the things upside down cover the and then cover the the motors and the cold stuff and if they don't shatter it's great also don't cover your high school interns in that because they have to go to the hospital we love you John it's okay all right flamethrowers these are an awful idea but you're going to do it anyway seriously though especially for battle pots I've watched a flame through a robot get its ass handed to it by a robot made by middle schoolers made entirely of plywood these are not effective they're awesome but they're not effective so if you make a flamethrower rule one is you're going to spill your fuel you're probably going to spill it on your electronics board a lot of people I know use isopropyl alcohol because it evaporates that's a great decision as as far as flame throwers go um yeah so so so just plan on the fact that you're going to spill your fuel at some point batteries batteries need to be easy to remove um fire is really bad batteries are one of the objects most likely to kill you on a robot because you're frantic you rip them out you know you put your arms across the leads and you're sad people ask me all the time what are good places to get batteries cars are not a good place car batteries are not for running indoors what god yes people are really creatively stupid so motorcycles all have pretty nice sealed lead-acid 12-volt batteries recommend those as a pretty solid if you're looking for a slightly better scale the lithium sort of things take them out of drills they're really really made to be abused though so those are like the two night also drills you can just use the charging station made for them just like plug them back into the rest of the drill pack and plug them in the drill charger they're really nice to recharge um they're quite expensive though oh yeah so one time we mounted the battery to the robot with C clamps the steel frame robot with C clamps and while we were driving around the sealy clamps like wiggled out and managed to get themselves over the contacts I now advise you to use velcro to hold your battery in place what it caught fire it was really exciting that we hit the big red button and pulled the flaming battery out the other great thing about motorcycle batteries you can get another one yeah that was that was a long night that was two nights before ship day next item when you make custom battery packs things get really exciting I am informed I have not verified the lithium polymer batteries have about the same density reading on an x-ray as c4 so UPS ground ah flying with robots is any of these things it's basically a bunch of wires with some things covered in electrical tape I mean just it's really really awkward to explain uh-huh yeah good battery sources once again motorcycles and drills motorcycles will let acid they're heavy they're inefficient they're cheap well as they go like you know robots aren't cheap in general okay acknowledgments for all the stuff I didn't have to learn the hard way my mentors on on team 360 when I was in high school who didn't kill me for all the dumb I did stokeley and Paul Roush my former co-workers from NASA but really really really really tired house mates the IRC channel I'm stupid on um my house that I live in the hacker space and from and my employer who came and saw the outline of this talk and said yeah we'll let you do that anyway ah this is another picture that skids the thing this presentation is Creative Commons by attribution non-commercial purposes share alike and this is my contact into if you guys want to bother me do have any questions sup oh it's 10 minutes my bad I'm out man all right you guys been awesome
Info
Channel: Katy Levinson
Views: 39,103
Rating: 4.757143 out of 5
Keywords: Katy Levinson, Defcon 19, Defcon, Don't Fix It In Software, Robot, Robotics, Robots 101
Id: Drk3Dz3_yLE
Channel Id: undefined
Length: 39min 1sec (2341 seconds)
Published: Thu Oct 27 2011
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.