Tales of Evolution: Alden Hart & Rob Giseburt, Synthetos

Tales of Evolution: Alden Hart & Rob Giseburt, Synthetos

Hi, this is Wayne again with a topic “Tales of Evolution: Alden Hart & Rob Giseburt, Synthetos”.
Hi i’m alden hart, and this is rob geisebert we’re here with senedos our other partner, riley porter will be at maker faire uh he’s not with us today. Um we’re here to talk. We specialize in motion control and, as zach mentioned, where we provide electronics for for the shape oco and, let’s see what we’re here to talk about is some of the evolution that we’ve come across to how do we take what is actually a fairly complex domain and Turn it into something that’s more accessible, so we can build more interesting products and and really move into the industrial space move into process, control and other things that are that are quite difficult. So here’s an example of one of the things. This is a speed test. We did on an ultimaker, so we were supposed to have don’t really have audio, but it’s making a lot of noise yeah.

So that’s uh. That’S an example. We’Ll have that on display at uh maker faire, along with a bunch of shapokos. Thank you so um. What i’d like to look at is: what’s the: where are we from maker perspective, with motion control? Where are we in industry? What’S the gap? How do we get there? So if we take a look at, we take a look at look at commotion in a single domain and system integration, so motion in a single domain we’ve as maker community we’ve done most of this, not really all of it.

We’Ve got. We’Ve got good, uh path planning. We don’t really have optimal path planning if we want to get to the actual industrial level. We’Ve got to get pulse integrity motion profiles if you’re doing a high throughput screening, drug discovery, type of thing and you’ve got a drop on your pipette and you’re moving real fast. You don’t want to move too fast, but then, when you go back and you don’t have it’s a different motion altogether and then these various other things that that we need to get to so the gap between where we are in single domain motion say just moving In xyz, or just doing a single pnp, a single 3d printer – let’s say isn’t that great. But when you get to the next level, we have a long way to go.

Tales of Evolution: Alden Hart & Rob Giseburt, Synthetos

We don’t really have a good way, a common way of doing device, integration, everybody’s doing their own stuff. We complex machinery is multiple motion. Domains. A complex pnp will have six things going all at once: they’re coordinated, they don’t crash into each other uh we’re really nowhere near that. From a from a community perspective, they do optimal job planning. What happens when what happens when something goes wrong? Can you handle an exception? Can you do that without dropping the line and putting you know hours into your in your production schedule and collision avoidance is good unless you’re doing robots boxing robots and then maybe it’s not so good. But those are the kinds of things. So how do we simplify this domain? We need to be accessible and these are our four sort of major audiences for this, the you know: arduino level, user, web programming, a machinist or other domain expert that doesn’t really want a program and then, of course we don’t want the tools to get we don’t.

Tales of Evolution: Alden Hart & Rob Giseburt, Synthetos

We want to make them simple: we don’t want to lose precision so that for professional uses we want to be able to use the same tools. Components, of course, are nice and we’ve got this beautiful ecosystem of arduino shields and things of that, but what’s interesting is how do we find a simple way to package things that aren’t already in that ecosystem? How do we arbitrarily extend the ecosystem? The things that we can find so the tools we’re going to talk about some of the things that we’ve come up with. We did this because we had to for our domain, but we’re looking at.

Tales of Evolution: Alden Hart & Rob Giseburt, Synthetos

How do we move? How is this generally applicable in other domains? So rob will talk about motate, which is a hardware abstraction layer. Canon is a set of standards. It’S not really standards, they’re conventions, for how do you put? How do you put a number of these things together and really this is all aimed at? How do we get to a hardware mashup? How do we treat hardware just like rest on the on the web and be able to say i need one of those one of those push them together.

I’Ve got to use their interface for it. You know how do we get to that point so i’ll hand it over to rob he’ll talk about motate. Thank you, motate is uh, is sort of the glue that binds all of this logic about uh motion planning and all that to the actual hardware itself and uh. The intent of this is that it’s it’s sort of a methodology of programming, as well as an api and the intent being that it’s easy enough for beginners to learn how to program on powerful enough for the pros to put it into a professional end. User product.

Um and of course, hopefully making beginners in the pros uh you go back up. One of these buttons makes this thing work all right, so um on the beginner programmer side uh, we could just say motate – is like you learn, embedded language um again speaking to beginners. Don’T know um warning code, i’m going to put code up, um i’ll skim over it because there’s very little to it. If i say in english, i want to turn pin 13 on and off here’s the code to do it. You create a pin object and you set it to 1 to high and set it to 0 to low, read the pin.

I want to read the level of pin 12.. That’S what you say in english in motate, you would just create a button pin and then put that in statement. It reads that pin when it gets to it and then you can do something based on that result. Timers i’ve seen very large blog posts about how to do timers on microcontrollers. It was a very difficult task trying to simplify this believe it or not. That chunk of code is an extremely simplified version of setting up a timer and uh i’ll. Look at that. A little bit more on the left, i have the motate code on the right.

