 Okay, so before that works, I just want to apologize first, so I might look a little bit tired. It's not because I partied through the whole night, it's actually because our flight just arrived six hours ago and we were actually one day delayed, so if I say something that doesn't make really sense to you during the talk, I encourage you to ask questions because it might actually be it, that doesn't make sense. Okay, was that out of the way? Hi, I'm Daniel, I'm from Beijing, I'm researching industrial communication automation, my private time I'm working a little bit on Mrooby and I would like to share a little bit about small hobby project I have worked on a couple of months, a couple of last months, so when I just came here actually someone asked me, what's this title, if I'm going to make fun of Ruby on Rails also, obviously that's not going to happen, it would be a little bit low-taste, we are really going to literally talk about wheelchairs and how to put Ruby on it and there's essentially two things you should keep in mind for the talk and I hope in the end for the conclusion, if you do not agree with me, you confront me with some questions. So the first thing is of course, why should I actually talk about Ruby on wheelchairs and the second question you should keep in mind is why should you actually care about this topic. So as you see, at the moment I can actually work, but obviously for all of us that's only temporarily, so I was not so fortunate some time ago where I actually rolled my ankle, so I ended up in a wheelchair for quite some while and it was quite painful, but the pain went away, it was the painkiller and the doctors gave us a wheelchair and thought, okay, that should work, so well my wife didn't think so because she had actually to roll me back all the way from the hospital back to home and I could easily convince her at that point to actually go shopping to get actually a better wheelchair, so an electrical one. The wheelchair bought is just actually the lowest type you can have, so you can imagine these wheelchairs are very primitive, they have two wheels, two motors have a big battery and a controller and after using it for a while I was thinking it would be cool actually to exchange this controller with something I have totally control of, so that thing cannot be software updated, there can be no viruses on it, so it's leaking a lot of features, so we can improve on that. So as a first start, we had of course to look on what do we want to do, we want to control motors, so before I actually cut apart the wheelchair I was actually making some tests as it actually possible, so the left side is actually a DC motor usually used for the efficiency and it actually works in a fairly easy way, so you are switching polarity from the direction and the rest is just power. Sadly I didn't have something like that at home except for the wheelchair, so I played with a smaller stepper, so a stepper motor is essentially a motor where you have coils you control individually and the direction is controlled by choosing which coil to activate, so I made a small little demo, so I used for that obviously M-Ruby, I had some small microcontrollers, so Yuki Matsumoto was mentioning small systems and mentioned something like 2 GB or 512 MB, but as a matter of fact, these devices here, those are something like 192 KB of RAM, so MRI would never work on that, so M-Ruby is the only choice to go for here and I actually implemented quite some years ago the IRB for M-Ruby and ported them also to these microcontrollers, so if you are interested about it there's actually another talk two years ago at Rubik's I gave out this topic, so it is actually possible, it's not too difficult in the end, so I was playing around, it's very comfortable to use the IRB here, which is actually not normal for embedded systems, so many of you might do web development and you use IRB probably all the time, in embedded systems that's quite common that you actually have this huge cross-compiling cycle, so it takes quite a long to iterate. Okay, so I feel confident enough that I say okay, let's cut my wheelchair apart and obviously I remember I could still not walk, so I really had to make that work at this point, so the dash detector I changed a little bit, so I just dropped away the whole controller, I actually tried in the beginning to automate the controller, but that didn't work out, so I bought a new controller and I used an STM32, which is a very small arm processor, so it's not an arm processor you have in your iPhone, it's something like an ARM Cortex M3, which is very small, very cheap and very low in power consumption. I put M-Ruby on that one, the stepping algorithm is very similar to what I had already implemented on the stepper and it actually happened that it was very easy to get started and in the end actually you will notice that this was actually the most easiest part of all to make it run, so obviously this is now only done via IRB, obviously I do not want to control the wheelchair via IRB, so the next thing was to build up a proper architecture for the wheelchair, so I had the drive system in the bottom, I added of course the second motor controller, I then decided to use Raspberry Pi, but I also played around with some other microcontrollers in the higher arm class and put MRI on that one actually, because it's actually powerful enough and then I had on top of that one user interface, which actually could be used by different devices, because I didn't want the 2D pen just on one device, so it was just an example when I'm sitting on my wheelchair and I'm trying to debug the wheelchair, my wife can just get out her mobile phone and drive me back home for example as a use case, so to go a little bit more in detail for the architecture, so I have the motor controller on the very bottom, I wrote a drive system, some kind of broker, that's maybe because of my background in signaling systems, so I was a little bit afraid what happens if I have a buck and endless loop when the wheelchair just accelerates, so I, honestly I over engineered at the beginning a little bit because I wanted to actually have an automatic braking system if I do not get any controls anymore, then I implemented a serial driver, which then talks to something called Z2Net, it's actually a very interesting standard program, so it's just a C program you run on embedded devices or Linux systems, which actually maps serial communication to UDP or TCP, sockets and with that you actually modulize very nicely away the whole drive system, so I could actually start hacking in the beginning just on my notebook, in the end after the code worked I actually dumped it on to the Raspberry Pi, then I used Sinatra, because I actually not really good at web development, so it was the easy choice for me, I wrote a small little website to generate into the user interface and then I actually controlled it via JavaScript and with that overall I could now actually go out and drive around, that actually worked pretty well because actually after just several days after I finished it I was already healed so I could walk again, so at that point actually the talk would already be over because after I didn't need the wheelchair anymore it just ended up in a corner, but as a matter of fact destiny came and I broke something again, but it's a little bit more flexible, this time actually I broke my tooth, so which is now fairly more painful than actually the ankle, so luckily again the doctors gave me some nails and painkillers and with the painkillers in action I had this high feel, wow now I have my own wheelchair, that's not a problem at all, I don't have anything to worry, but as a matter of fact now I actually depend on this thing, it turns out that you actually have a lot of problems with something you just make for fun and then something actually you really depend on it, so I could not just walk away after my Ruby program crashed, so there were several issues I just mentioned for here, so for example using a touch interface to control actuators, this is a pretty stupid idea, it's fairly unprecise, you have a very bad feedback, you can hardly get out of control, then the wireless interface actually, it's unstable sometimes, so sometimes the wheelchair started to drive and I could actually not stop it, another thing what I didn't consider is actually that the way I control the DC motors actually worked and giving us a constant power and that actually depends if the ground is steep or not steep, it's now falling down so that wheelchair actually doesn't have a constant speed, it's an issue and the thing I want to go more into detail is actually the question how far can I actually still drive, so maybe some of you have heard about this newer thing like electrical cars and this concept of range anxiety, so if you have a car and you're actually afraid, can actually the battery last until home or until the next power source, actually you have the same with the wheelchair, so how to look at that one, I was thinking a wheelchair should have a battery indicator, so I said there should be nothing to do for me, so where's the battery indicator of my wheelchair, well it is there and there's a problem here as you might remember I actually made some decisions to actually remove that stuff, so at that point I could of course admit that maybe it was just a pretty smart idea and the guys who designed the wheelchair actually already sort the bottle of things and I could just reconnect it, but let's not admit the mistake, let's just build my own battery indicator, so how does that work, so very very simple, don't go into electrical details here, there's just one problem, the battery has 24 watt and you can actually indicate the load of a battery by looking at the wattage and the wattage drop if it gets some load on it, the problem is with the arm processor I'm using, I can only indicate 0 to 3.3 volts, so what you're usually doing then is to implement something called the voltage divider, the very simple circuit which essentially just maps 0.3 volt or 0.2.8 maybe depends on the resistor you use to the 24 watt, you have a curve and the curve will be linear if all your components are proper, but how the curve looks is actually probably someone who knows really deep into electrical engineering could actually mathematically calculate that easily, I'm not that kind of guy so I experimentally actually now derived that, so what I used here is again of course Ruby and again it's very beneficial to have an IRB running on the microcontroller because you can just run your averaging algorithm, you can switch it together with a programmable power supply, you can set a voltage, then measure, then get the approximate value, put that into a list and then actually derive a formula from that. From there it's straightforward, so now you derive the way to get actually the absolute voltage and in the end you have a very, very simple Ruby method to actually get the relations between 0.3 to 0.24 and in the end again to check if that actually works, I use again the IRB so I use this programmable power supply and it doesn't matter, the better we would be the same and I can change the voltage and I can indicate it and of course due to the reason that it's not pure Ruby I can also use all kind of Ruby code which is allowed by M Ruby so that I can also check dynamically to see. Okay so with that one problem less then there is a lot of other issues I had but just to mention so for the touch interface I went to a gamepad it seems to be a little bit more optimized. For the redundancy I actually used an LTE modem so you can actually if you use two LTE modems and you made a peer-to-peer connection you actually short circuiting the routing so you actually only go over the base station the EPC of the provider network and the latency is quite low so they actually work quite well and for the steepness I actually worked on an automator which actually counts how much the wheel is actually turning it was that I can estimate the speed and was that I actually became not only comfortable of transporting myself actually to and I was the wheelchair but now oh it doesn't play that does that okay yeah okay it's not much to say just now you see that's the wheelchair wheel drive so and so I could not only transport on myself I could also transport other things like here for example my iPad or some coke or I could chase my son now all the usual things you would do now now was a wheelchair okay and at that point again actually again when I reached that state my foot wasn't really healed again so essentially I didn't need it at that point anymore and now I could put it again into the corner and let dust settle on it but I would expect because I didn't became smarter over time that the next probably probably come soon so I should I should prepare for that so I was wondering a little bit what is next but what should I look on it one thing I noticed is actually navigation so as a matter of fact if you do navigation for cars for bikes or for pedestrians necessarily this is not the optimal way to use it now for a wheelchair obviously not everywhere you can you walk you can use a wheelchair not everywhere you can use a bike you can use a wheelchair you need specific navigations for wheelchairs it's obvious for that I actually use something called open street map which is also a Ruby application probably a lot of people have heard of you it's actually the target of building an open database of the whole world and great thing about this is actually that you everybody can contribute to it and you can define your own text so I can say what the surface is I'm here not so the guys who actually maintain that do not give me any regulations what I can use so there's already one project from Germany which is using that quite interestingly which is called wheel map so wheel map is a project where now people are encouraged to map accessibility of locations so for example if I look around me here this would be quite bad accessibility because nobody was a wheelchair will get up the stairs and this is a crowdsourced and they're actually taking it in their own application and then push it back to open street maps on the other side with this information now you can actually do interesting things so there's this service called open route service and they're actually using information from open street maps information to have feet into open street map to actually calculate the pass so where I now see myself and it's actually I would like to use the platform I have to actually feed the system so I've experimented with some vibration sensors and camera systems to actually detect the surfaces I'm driving over and actually feed that back to actually increase the database so at the moment it's open route service which then looks approximately like that for wheelchairs is mainly focused on Germany and a little bit more like a Europe but it's not worldwide so we need to increase the data and base for that one and as you see you get a route calculated from A to B and on the left side you also have the material of the surface which makes big difference so obviously with a wheelchair you prefer something like asphalt or concrete and not like these cobblestones which are also quite common in Germany so again wheelchair optimised navigation is one thing I'm working on another thing is vision so if you are like me and you actually never used our C cars as a kit you might actually use the wheelchair a little bit to to agile I would say so you will at one point for sure bump into something if you're happy then you just bump into a wall if you're unlucky you actually bump into some other people and maybe move them even in the wheelchair so I have to consider protection of the wheelchair obviously so one thing I looked at is leader systems so leader systems you maybe know that these Google cars for example use them some slight emitting device which gives you a distance measurement from a central point for 360 degree so there are a lot of them available as a matter of fact I didn't find a single driver in Ruby and I thought okay that has to change so the interface actually quite simple so they usually provide a serial interface you can control the motor and then you actually get readouts over the 360 degree angle about the distances and so after working on that what I cannot do is actually I have the wheelchair and I actually can detect obstacles moving around the wheelchair so that's of course quite beneficial to your do not want to bump into something you can just lower the speed the closer you get to an object or you can stop if the object is too close the same thing is of course not only for static environments but also for moving environments so obviously if you're driving around you also would like to not collide with other objects so you need to have some kind of vision which is of course the same system just a different use case so if you can see there is actually some things you cannot really see like things which are reflective through but in the real environment it actually works quite well if you just estimate a little bit conservative and better stop than now proceed okay so with that said concerning conclusion here so I have essentially two things to conclude first is about the Ruby ecosystem so I mean Yokoyama motor has talked about now MRI how it's improving over time and Ruby and J Ruby so my personal ecosystem looks actually like that so I have this Ruby wheelchair I have implemented different things which have different kind of complexities different kind of needs the data quantity of a drive system and the complexity is very low to be honest it's very simple code and then you go further and you have a Ruby applications like real map and open street maps which have a huge amount of data because open street maps want to categorify the whole world so complexity level is different but as a matter of fact today we can do on all these levels now solve our problems with Ruby we have of course the MRI as the baseline which gives us the most correct Ruby but then we have J Ruby and M Ruby which is for me the more important one which actually does something to move Ruby into new environment so one of my conclusion would be consider Ruby maybe for new areas where you didn't use it before I actually do not see that many limits which Ruby cannot be used and the last conclusion is how to improve from here so I personally would be very happy and my whole flight and everything would be completely well paid off if just one of you after you come back home to your home country would actually just go to wheel map and maybe just take one element so just say your nice coffee or so what what kind of entrance barrier they have so that that would be already great but as a matter of fact taking the world is actually not solving a real problem it's just documenting our problems what we really have to think about is will you improve the environment for people who are not able actually to navigate so as a matter of fact that's a difficult problem and the reason why it's a difficult problem is because wheelchair users are a minority so I mean I do not want to do a finger pointing but I for myself I can talk for myself I would not have cared about real map or now wheelchairs if I would not have bind to a wheelchair so from that I conclude actually to solve this problem is actually to put everyone on a wheelchair so now you would maybe be a little bit confused so maybe hopefully nobody's offense but if then please wait a moment and let me explain so obviously I'm not suggesting to go around and break everybody's leg obviously that would not scale for me what I suggest what I suggest is that we change the concept of a wheelchair so at the moment everybody most people consider it a hassle so it is uncomfortable to use a wheelchair why can we not think about a wheelchair as something which actually improves our life for example in these days at my work I'm actually from now to time use a wheelchair to sit at my desk and I'm driving then maybe to the lap or to the fridge with my wheelchair and I can do that more comfortable because I don't have to move and I can make it faster and I'm actually good on track that I can actually even automate that so in the future I do not even have to think about how to come from A to B so pushing our way forward that actually people who can walk decide to use a wheelchair instead might actually solve the problem we have of the missing infrastructure because if everybody needs to use a wheelchair then they will also push for improving that it can be used proper and with that said thank you very much cool so do we have any questions for Daniel we have a question very curious person are you doing motorcycle races or something because how did you break your leg twice it's maybe I should probably not admit that but I have these anger faces and if someone is someone shorties XKCD so if someone is wrong on the internet I do sometimes stupid things like for example hit the wall that's not a smart enough kicking walls yeah I didn't I didn't target for the wall but it was just stand-away yes I'm feeling a little bit embarrassed about it though but I didn't make any impressive yeah all right any more questions so I've got two the first one is you're the joystick did you have a second port for PVP as well so the other people could you can now two people could control at the same time but the inputs would be conflicting so the result would not be what you want so that I apologize that was the facetious question the the second one is in terms of like expense and difficulty how hard was this for you to put together overall okay expensiveness and this is actually one part so I do not mention that so one thing is actually also does whole wheelchair industry needs some kind of disruption because with the things I have just bought one off I can actually build a wheelchair form half the price what a usual electrical wheelchairs built these days I'm wondering if it's something like a monopoly thing I actually I do not really understand why they are so expensive but with all these features I have here I still end up cheaper than electrical wheelchairs which is maybe something like 900 1000 R&B which translates to maybe 100 120 140 US dollar something like that roughly yeah yeah patents and regulatory capture thank you okay anyone else yeah you mentioned that in the open stream there's a log about the material of the ground and did you were you managing to like use some kind of detection to detect like the material also I didn't understand the question so yes there is and so you can define whatever you want in open street maps is essentially a wiki for maps but I didn't understand the question did you did you actually made it so you can record what's the ground underneath yeah okay I understand the question okay yes so I added a GPS and a system to attract a location and I could mark specific spots as for example creating one example a high vibration a low vibration but that actually is not sufficient so that's the reason why I said that I have to combine it with a camera system because vibration you can have not only because the surface is horrible but because maybe there's some other stuff on the ground which maybe are temporary so my work on that but it's actually a hard problem so I would like to do that and obviously if in the future everyone would be on a wheelchair and everybody would collect this data that would be obvious to do but at the moment it's it's something to play but obviously there's not much value if only my own wheelchair is creating this data thanks okay any other question oh hey so you use this gamepad to control to control the wheelchair and I'm wondering how did it work in the crowds on the video that you show it I saw that it wasn't the video and I still use the other one actually that the steering you saw in the video the problem is actually the automaton so actually the wheelchair is not stable for both wheels for both wheels and so one wheel how do you call an English vibrates a little bit so it's flickering so even if you drive straight it will diverge to one direction so that's a problem I want to surface the automaton which actually counts the real rotation okay so there was no problem with responsiveness and even like I don't know if you were in the crowd you could actually use yeah control the wheelchair with your yes with your gamepad without being worried that it will accidentally bump into someone I was wondering you should probably be worried but you should probably be worried but I have somehow maybe a deficit on worrying about things but I mean again I'm living in Beijing so I do not drive that through a tier men's crew also because they will shoot me down immediately or I will drive it to wash our so not a certain and of course I do not chase my son I just want to say that so that nobody is importing between government okay I think you can take one more question if there is any no okay now you've managed to remove some out remote control your wheelchair when when he's autonomous wheelchair coming up so I don't miss wheelchair when it will come up no autonomous so okay good so again that that's on the plan so it's a leader system now I actually can create a proper slam system so the system we're actually map an area and then can locate myself from the surroundings and then navigate myself inside of that so what we are doing actually at work for playing is to map our floor like that so that I can at least navigate from point to point but that's very often very simple so it's nothing to do with these fancy machine learning stuff so now just a simple now pass and routing and then following so but but that's that's coming all right I think that's all thank you very much Daniel okay