We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Don't Fix It In Software

00:00

Formal Metadata

Title
Don't Fix It In Software
Title of Series
Number of Parts
122
Author
License
CC Attribution 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
Katy Levinson - Don't Fix It In Software At Defcon 17 when a speaker didn't show a bottle of vodka was offered to whoever gave an impromptu talk. Somebody went up and talked about his robot project. He mentioned that it didn't normally drive straight, and talked about all the software solutions he had tried to fix this. I was reasonably intoxicated and wound up shouting at him over the crowd that it did not drive straight because of his drive base design, and not his software. This led to questions, which eventually led to a rant about all of the dumb things people who are brilliant at in software do wrong in hardware, and then try to fix using more software. Sadly a scoundrel absconded with my vodka, but a goon took me aside, said the information was great, and told me to submit it as a full talk. Now I am. This talk will cover material assuming the average audience member is a relatively intelligent coder with a high-school physics/math background and has seen linear algebra / calculus before. The intent is to navigate people new to robotics around many lessons my teams and I learned the "hard way," and to give them all the words to look up in wikipedia to help bridge the gap between amateur and novice professional robotics. It will not cover why your Arduino doesn't work when you plugged your USB tx into your RS232 tx. Katy Levinson Katy worked as the Software Lead on the Lunar Micro Rover project at NASA Ames. This work earned her Best Team Lead for the Ames Robotics Academy. The portions of her work done while completing her Bachelor's in Computer Science at Worcester Polytechnic Institute won her WPI's Honorable Mention for her Major Qualifying Project. She has been a team member for four competitive seasons of FIRST Robotics, mentored an additional one, helped found five more and mentored them through a full competitive season, earning her a Recognition Award from the Worcester Public Schools and a Team Mentorship Award from the Washington State FLL for her work mentoring students. She co-founded a robotics science camp at 16. She is now a software engineer at Google and a director at the Hacker Dojo, a hackerspace in Mountain View, California.
RectangleRoboticsSoftwarePresentation of a groupComputer animation
Digital photographyExecution unitMaß <Mathematik>Metropolitan area networkInformation securityFigurate numberAuthorizationLecture/ConferenceMeeting/Interview
WordElectronic mailing listRobotics
RoboticsArc (geometry)SoftwareHacker (term)EmailComputer fontForceMoment <Mathematik>Slide ruleRight anglePhysicalismMoment <Mathematik>Boss CorporationArc (geometry)Computer fontPhysicistMultiplication signGoodness of fitForcing (mathematics)BitComputer animation
Power (physics)Moment <Mathematik>Green's functionFunction (mathematics)Power (physics)CurveFunction (mathematics)Moment <Mathematik>FreewarePoint (geometry)Line (geometry)Hydraulic motorForcing (mathematics)Total S.A.Bounded variationFood energyRoboticsCartesian coordinate systemMaxima and minimaComputer animation
Digital photographyPower (physics)Multiplication signMaxima and minimaFunction (mathematics)RoboticsLine (geometry)Hydraulic motor
ForceSurfaceBitPoint (geometry)SmoothingForcing (mathematics)Computer animation
Power (physics)Moment <Mathematik>Green's functionCurveHill differential equationSpiralHydraulic motorMoment <Mathematik>Point (geometry)Greatest elementComputer animation
Greatest elementRoboticsObject (grammar)InternetworkingMetrePhysical systemComputer hardwareRight angle
Slide ruleThread (computing)PhysicalismSoftwareSeries (mathematics)Computer animation
Multiplication sign
Programmable read-only memoryDisk read-and-write headForcing (mathematics)Thread (computing)Arrow of timeRippingVirtual machineComputer animation
Digital photography
Fluid staticsForcing (mathematics)FrictionObject (grammar)Computer animation
Group action
Shape (magazine)Plane (geometry)Wave packetData typeDefault (computer science)Programmable read-only memoryOnline helpStress (mechanics)Order (biology)Set (mathematics)RoboticsMultiplication signObject (grammar)AngleRectanglePoint (geometry)Default (computer science)Shape (magazine)Different (Kate Ryan album)MultilaterationExterior algebraMetropolitan area networkVideo gameNachlauf <Strömungsmechanik>Computer animation
Group actionAngleDirection (geometry)Vector spacePersonal identification numberState of matterDefault (computer science)
State of matterDirection (geometry)Default (computer science)Chemical equationComputer animation
Transcript: English(auto-generated)
So hi everyone, my name is Katie Levinson and this presentation is called don't fix it in soft layer And you may be asking what happened what's happening here and the long the short of it is they just said I I got got drunk and mouthed off at DEFCON 17 and And you know something someone showed up a longer story
Is that somebody showed up when a speaker didn't show up and said, you know Whining about how his robot Didn't work in software and it didn't work and he was gonna 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 recti, I have a laser pointer This means I'm in charge When 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 the situation as I you know Goes on more questions and 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, he says why don't you do that?
This is a talk and I was pretty excited because you know The bottle of vodka been 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 But the long and the short of it is now we're coming up and we're gonna 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 or 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. All right My best qualification is the experience of doing stuff wrong as I'm sure you know
All DEFCON 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 Just want to like say right now. Thanks to originate
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 our name 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 shit consider replying
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. No, this was this was DEFCON 17 where I went up and like oh
That sounds terrible we should do something about that guys Q&A afterwards. All right Alright So the outline we're going through some good ideas We got some bad ideas and we're gonna 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 in a 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 abbreviated to PWM Sometimes you want your robot to be going at a speed somewhere between zero and into max 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 is That is the the force output you can see on the when it hits the side with the torque That's called the stall torque. That's where it's not moving at all where it hits the the the x-axis
That is called the free-running speed where there's nothing on it at all. And you know, the variations come in between there you can see the power that is output in total on the curved 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 gonna 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 All right 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 power output you want and just gear it so that the wheels actually turn at Approximately the speed you're looking for And the question is you know Oh, sorry, nope, we're looking at a picture 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 there if the line is up two-thirds of the time It's going two-thirds 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 gonna 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. It's coming out as torque now the motors less efficient so they can shove further down the curve and further down the curve further down the curve and they're just Wailing 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 at okay speed this is you can see at the bottom these things here These things at the bottom these are PWM's 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 I've applied if a bolt to this problem and now all my physics are solved and it's like no people major in
This shit and it's kind of complicated So the 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 chicks problem is, but You don't need to put a nut on the end of this also Bolts need to have something on the other end to 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 gonna rip the head off the bolt here. You see the arrows imply the force you're gonna rip off the head of the bolt and you're gonna rip the the the twirly Okay, the threat yeah, we're we we are extremely technical around here
You're gonna 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 gonna 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 share 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're up off the head. You'll just share these things in half. They're like zinc plated shit Like they're really not made for this. Okay, don't do this. This is also wrong This is uh It's Miller 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 The bolt 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 it's like you don't like that the force should not be physically in the bolts the forces in the fact that Static, I'm just gonna 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 gonna consider the the places where the wheels we're gonna assume the four-wheeled 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 If it's a square then you're 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 gonna put some wheels on some plywood, 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 And you know all of you who drive though that cars aren't actually like Particularly nimble objects. They need to lady. 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 It'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 it particularly if you have large tank treads 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 helpful 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 gonna I I'm sorry the speakers in the way. I really can't even see that one. I'm so sorry guys But yeah this thing towards the middle is an omni wheel and as you can see it's a yo-dog
I heard you like wheels so I put some wheels on your wheels These little black things are free-floating so 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 curl hair curl or 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 they're like default state
Is that they all have a a direction? They all have two directions that they're pushing and if you balance them, right you actually now have a like fully