So, hi, everyone. My name is Katie Levinson. And this presentation is called Don't Fix It in SoftLayer. And you may be asking what's happening here. And the long and short of it is I just said I got drunk and mouthed off at DEF CON 17. And, you know, someone showed up ‑‑ the longer story is that somebody showed up when a speaker didn't show up and said, you know, entertain the crowd, and, you know, and he was whining about how his robot didn't work in software. And ‑‑ or 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. If you look at the nice fat rectangle ‑‑ I have a laser pointer. This means I'm in charge. If you look at the fat rectangle ‑‑ and the skinny side forward, and the skinny side 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 it's not really magical that you're getting out of alignment and if you if you want to only go straight you know use drive it with the skinny side of your rectangle forward and then enjoy figuring out how to turn um but uh you know so this is this is the situation as i you know and this 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 um but the uh 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 um 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 um and and but now thankfully someone else will give me vodka props to you dude uh but the long and the short of it is now we're coming up and we're 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 or professionally um at the very least i can show you some pretty pictures um i do photography and so most of these slides are pretty pictures so i'm really that boring it's just there's some pretty pictures for you to look at all right uh my best qualification is the experience of being able to do stuff wrong as i'm sure you know all defcon speakers are only admitted if they are exceptionally qualified um so that that's how that's how things are uh these are qualifications i'm probably more likely to put on my resume um just want to like say right now uh 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 all they printed me an awesome hoodie which i unfortunately left out but i'm going to show you what it looks like and what i left on the floor because i plan head um but they are awesome and if you are sick of your boss's consider replying um yeah so uh basically if you have a question just like ask uh 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 defcon 17 No no no this was this was defcon 17 where i went up to the guys and said hey you know what this is up and like... Oh, that sounds terrible. We should do something about that, guys. Q and A afterwards. All right. All right. So the outline, we're going to go through some good ideas, we're going to go through 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, 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 and 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 int 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. You can see this straight line is actually that is the force output. You can see 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 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 curve line. 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 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. Now, I'm going to say that I just want to talk about our current method of modeling, the 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 um and the question is you know uh oh sorry nope we're looking picture now um this is an oscilloscope looking at a pwm output um and so you can see that basically the 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 motor's just running at a slower speed um and so if they're 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 um and the question is you know how do you pick the point that you run this square wave at um 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 um 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 motor is 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 uh you want to optimally pick a place a little bit over towards the speed of the motor and then you're going to get pushed down this side of the curve and then 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 um and the expected terrain will change approximately where on the speed side of the curve you want to set your running point generally speaking um yeah i hope i'm going at okay speed this is uh you can see at the bottom these things here i'm gonna like i feel like being a total dick here um these things at the bottom uh these are pwms you usually do this at the bottom these are pwms you usually do this at the bottom these are pwms you 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 um 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 100 bucks this guy um removed all the cooling systems because he likes fire that's his prerogative um you do get to at least see the insides of them which is interesting to some people all right next item i 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 a 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 um 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 um 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 um you don't need to put a nut on the end of this also uh 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 can just put a nut on the end of this and you can just put a nut on the end of this or you put a nut on the end um 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 or you're gonna rip the uh the the um twirly okay the thread 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 going to get a lot interesting really fast all right this is wrong this is also wrong um in this one you are not bending your bolt but you're going to shear 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 rip off the head you'll just shear these things in half they're like zinc plated shit like they're 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 um like it's it's it's like you don't like the the the force should not be physically in the bolts the force is 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 uh 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 uh the places where the wheels we're going to send the four-wheeled robot here because we're simple okay so uh 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 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 uh 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 uh so think about this you're setting up your stuff uh okay the other thing that people default to is a car uh though and you know all of you who drive know that cars aren't actually like particularly nimble objects they need to they need that's just like trying to turn a bicycle they need to go forward in order to turn um 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 uh if you care about that because basically the whole art of it turning is it doing little micro hops um so and it particularly if you have large tank treads and then you previously had rug in your house uh some people will do uh you know you can do a little like two wheels tank driven and then uh casters or omni wheels on the front as a slightly less brutal alternative um that that will that will save your carpet significantly but no guarantees man um omni wheels uh unless you have a good reason you should just buy these so many people want to make them I warned you um so they're helpful with the resistance um they permit like some people will do uh like they will have uh you know they will have uh you know they will have uh you know 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 um 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 speaker's 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 uh and as you can see it's a yo dawg I heard you like wheels so I put some wheels on your wheel 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 curler rolling pin things. You'll notice these are at an angle, which means that this wheel, when you turn it, most wheels 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, their like default state is that they all have a direction, they all have two directions that they're pushing. And if you balance them right, you actually now have a like fully