openDog V3: How I made it Walk

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
this is the next video about building open dog version 3. i'm going to talk about how i got it walking and various other changes and tweaks that i've made all the current cad and code for this project is now getting published but i'll also be talking about the future of the project and what improvements i hope to make in future videos as you can see it walks around fairly well this is mostly walking in the same way that open dog version 2 works however i now have higher torque joints using 10 to 1 cycloidal drives instead of 5 to 1 belt reductions i left the project with the mechanics built the electronics fitted and the dog standing the first thing i did to get this moving was sorting out the inverse kinematics i've covered this quite a few times in other projects including open dog version two the simplest explanation is in my inverse kinematic driven robot arm project but i'm going to quickly cover what i did to work through the maths there are more advanced ways to calculate inverse kinematics but i like to do things the easiest way possible to understand and explain for that reason i use high school trigonometry and divide everything up into triangles stage by stage the first stage is calculating the leg length this is just one triangle where we want to be able to set the leg length we already know the other two sides of the triangle and we need to calculate the hip and knee angle both the upper and lower leg lengths are the same so this is pretty easy using pythagorean theorem and some basic trigonometry i still check these calculations on mathisfun.com though there is some small error in this since the feet aren't pointed so they will touch the ground in a different place depending on the angle but i haven't done anything to fix this having written that in code which you can check out yourself the dog can now go up and down with its feet moving in a straight line the next stage calculates what happens when the foot moves back and forward this is an even easier right angle triangle so that only involves one piece of trigonometry to work out the angle and another piece of trig to work out the new leg length this leg length gets passed to the previous calculation which already takes care of driving the knee and hip joints so now i can drive the leg into axes in straight lines after that we need to deal with the third and final translation axis which is moving side to side this is very similar to the front to back translation axis other than in this version of the dog we have an extra offset and another triangle to calculate in open dog version 2 the foot was directly below the joint pivot point which also had some other advantages we'll discuss later in any case we can work through the triangles setting the height we want from the ground working out the virtual leg length and then solving the second triangle to work out the real leg length all of this gets passed to the previous stages so all of the axes mix together and now we can move the foot around in all three translation axes there are still three axes of rotation though pitch roll and your your is required for turning on the spot but the other three axes are not really required they're nice to look at though so i've implemented them in all of my robot dogs calculating the rotational axis involves solving the foot positions based on the body angle for both pitch and roll to start with i just divided everything into triangles again and passed the values of where i want the feet to be to the three translation axis we already worked through which takes care of moving them to the right position so now i can pitch and roll the robot as well as mix pitch and roll with the other translation axes your also works i just worked out how the feet would move in a rotation around the central points and pass the result to the x and y coordinates of the three translation axes all of this is written in one function which runs four times per cycle one's for each leg since the left and right and front and back legs and mirrors of each other there are various points at which the calculations get reversed but avoiding divide by zero errors and trying not to break the mass with negative numbers in the wrong point although we can now position the feet in x y z cartesian coordinates when i do this manually i'm essentially scrolling through all the waypoints between start and end positions as i move the control sticks this makes the feet follow a nice smooth path but when i want to plan a series of motions to make up a walking gate we need to automatically interpolate between waypoints otherwise the joints will move at full speed to achieve the position of the foot which would result in some of the joints getting there sooner than others because they have a smaller angle to rotate to based on the result of the inverse kinematics to do this i'm using the arduino ramp library which will interpolate between two positions over a specified time and fill in the waypoints between the start and end position this results in nice straight lines being drawn by the feet as they move from position to position i also used another couple of trig functions to calculate the step length in all directions based on the three input axes and varied the interpolation so it has longer to take the step when the step is longer you may remember that when i first powered the robot up it was quite springy this is just because the joints are back drivable and the o-drive motor drivers are trying to hold the motor position this is one of the main reasons that open dog version 2 and version 3 work at all and for now we need to get those motor parameters just right i've turned up the o drive position gain value slightly differently for each of the knee shoulder and hip joints so that the legs absorb impact as best they can like a virtual damped spring along with getting the gate timing just right this results in a fairly dynamic robot under most conditions the steps are currently quite short and fast so the whole thing hangs together just right if i overdo the moves though and try and move the feet too far then we break the coefficient of the system and we can see that some non-ideal things start to happen mostly because the capabilities of the virtual spring absorbing force in the legs no longer matches the forces exerted on it since the motor driver parameters are constant the dynamics of the robot are something that i'll be working on in future videos in this series but before we carry on with that it's time for a quick ad from the video sponsor which is mel science mel science is a subscription service that offers monthly science boxes which combine hands-on experiments with vr and ar technologies to engage kids in studying science male science are breaking the stereotype that science is boring difficult and only for certain types of people the aim is to make serious science accessible interesting and cool scientists about exploration experiments discovery and asking questions all of which comes naturally to children mel science boxes help nurture children's natural interest in science by giving them fun hands-on experiments to engage them and serious detailed explanations to learn as well as vr and ar technologies to dive deeper the kits are presented well and are really good quality i really enjoyed some of the optical experiments which cover lenses and polarized lights check out the link in the video description and use promo code james 50 for 50 off your first box of the mel kids chemistry and physics subscriptions i did quite a bit of testing in the past with some test legs and robots specifically to work on solving this issue this involved a hacky dynamic force controlled system which looked at where the joints should be where they actually are and use the difference as a force reading i then drove the joints to a varying position toward the direction the force was being exerted to absorb the load this happened dynamically based on inertial measurement unit data with an imu in the robot's body which helped to level out the robot making legs on one side softer than the other as it tipped over in my minidog version 2 series i used imu data to alter the translation axis of the robot so the feet moved in the direction the robot was tilting this helps it balance on two legs as it walked and resulted in it being able to walk more slowly i also did something like this with robot x although it had non-back drivable joints i used imu data to make it absorb force as it tipped dynamically altering motor positions to move and bend in the direction of the force just like a human trying not to be pushed over this was then mixed into a static gate which was probably the only reason it worked at all one issue i do have with open dog version 3 is the large offset between the hip angle and the foot this wasn't present in open dog version 2 which meant that the force from the ground on the foot was driven straight into the joint rather than causing the hips to rotate outwards in version 3 this is quite a large leverage angle and although i've tuned up the position gain on these joints in an attempt to make them hold position better it may always cause issues with slowing down the gate because if the steps are slower force will be exerted on these joints for longer causing the robot to become more unstable this issue unfortunately is inherent in the mechanical design due to the legs needing to clear the body of the cycloidal drives open dog version 2 used belt drives which meant that the motor was displaced some distance from the joint and so clearance wasn't such an issue i also upgraded the feet you may remember they originally printed in tpu but actually that's quite slippery and the feet move quite quickly now due to the way the robot walks which made it slip on a smooth surface so i decided to have a go at making some silicone rubber feet in a 3d printed mold so i've got a mold core there which is actually going to stay inside the rubber foot when it's made so that fits just inside the middle of the mold and it's suspended a bit like an easter egg mold i'm using 25 a short hardness platinum cure silicone which is an ab mix and i also originally bought red pigment to match the aesthetics of the robot so this is just mixed by weight with equal parts of a and b which i did there in some cups and mixed them up with a mixing stick it's important that it's mixed properly and of course one of the parts could get stuck to the edge of the cup and the corner in the bottom so the best thing to do is take the whole thing and mix it into another cup scraping out what you can and mixing it again at that point i decided to pour it in the mold i don't have a vacuum chamber to suck out all the air which is what you're supposed to do with silicone molds so i'm trying to do a high thin stream there and i then shoved the insert of the foot in and swished it all around to try and get rid of any air bubbles i forgot the silicone pigment though so i decided just to mix that in the mold and then reassemble everything and screw it together so once it had cured it was actually really hard to open the mold just purely because of the suction so i ended up prying that apart with a screwdriver but the results are pretty good there's a bit of flashing that needs removing there where silicon has seeped in between the two mould halves but on the whole we've got quite good results i did that four times and now we've got four rubber feet each one with a rigid insert that stops the carbon fiber tube cutting through the rubber and these are much grippier than the tpu ones so it should stop all of the slip and problems i was seeing on smooth surfaces they didn't get much use though because i changed them for black pigmented versions for the battlefield promo and i still had quite a few issues at first where it looked like it was just slipping on ice or something really weird was happening it turned out that obviously the rigid insert is much easier to rotate on the tube even with a zip tie around the collar so ended up super gluing them on the carbon fiber tube is of course glued into the bottom of the leg as well as onto the foot so now we start with black feet with grey inserts and as i reprint the whole bottom of the leg at some point in which case we can have the red ones back i normally use the open dog one and two remotes for everything in fact now i've called it the everything remote but it's looking a bit worn out and chunky so i've made a nice new version for open dog 3. this one's got one extra additional button in addition to the menu buttons some switches as the last one had and two three axis joysticks it's all powered with a usb boost bank on the back which is 10 amp hour and can apparently power it for four days straight without turning it off inside is a teensy lc and an nrf24l01 radio chip and that as before is just sending the data set over the radio to the dog or whatever i'm controlling and if you look closely you'll see two resistors across the power line which help load up the usb boost bank so it doesn't turn off because it thinks the phone is charged i did fit leds in the front panel for this purpose but they turned out to be really low power leds that didn't draw enough power to stop it turning off i'm really happy with how this is working so far obviously we've got twice as much torque on each joint than we did on open dog 2 so it feels much more solid and much more agile so hopefully all those things i said in the video about putting dynamics in we can do in the future at the moment i'm not even reading the inertial measurement unit in the code although it's actually wide in in the electronics so that's something we can use our data from in upcoming episodes all of this is still pla and it seems to be holding up okay obviously it could be upgraded to more exotic materials but it just goes to show those cyclonal drives seem to be holding together and no parts have broken so far so that's pretty good so you can make it in pla i'm going to be publishing all the cad for this which is now on github for the whole dog the remote the foot mold and also another re-tolerance set of cycloidal drive internals because i had to make some adjustments for my 3d printer to get it to run smoothly however don't go out and rush and buy everything i am publishing a bill of materials this time but i'd highly recommend this shouldn't be your first project and also don't go and blow two thousand dollars on everything what i recommend you do first is get one o drive one motor one encoder perhaps build one cycloidal drive or maybe two maybe build one leg with two joints and check that you can configure everything get the code running of course the code will still run against one leg because the others are just mirrors anyway so that'll be the best thing to do before blowing a load of cash just to kind of get your head around how this is going to work and after that i guess you can go and build it obviously i'll be doing more episodes so if any problems occur then i'll be publishing them but for now i think it's looking pretty good so if you'd like to support me through patreon or youtube channel membership those links are in the description below and youtube channel members and patrons can get access to all the videos up to a week early including sneak peeks and pictures of what's coming up so you can be part of that discussion alright that's all for now [Music] you
Info
Channel: James Bruton
Views: 152,247
Rating: undefined out of 5
Keywords: robot dog, open source robot dog, 3dprinting a robot dog, 3d printed cycloidal drive, 3d printed robotics, how to build a robot dog, home made robot dog, cycloidal drive robot, 3d printed robot dog, how to make a robot dog, robot dog mechanical assembly, robot dog gears, robot dog gearbox
Id: eKZIJwJBjEs
Channel Id: undefined
Length: 14min 49sec (889 seconds)
Published: Tue Dec 14 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.