I have the raw code if i want to program the exact same thing right and left for the arm. That’S on the arduino due now you see this massive pile of of acronyms that even after you know what they mean, you still have to look them back up again. Two weeks later, when you go to read it again, and i’m not gon na really try to explain what they all do, because i forgot um and uh, but uh here you can see. You know this.

This chunk lines up to that that one line and the rotate does that exact chunk um that line or that chunk there is handled by that line and motate code. The font messed up on this uh when it translated so they’re a little bit off, but tc start over there on the right lines up with uh. My timer start over here on the left function, and then you actually do something. Everyone 50 000 of a second.

In this little do something chunk right here, same thing. Over there um, like i said equally functional. Actually the motate code compiles down to smaller um requires less space um using uh the atmel libsam uh hardware, abstraction layer on the on the right. So the real power comes in um again the alignment goofed up a little bit, but if we want to change what timer we use on the mote code, we have this one define up here: um timer three.

We change that three to a four or a eight. We have eight timers on this particular chip um. If we want to change that that that same thing to any other timer, here’s all the places we have to change the code on the right again, the alignment’s a little bit off.

But you can count so and that’s just to say that particular chip. So what? If we want to talk about uh what, if we wanted to put the same code on the avr, what the hardware attraction layer of the of mote, we can potentially put it on any of those processors. We don’t have ports for all of those now and the ones that are we’re still pointing to some of those but uh 18 mega atx mega and that metal arm are definitely um up front.

So got five minute warning so um. For those that know professional programmers. There’S already a lot of value there in in what i just said so i’ll skim over this. Basically, i am using c plus plus – and i know i’ll get flack for that, but it’s optimized c plus i’m a software engineer by day.

I know what to avoid and and this avoids it it’s it’s designed with good ui design principles, because an api is a ui. I know a lot of people, don’t believe, and we don’t compromise performance usability, uh, use mirage interfaces, opaque interfaces that are designed for the compiler so that it boils away during compiling and optimizing so that, when i say led pin led pin equals one on the avr. That compiles to one instruction and that executes in two cycles on the arm. That’S on the duet that compiles down to two or three instructions and executes in two to five cycles. That’S the absolute minimum time it takes for those processors to perform, perform those functions. So the the second thing we found is moving towards hardware mashups, so we’re defining hardware mesh of any set of hardware – that’s um dissimilar, but needs to work together, and it’s controlled a single unit we’re doing this as restful hardware. What is rest uh rest is a which are things representations of those which are things like a line of json state transfer. Can you get the state from it? Can you set the state and then, when you take a look at complex systems like say a 3d printer? There are many different things like a three-dimensional domain, a an extruder component, some heaters and maybe a camera or something of that sort. It’S useful to recognize that rest is not http and http is not rest. Rest is just an architectural style, it’s a way of programming and you use these basic concepts to simplify how you deal with things that are actually fairly complex.

At the end point we run rest over usb spi, rs485 and, of course, http as well. What is json, why do we use it? Json is javascript object, notation, which is a fairly concise way of putting a bunch of data on a single line or in a single structure. It’S much more concise than say xml, it’s not as concise as raw binary, but it gives you a lot more flexibility and it’s already in almost every every compiler, every language that you’re going to use it’s in javascript, of course, but node.js java python ruby pretty much Anything you’re going to do and what we think is important is that we put this on the device itself. We don’t front it with a gateway.

We actually have these running on those processors on the arm x, mega and the uh. The 328 that’s running on the arduino uno’s and all the various variants of that uh canon is a project we defined separately from synthetic. So we wanted to you, know, distance it and just make it more unowned. If you will and that’s where we’re defining the protocol. Uh, the the um we’re defining the protocol and the conventions, and then the hardware compatibility. So what can you do with json the top one’s a line of json? That’S a command that moves g-code to x-20.

You can configure motor 2 with that line. All the things that you would use to configure the motor are on that line. You get a status report.

Where is it? How fast is it moving? You can filter the status report, so you don’t have to get everything back all at once and you can do addressing address this to the master masters motor number two is going to take. This is very similar to the public pub sub stuff. That pinocchio is talking about uh, do the same thing for the slave board: you’re running all these boards.

In parallel, when you have multiple controllers at the same time, yeah so uh, you can build networks of these things and use json. It’S inherent namespace as a way to do the addressing we use a subset. We dumb it down, we use a subset of json.

We only use these components of it. We don’t use dynamic memory allocation oops, and just so you know it’s not as bad as you think, efficiency wise. These are some comparisons. Basically that component, the flash footprint, which does the parser, the serializer, a dispatcher and all floating lives, adds about four to six k. Uh of into uh into an uno and um, we use a bit more space on the bigger chips. The floating point marshaling is manageable. It’S not uh! It’S it’s you’re, not going to wait forever to get these kinds of things in and out of your system.

So um, please visit us uh, look at kennen uh, look at the synthetos githubs. If you’re going to look at the githubs go to the lower branches, that’s where all the work is going on and and we’re happy to answer questions we’d love to have people collaborate and understand how to use these techniques for your projects. .