 Hello, welcome to EMS Stage C. Our next speaker is Mohamed Sayad, who's going to talk about how to make a humanoid with a 3D printer, a wheelchair and ROS. Okay. Over to Mohamed. Thank you all for coming. All right. Thank you all for coming. So today I'm going to talk about my experience building this and what I learned from building it. I didn't design this robot. The design files are on the internet, but most of what I'm going to be talking about today is just what I learned building it. The talk will be split into mainly two parts. The first part I'm going to talk about the software that I'm planning on using or currently am trying to use. It's called Robot Operating System or ROS for short. And I'm just going to quickly introduce what does it do and why I'm using it. ROS is essentially a collection of software, pieces like libraries and APIs that are intended to facilitate how you use hardware to make robotic systems, to build robots. And it is designed or maintained and developed by a large community, mostly academics, but also people who are hobbyists and people from companies. It essentially, if you think of a robot as a set of sensors and a set of activators, it essentially connects these two. So you have drivers pulling out information from the sensors, like cameras or a connector or a laser sensor. And you have drivers operating the activators, which is like the motors of the robots. And you have the middle running on the computer, as well as the AI or whatever software you're writing to get the robot to do something useful. Now, unfortunately, this robot right now is not going to do anything useful. Part of it, we couldn't carry everything here. And the other part, it is still a work in progress, pretty much a lifetime work in progress. ROS runs on pretty much any robot. So it is designed to be as generic as possible. It is designed to work on any kind of robot, from humanoids to arm robots to cars to drones. It does that by abstracting everything and making all the parts of the robot very modular. So if you want to, say, move a robot around, you command the robot to move in three dimensions, so move forward or sideways. And then you have to write your own software to understand that command and actually move your own robot. So you normally have on your computer cross itself running, and so many different smaller packages or code nodes will be operating the different parts of your robot. So you'd have a node that is operating the cameras, picking up the information from it, picking up the image, and you have another node that is processing the image to output whatever features you're looking for. And you'd have another node that is maybe commanding your arm to reach out for something that you found in the image. And all these nodes talk together using messages. That's how what is called in ROS is essentially just like the data stream, each node sending out the data after it's processed. And whoever is listening for that data, either node can listen to that data and take action based on it. This can also happen on different computers. So, well, I'm going to refer to a workshop I'm planning to run tomorrow. You can run the system on a robot and then you can control it from your laptop to do more advanced things that maybe the computer on your laptop cannot do. So for example, in that workshop tomorrow, anyone who's going to be using the robots, the robots themselves have a very simple computer. They have a Raspberry Pi. So in order to do more advanced things, you could do it on your laptop or any different any set of computers around. And you run ROS on a on top of a computer. It's called robot operating system, but it's not really an operating system in itself. So you run it on top of another operating system, which most ideally is Ubuntu. And as I said, you can run it on any different kinds of computer robots. And these are the robots that are designed by the people who may draw. But you can, as I will speak now, you can run it on even any robot that you design yourself. So this brings me to Kermit, as we call it. It is designed based on InMove robot, which is a 3D printable, full size humanoid robot designed by Gail Langvin. I'm not sure I pronounced his name correctly. You can download the files for this robot from his website and you can follow the instructions there to print a full size humanoid robot. I, by the way, just a disclaimer here. A lot of the photos here, I actually just pulled it up from his website straight away. So the original design does not use Ross. It uses something called my robot lab, which is not, it is designed by a group of, I believe they're not academics, they are hobbyists or amateurs. By amateurs, I mean like they do it because they like to design the software, which is a very good thing. But I prefer to use Ross because that's the operating, that's the software that I'm more familiar with. And that's from my background as an academic. I have used it more often. So I had to modify the original design to make it work with Ross. And this is what I will be mostly talking about today. So as it stands right now, it's the top half of the humanoid robot. In our case, it is sitting on a mobile base. We couldn't bring the mobile base to the camp, unfortunately. It was quite heavy to bring. But as you can see there, the mobile base is simply the lower half of an electric wheelchair. And yeah, it, I will speak about printing it the same way I, making it the same way it was, the files were published. So the very first part of the file, files that were published back in, I think, 2011, were the parts for the hands. Now for my design, I followed the instructions pretty much the same. You will print the different parts for each finger as separate pieces and glue them together. Then you, after assembling the hand, you need to run some wires or tendons through the fingers to the forearm to operate the fingers to open and close the hand. The first problem I came across when I did that is that the tendons would, let's say, scratch against the corners of the different parts of the hand and they will get ripped apart. Sadly, I don't have a photo to explain that. But the solution for that I found is that you can run the tendon inside a tube. So there are flexible tubes that you can buy that are very commonly now used for 3D printers. And you can run it inside, it's more known as bolding tubes if you're familiar with 3D printers. And you can run the tendons inside the tube and you can get thinner tubes for that. So the tube that I found to work best is the 1mm diameter tube which can run to the forearm and you can run your tendon inside that tube to avoid all the scratches. Now in the forearm, in the original design, Gale used 5 servo motors to operate the hand. I did at some point, right now the motors are not there but at some point the motors were there. The problem with the original design is that you will have many cables that need to run up the arms and back to the controllers that normally sit on the back of the robot. The simple solution that I found is to put a small arduino inside the forearm which will control the hand independent from the rest of the robot and then you can command that arduino just for the hand to open and close or for the different finger movements. Additionally, that allowed me to add more motors to control the different joints of the finger separately. So the human hand can control different joints so you can close your distal joints without closing your your proximal joints or you can close proximal joints without closing the distal joints. If you're only using one motor bare finger like the original design you wouldn't be able to do that but then if you have an arduino in the forearm you will need probably to use smaller motors in that case but you will be able to use more motors because you wouldn't have to run all these wires up to the arduino that originally was controlling the whole robot. The other thing is because I'm using ROS and because it is developed to be a very professional system it requires feedback. Feedback is it requires to know the position of the joints at any time so in the original design you would only send a pulse width modulation signal to the servo motors for them to move to a certain position you don't have a feedback to the controller to tell it that the motors actually moved and because it's just pulling a tendon you don't actually have any feedback from the joints that the joints actually moved it could you could have maybe the tendon stretched a bit or even broke so you wouldn't have any feedback from that. So the solution I found I tried first to modify the joints so that I can put putentiometers inside the joints I couldn't find the putentiometers small enough again I don't have photos for that but the solution I found is to put flexi sensors on the back of the hand now they are simple long stripes of plastic which has a conductive material in the middle of it and as you've been that the resistance of these sensors the resistance of the material changes you can easily find them on all the websites that sells arduino stuff and you only need to fix those to the back of the fingers and then you can connect those to the same arduino that is controlling the motors in the forearm and you can send that back to the computer to tell it how to how how the hands look like at the minute so that gives its feedback. You could also put something called FSR for sensitive resistors again it's also similar to flexi sensors but it's changed resistance by pressure and I've tried to use it for a while on the fingertips to detect if the fingertips are actually holding something. I'm afraid I'm not putting any code here to show actually how to do this I will be sharing the code online if you want or you can come and find me in the in the Facebook village behind the stage here I can explain if you need any advice on how to do the coding. So for the forearm sorry for the whole arm and the original designs were using again servo motors this was using bigger servo motors and each servo motor will have the wire running all the way to the back of the robot where the arduino controlling the whole robot sets. Now the modification I made here is because I did not want to have all these wires running back because that adds problems as the robot moves its parts it might damage the wires or disconnect the wires. I used a digital servo not sure it's very visible on the screen it is it's from a kit called Robo Builder. I made a holder for that servo motor to fit to to fix in the same place where the one over four scale servos that were originally used sits and the benefit of these motors is that they are addressable and they can be cascaded so if you can see in the photo there is for each motor there is one wire going in or one set of wires four wires a cable four wires going in and then there is also a cable four wires coming out of the motor and it is actually at the top you will see that the cable going up and going back down is just out of the photo but it's actually going from one motor to the other and all the motors are addressable and they can control be controlled by a serial connection so it just send out to each ID to ID the motor and what motion it should do so that gives you control the speed of the movement and the accurate positioning of the motor and the only problem with this approach compared to the original approach is that in if you look at the original instructions the sensor was removed from inside the motor and placed directly at the joints because there is a gearbox between the motor and the actual joint the position of the motor does not tell you what the position of the joint is but Ross needs to know the position of the joint the solution for that I have not implemented yet it's on I've ordered some parts but I haven't got them yet which is you can use separate encoders and I would recommend using magnetic encoders because then they don't add any they don't add any force on the on the joints but most ideally most they are more forgiving in the positioning so you could fix a magnetic encoder on the joints straight and you can get the feedback for the actual position of the joints another thing I modified in the arms is that I added some metal reinforcement so you'll see a rod going down the forearm now the forearm is originally printed in about 12 parts that are glued together and it's rather thin so if you put if you're trying to lift something heavy it could break in fact if you want to come and see the robot later it's actually did break quite a few times and I had to glue several times I added a metal rod running down the front arm that connects it from the bit where it connects at the elbow all the way to the wrist so I unfortunately this is not a modification to the file itself it was a very manual modification so I cannot really share the files for that modification but if you want to come and look at it closer you're more than welcome to do that after this modification the arm was able to lift relatively heavier objects and it didn't break once since then it did not break because of lifting something but it still ended up breaking because of people walking on it into it or it falling over or something I didn't make any modifications to the head except that I fixed a bit of speakers inside the head so the head prints you can print the head in I don't remember the count of the parts but several parts again that you glue together and you can put cameras in the eyes the original design put two separate cameras in the eyes which can be activated by servo motors so that they can move and give a more realistic look but it is I put a fixed stereo camera which originally comes with two cameras spaced at the average distance between the human eyes which is roughly 6 centimeter I would not do that again though because there were some problems with that stereo camera coming on one USB cable is that the amount of data coming from both cameras would cause connection problems so the only solution to that is to actually reduce the resolution coming from the two cameras which then cannot really provide enough data to do any processing on stereo images so I would if I am to rebuild this I will stick with a two-camera solution I added two speakers in the mouse but then there is some derivative designs online as well that use speakers in the mouse now the mouse is activated so it can open and close with a servo motor and the whole head is activated it can turn sideways and go up and down in in the newer designs I had already printed this long time ago but the current designs also have the head being able to tilt sideways so if you print a newer design you will have extra two motors that are at the sides of the head that is tilting the head sideways the chest of the robot because it's originally designed to be 3d printed the chest is made into so many different small pieces that you can 3d print and join together the joints are not very robust I found that out when the robot fell in the same joints which are used in the shoulder all broke so I ended up having to reinforce all the joints in the shoulder but for the chest from the start I did not 3d print them because there are so many and they would take long time to print I would recommend just laser cutting them I did find a few files online I didn't share my files when I modified it there was no files online but by the time I have modified the files there were some other people who did the same and shared their files and I realized that my files had so many so many mistakes that I had to fix by hand later so I didn't want to share them however if anyone wants those files with the mistakes in them let me know I can give them to you so as I said laser cut all the flat parts now if I am to rebuild the robot again there are flat parts in the arms that I will also laser cut rather than 3d print so ideally any flat part you could just laser cut quickly I laser cut mine from a combination of MDF and acrylic so it should be a 10 millimeter thick part so I cut it from 6 millimeter MDF and 4 millimeter acrylic only because that's what I had I'm not saying that this is the best way to do it ideally maybe you should just cut it from one sheet of material if you have the laser cut powerful enough to cut through 10 millimeter now for the robot to move the idea or the hope I guess is that to make it work to make legs for it now currently as original design just have static legs and it's unlikely that the robot will be able to walk on it unsupported using those legs because the robot is heavy and walking is really complicated I mean from from robotics perspective so if 3d print if someone 3d printed the legs to go on a robot that was not designed to walk from the start it's unlikely that it will ever work now currently what the original design what Gail use is something similar to that where she has the robot fixed on wheels to move and instead of making these wheels someone from Facebook do donated a wheels chair for the robot and we remove the chair itself and we've put the robot on top of the chair now that the wheelchairs are designed to be controlled by a controller in the arm in the arm of the chair not by a computer so in order to control it by a computer first of all I had to add encoders to give feedback to the controller to tell it how fast is the motors moving so in a wheelchair in at least in this design it has two motors on either side controlling two wheels which is called differential drive so depending on the speed of either the difference between the speeds of either motor the robot will turn so the encoders feedback to the controller which is an arduino fit inside the space between the battery and the front of the wheelchair it feeds back the speed and I just bought and both with modulation driver that takes a PWM signal from Arduino and drives the motors so I'll go back to so that's basically it about the building so how to operate this with Ross now for the robot to move around I'll go back to Ross now you can use the sensors on the robot which is in this case a connect in its chest I'm using something other than connect I'm using a Zion is a Zion which is because it has a USB connector but the robot originally was designed to use a connect either of them produces a information called in it produces a 3d scenery in a point cloud representation so it basically tells Ross whatever is in front it in 3d Ross can then use that to create a map of the area that it's seeing and it's also can identify where it is on the map and then you can navigate through them that map it does that by planning a path through this is a bit of an exaggeration because this robot would never go on a trip around them like outside Facebook pretty much it's unattended but it does that by fine planning it up to source of passes one from the first point to the end through waypoints and then starts planning between the waypoints how to get to each waypoint without hitting anything this is pretty much the same as what autonomous cars or self-driving cars would do so it works in a similar way it scans all the area around it and it plans a path around it so essentially the first thing we'd be using Ross for is for Kermit is to move the base around the same way as you would move a car but also Ross can be used for as I said every anything else related to robots so the next thing once I get the navigation working fine the next thing up will be to get Ross to move the arm which what essentially does is that it calculates what positions that each joint needs to be at in order for the hand at the end of the arm to reach its final destination as these calculations are called solving the kinematics of the arm which is some mathematical term for solving the positions of all the joints in order for the end part of the arm or the end effect or the hand to reach the position you want to so yeah that's basically it as I said it's a work in progress right now we keep working on it me and everyone else in Facebook so if you want to know more about this robot or you can come and speak to us in the Facebook village and you can follow Facebook on Twitter we'll be posting about updates as we progress in the build and if you're around Birmingham you're welcome to visit us at Facebook and we can discuss how we're working on that thank you does anyone have any questions okay well if you want to chat about it as I said we're at Facebook village behind them thank you