{"id":3338,"date":"2019-08-14T18:37:56","date_gmt":"2019-08-14T16:37:56","guid":{"rendered":"https:\/\/blogs.mathworks.com\/student-lounge\/?p=3338"},"modified":"2020-01-16T17:57:01","modified_gmt":"2020-01-16T16:57:01","slug":"quadruped-robot-for-robocon-2019","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/student-lounge\/2019\/08\/14\/quadruped-robot-for-robocon-2019\/","title":{"rendered":"Team Automatons Builds a Quadruped Robot for the ABU Robocon 2019 Task"},"content":{"rendered":"<p>For today\u2019s post, I would like to introduce you to <a href=\"\">Team Automatons\u00a0<\/a>from Pimpri Chinchwad College of Engineering, Pune. They recently scored 2<sup>nd<\/sup>\u00a0in the MathWorks Modelling Award at the <a href=\"http:\/\/ddrobocon.iitd.ac.in\/\">National DD-Robocon<\/a> 2019, New Delhi. The team will share their experience of using MATLAB and Simulink for their quadruped design. Thanks very much and the stage is yours!<\/p>\n<p>&#8212;<\/p>\n<p>Hey! We are Team Automatons from <a href=\"http:\/\/www.pccoepune.com\/\">Pimpri Chinchwad College of Engineering<\/a>, Pune. Before we start explaining the technical details of our work, let us show you what we have done.<\/p>\n<p><a href=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2019\/08\/Fig-1-e1565798186335.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-3340 size-full\" src=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2019\/08\/Fig-1-e1565799792665.jpg\" alt=\"\" width=\"450\" height=\"286\" \/><\/a><\/p>\n<p>As you can see, we have built an autonomous quadruped to compete in the <a href=\"http:\/\/aburobocon2019.mnb.mn\/en\">ABU Robocon 2019<\/a> competition that can walk on plane terrain, overcome obstacles, cross series of ropes, and climb mountains.<\/p>\n<p><a href=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2019\/08\/2019-08-14_18-00-16.gif\"><img decoding=\"async\" loading=\"lazy\" width=\"670\" height=\"500\" class=\"alignnone size-full wp-image-3342\" src=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2019\/08\/2019-08-14_18-00-16.gif\" alt=\"\" \/><\/a><\/p>\n<p>Having seen some cool operations by our quadruped, it becomes clear that it was a complex project. On top of that, we had only 5 months with a limited amount of fund.<\/p>\n<p>In general, there are various gait patterns such as trot, walk, gallop, pace, etc. One of the major challenges was to decide the type of gate cycle. So, let us see how we were able to overcome this challenge using MATLAB and Simulink.<\/p>\n<h1>Inverse Kinematics<\/h1>\n<p>To find the relation between the trajectory of the end-effectors and the joint angles of the quadruped we have two methods: Forward kinematics and inverse kinematics. Inverse kinematics includes the position of end effectors as inputs and joint angles as the output. We assumed the end effector to follow a half ellipse path and calculated the angles at the hip and knee joint using Inverse kinematic analysis. We used the following equations for the joint angles:<\/p>\n<p><a href=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2019\/08\/Fig-2.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-3344 size-medium\" src=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2019\/08\/Fig-2-300x293.jpg\" alt=\"\" width=\"300\" height=\"293\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2019\/08\/Equation.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-3346 size-full\" src=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2019\/08\/Equation-e1565799872675.jpg\" alt=\"\" width=\"399\" height=\"181\" \/><\/a><\/p>\n<p>Further, these equations were used to build the inverse kinematics model of the robot. The equations were implemented using MATLAB function blocks and some basic Simulink blocks. The output ports, \u201cKnee\u201d and \u201cHip\u201d specifies the joint angles.<\/p>\n<p><a href=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2019\/08\/Fig-3m-e1565799987547.png\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"262\" class=\"alignnone size-full wp-image-3372\" src=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2019\/08\/Fig-3m-e1565799987547.png\" alt=\"\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h1>Integration of Inverse Kinematics model and CAD assembly<\/h1>\n<p>Once the inverse kinematics models were ready, we built a CAD assembly of the quadruped in SolidWorks and then imported it into MATLAB by enabling <a href=\"https:\/\/www.mathworks.com\/help\/physmod\/smlink\/ref\/linking-and-unlinking-simmechanics-link-software-with-solidworks.html\">Simscape Multibody link SolidWorks plug-in<\/a>. After importing the model, necessary joints from <a href=\"https:\/\/www.mathworks.com\/products\/simmechanics.html\">Simscape Multibody<\/a> were added to the model. Finally, the output of the inverse kinematics model was connected to the respective motion input of the revolute joints.<\/p>\n<p><a href=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2019\/08\/Fig-4-e1565798771917.jpg\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"232\" class=\"alignnone size-full wp-image-3350\" src=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2019\/08\/Fig-4-e1565798771917.jpg\" alt=\"\" \/><\/a><\/p>\n<h1>Contact Force Implementation<\/h1>\n<p>To move the quadruped in the simulation arena, it is necessary to include the relation between the joint angles of the legs and the COG of the quadruped. Hence, the next step would have been to include the relation in the model. However, we decided to use the <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/47417-simscape-multibody-contact-forces-library\">Simulink Contact Forces<\/a> library which provided the friction between the foot and the ground to move the quadruped.<\/p>\n<p><a href=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2019\/08\/Fig-5-e1565798801248.jpg\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"367\" class=\"alignnone size-full wp-image-3352\" src=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2019\/08\/Fig-5-e1565798801248.jpg\" alt=\"\" \/><\/a><\/p>\n<p><a href=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2019\/08\/Fig-6.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-3354 size-full\" src=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2019\/08\/Fig-6-e1565800028735.png\" alt=\"\" width=\"450\" height=\"350\" \/><\/a><\/p>\n<p>There are various contact force blocks available in the library. In each one of them, the values of stiffness, damping, coefficients of static, and kinematic friction can be specified. Finally, we simulated the model for various gait patterns and found that the trot gait cycle is the most stable one.<\/p>\n<p><a href=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2019\/08\/GIF-2.gif\"><img decoding=\"async\" loading=\"lazy\" width=\"1034\" height=\"710\" class=\"alignnone size-full wp-image-3356\" src=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2019\/08\/GIF-2.gif\" alt=\"\" \/><\/a><\/p>\n<p><a href=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2019\/08\/GIF-3.gif\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"608\" class=\"alignnone size-full wp-image-3358\" src=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2019\/08\/GIF-3.gif\" alt=\"\" \/><\/a><\/p>\n<h1>Implementation on the Quadruped<\/h1>\n<p>In the actual quadruped robot, we used the potentiometer to measure angular feedback. These sensor readings provided us the values for maximum and minimum angles. Finally, to verify the simulation model, the measured angles were compared with that obtained by the potentiometer.<\/p>\n<p>The coordinates of the foot for various walking patterns such as walking, crossing a sand dune, etc. were obtained by simulating the model and the same values were used on the quadruped. The initial simulation results showed that the motion of the quadruped was not stable because of the vibration in the legs. Similar behavior was seen during actual walking of the quadruped. To overcome this problem, we moved the pivot point of the leg inside the body and the C.G was balanced. Then, the height of quadruped was reduced by almost 30 cm and the simulation results were studied. After obtaining the desired motion of the quadruped, accordingly, the design was changed.<\/p>\n<p>As stated earlier, the maximum and minimum achievable angles of the quadruped along with potentiometer readings for these positions were calculated. These values were stored in the code and were used to get the potentiometer readings at various positions by mapping the angles obtained from inverse kinematics formula against the maximum and minimum values.<\/p>\n<p><iframe loading=\"lazy\" title=\"Movement of MR2 | DD ROBOCON 2019 | PCCOE, Pune\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/Td1HyB7CnJ8?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe><\/p>\n<h1>Conclusion<\/h1>\n<p>Simulating the quadruped helped us to understand the design requirements, to find successfully implement walking, and to verify various parameters. The use of MATLAB for acquiring data from sensors helped in visualizing and analyzing it further.<\/p>\n<p>We are thankful for the various video tutorials available on <a href=\"https:\/\/www.mathworks.com\/academia\/student-competitions\/racing-lounge.html\">MATLAB and Simulink Racing Lounge<\/a> and <a href=\"https:\/\/www.mathworks.com\/academia\/student-competitions\/roboticsarena.html\">MATLAB and Simulink Robotics Arena<\/a>. Special mention to the <a href=\"https:\/\/www.mathworks.com\/videos\/modeling-and-simulation-of-walking-robots-1576560207573.html\">Walking Robot<\/a> videos which provided the step by step procedure to\u00a0 model a robot using <a href=\"https:\/\/www.mathworks.com\/products\/simmechanics.html\">Simscape Multibody<\/a>. The models available on the <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/64227-matlab-and-simulink-robotics-arena-walking-robot\">MATLAB File Exchange<\/a> helped us a lot in developing our own models.<\/p>\n<p>On a side note, if you are interested in further discussion or if you have any queries please reach out to us at <a href=\"mailto:automatons.robotics@gmail.com\">automatons.robotics@gmail.com<\/a>. You can also join our <a href=\"https:\/\/m.facebook.com\/teamautomatons\/\">Facebook<\/a> and <a href=\"https:\/\/www.instagram.com\/team_automatons\/?hl=en\">Instagram<\/a> group.<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2019\/08\/GIF-3.gif\" class=\"img-responsive attachment-post-thumbnail size-post-thumbnail wp-post-image\" alt=\"\" decoding=\"async\" loading=\"lazy\" \/><\/div>\n<p>For today\u2019s post, I would like to introduce you to Team Automatons\u00a0from Pimpri Chinchwad College of Engineering, Pune. They recently scored 2nd\u00a0in the MathWorks Modelling Award at the National&#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/student-lounge\/2019\/08\/14\/quadruped-robot-for-robocon-2019\/\">read more >><\/a><\/p>\n","protected":false},"author":151,"featured_media":3358,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[52,14,9,8,10,13],"tags":[326,328,15],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/posts\/3338"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/users\/151"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/comments?post=3338"}],"version-history":[{"count":11,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/posts\/3338\/revisions"}],"predecessor-version":[{"id":3725,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/posts\/3338\/revisions\/3725"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/media\/3358"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/media?parent=3338"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/categories?post=3338"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/tags?post=3338"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}