{"id":2056,"date":"2018-11-07T16:32:44","date_gmt":"2018-11-07T15:32:44","guid":{"rendered":"https:\/\/blogs.mathworks.com\/student-lounge\/?p=2056"},"modified":"2018-12-19T15:16:45","modified_gmt":"2018-12-19T14:16:45","slug":"flying-drones-using-simulink","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/student-lounge\/2018\/11\/07\/flying-drones-using-simulink\/","title":{"rendered":"Flying Drones Using Simulink"},"content":{"rendered":"<p>Today\u2019s guest post is by <a href=\"https:\/\/www.linkedin.com\/in\/mordekarmaitreyee\/\">Maitreyee Mordekar<\/a>. Maitreyee is in charge of the MathWorks student drone competitions. She&#8217;ll be sharing first hand experience from an event where students were progamming the Parrot Mambo Minidrone using Simulink.<\/p>\n<p>&#8212;<\/p>\n<p>You like using Simulink? &#8211; \u00a0or need an opportunity to learn the software better? You love working with hardware such as the <a href=\"https:\/\/www.parrot.com\/global\/drones\/parrot-mambo-fpv\">Parrot Mambo Minidrone<\/a>?\u00a0Then this is a post you should not miss reading.<\/p>\n<h1>Simulink and the Minidrones<\/h1>\n<p>Simulink has a readily available environment to program a Parrot Mambo Minidrone. What\u2019s cool is the workflow:<\/p>\n<ul>\n<li>you can design your algorithms,<\/li>\n<li>check the behavior in the virtual environment in Simulink 3D, and<\/li>\n<li>deploy the logic on the hardware.<\/li>\n<\/ul>\n<p>Following these steps ensures that the algorithm performs exactly how you would expect. In other words, you can be certain that the drone is not going to crash on you.<\/p>\n<p><a href=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2018\/11\/intro_drone_2.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-2284 size-full\" src=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2018\/11\/intro_drone_2.jpg\" alt=\"\" width=\"578\" height=\"578\" \/><\/a><\/p>\n<p>You can program the Minidrone using the <a href=\"https:\/\/www.mathworks.com\/hardware-support\/parrot-minidrones.html\">Simulink\u00ae Support Package for Parrot\u00ae Minidrones<\/a>. You \u00a0can access onboard sensors\u2014such as the ultra sonic, accelerometer, gyroscope, and air pressure sensors\u2014as well as the downward facing camera. Thus, you can design your algorithm, simulate your model and deploy the same on the hardware without writing any other line of code.<\/p>\n<p><span class=\"TextRun SCXW34762297\" lang=\"EN-US\" xml:lang=\"EN-US\"><span class=\"NormalTextRun CommentStart SCXW34762297\">You can build anything\u00a0<\/span><\/span><span class=\"TextRun SCXW34762297\" lang=\"EN-US\" xml:lang=\"EN-US\"><span class=\"NormalTextRun SCXW34762297\">from making the drone<\/span><\/span><span class=\"TextRun SCXW34762297\" lang=\"EN-US\" xml:lang=\"EN-US\"><span class=\"NormalTextRun SCXW34762297\">\u00a0autonomously<\/span><\/span><span class=\"TextRun SCXW34762297\" lang=\"EN-US\" xml:lang=\"EN-US\"><span class=\"NormalTextRun SCXW34762297\">\u00a0follow certain waypoints to entirely changing the controller.\u00a0<\/span><\/span><span class=\"TextRun SCXW34762297\" lang=\"EN-US\" xml:lang=\"EN-US\"><span class=\"NormalTextRun SCXW34762297\">\u00a0The following video shows a demo<\/span><\/span><span class=\"TextRun SCXW34762297\" lang=\"EN-US\" xml:lang=\"EN-US\"><span class=\"NormalTextRun SCXW34762297\">nstration<\/span><\/span><span class=\"TextRun SCXW34762297\" lang=\"EN-US\" xml:lang=\"EN-US\"><span class=\"NormalTextRun SCXW34762297\">\u00a0where the drone traverses<\/span><\/span><span class=\"TextRun SCXW34762297\" lang=\"EN-US\" xml:lang=\"EN-US\"><span class=\"NormalTextRun SCXW34762297\">\u00a0through<\/span><\/span><span class=\"TextRun SCXW34762297\" lang=\"EN-US\" xml:lang=\"EN-US\"><span class=\"NormalTextRun SCXW34762297\">\u00a0four specified points<\/span><\/span><span class=\"TextRun SCXW34762297\" lang=\"EN-US\" xml:lang=\"EN-US\"><span class=\"NormalTextRun SCXW34762297\">\u00a0autonomously.<\/span><\/span><\/p>\n<p><div style=\"width: 1920px;\" class=\"wp-video\"><!--[if lt IE 9]><script>document.createElement('video');<\/script><![endif]-->\n<video class=\"wp-video-shortcode\" id=\"video-2056-1\" width=\"1920\" height=\"1080\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2018\/11\/SquarePathVideo.mp4?_=1\" \/><a href=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2018\/11\/SquarePathVideo.mp4\">https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2018\/11\/SquarePathVideo.mp4<\/a><\/video><\/div><\/p>\n<p>Also, this <a href=\"https:\/\/www.mathworks.com\/videos\/programming-drones-with-simulink-1513024653640.html\">webinar<\/a> will help you to quickly get started with it.<\/p>\n<p><div class=\"row\"><div class=\"col-xs-12 containing-block\"><div class=\"bc-outer-container add_margin_20\"><videoplayer><div class=\"video-js-container\"><video data-video-id=\"5712910739001\" data-video-category=\"blog\" data-autostart=\"false\" data-account=\"62009828001\" data-omniture-account=\"mathwgbl\" data-player=\"rJ9XCz2Sx\" data-embed=\"default\" id=\"mathworks-brightcove-player\" class=\"video-js\" controls><\/video><script src=\"\/\/players.brightcove.net\/62009828001\/rJ9XCz2Sx_default\/index.min.js\"><\/script><script>if (typeof(playerLoaded) === 'undefined') {var playerLoaded = false;}(function isVideojsDefined() {if (typeof(videojs) !== 'undefined') {videojs(\"mathworks-brightcove-player\").on('loadedmetadata', function() {playerLoaded = true;});} else {setTimeout(isVideojsDefined, 10);}})();<\/script><\/div><\/videoplayer><\/div><\/div><\/div><\/p>\n<h1>Droning Away at IROS Conference<\/h1>\n<p>Saying this, MathWorks is hosting its very own student competition based on the Parrot Mambo Hardware. We had our first pilot of the Competition hosted at IROS 2018 held in Madrid on 3<sup>rd<\/sup> and 4<sup>th<\/sup> October 2018. The participating teams were working on an autonomous line follower algorithm using the Minidrone.\u00a0 Sounds easy but not until you know that you get the hardware only on the day of the competition.<\/p>\n<p><a href=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2018\/11\/drone_cage.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-2060 size-full\" src=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2018\/11\/drone_cage-e1541171038349.jpg\" alt=\"\" width=\"600\" height=\"291\" \/><\/a><\/p>\n<p>The teams received their hardware on the same day and started working with it right away. Calibrating, simulating, flying! The teams were fully engrossed until they got the drones to fly.\u00a0<span class=\"TextRun SCXW131327770\" lang=\"EN-US\" xml:lang=\"EN-US\"><span class=\"NormalTextRun CommentStart SCXW131327770\">Certainly, working with hardware is tough, but the satisfaction\u00a0<\/span><\/span><span class=\"TextRun SCXW131327770\" lang=\"EN-US\" xml:lang=\"EN-US\"><span class=\"NormalTextRun SCXW131327770\">when<\/span><\/span><span class=\"TextRun SCXW131327770\" lang=\"EN-US\" xml:lang=\"EN-US\"><span class=\"NormalTextRun SCXW131327770\">\u00a0seeing\u00a0<\/span><\/span><span class=\"TextRun SCXW131327770\" lang=\"EN-US\" xml:lang=\"EN-US\"><span class=\"NormalTextRun SCXW131327770\">the<\/span><\/span><span class=\"TextRun SCXW131327770\" lang=\"EN-US\" xml:lang=\"EN-US\"><span class=\"NormalTextRun SCXW131327770\">\u00a0algorithm work is incomparable.\u00a0<\/span><\/span><span class=\"TextRun SCXW131327770\" lang=\"EN-US\" xml:lang=\"EN-US\"><span class=\"NormalTextRun SCXW131327770\">This video\u00a0<\/span><\/span><span class=\"TextRun SCXW131327770\" lang=\"EN-US\" xml:lang=\"EN-US\"><span class=\"NormalTextRun SCXW131327770\">is<\/span><\/span><span class=\"TextRun SCXW131327770\" lang=\"EN-US\" xml:lang=\"EN-US\"><span class=\"NormalTextRun SCXW131327770\">\u00a0the winning entry by team UNL-IIITD<\/span><\/span><span class=\"TextRun SCXW131327770\" lang=\"EN-US\" xml:lang=\"EN-US\"><span class=\"NormalTextRun SCXW131327770\">.<\/span><\/span><span class=\"EOP SCXW131327770\" data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><div style=\"width: 448px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-2056-2\" width=\"448\" height=\"390\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2018\/11\/drone_video.mp4?_=2\" \/><a href=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2018\/11\/drone_video.mp4\">https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2018\/11\/drone_video.mp4<\/a><\/video><\/div><\/p>\n<p>Here\u2019s a quote from one of the winning teams: \u00a0\u201cCoolest competition ever participated and a perfect platform to show the abilities of using Simulink. Thank you MathWorks !\u201d<\/p>\n<h1>What\u2019s next?<\/h1>\n<p>Go ahead and get started. The <a href=\"https:\/\/www.mathworks.com\/hardware-support\/parrot-minidrones.html\">documentation<\/a> contains all the details of how you can start working with the hardware. The\u00a0<a href=\"https:\/\/in.mathworks.com\/matlabcentral\/answers\/?term=parrot\">MATLAB Answers<\/a> forum has a list of frequently observed issues and steps to troubleshoot them.<\/p>\n<p>We will have this competition at a few more places in the coming year. Feel free to reply in the comments section if you would be interested in participating in this competition.<\/p>\n<p>By the way, did you all know that we\u00a0 have a <a href=\"https:\/\/www.mathworks.com\/academia\/student-challenge\/simulink-student-challenge-2018.html\">Simulink Student Challenge<\/a>\u00a0 where you can win 1000 USD by sharing a video of any cool projects that you have implemented using Simulink?<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"thumbnail thumbnail_asset asset_overlay video\"><a href=\"https:\/\/blogs.mathworks.com\/student-lounge\/2018\/11\/07\/flying-drones-using-simulink\/?dir=autoplay\"><img decoding=\"async\" src=\"https:\/\/cf-images.us-east-1.prod.boltdns.net\/v1\/static\/62009828001\/0ed08d6b-df6e-4f95-8ec1-e416ade7b66e\/79f33675-d3d0-44e2-9481-4ad8263acf93\/1280x720\/match\/image.jpg\" onError=\"this.style.display ='none';\"\/><\/p>\n<div class=\"overlay_container\">\n      <span class=\"icon-video icon_color_null\"><time class=\"video_length\">33:49<\/time><\/span>\n      <\/div>\n<p>      <\/a><\/div>\n<p>Today\u2019s guest post is by Maitreyee Mordekar. Maitreyee is in charge of the MathWorks student drone competitions. She&#8217;ll be sharing first hand experience from an event where students were&#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/student-lounge\/2018\/11\/07\/flying-drones-using-simulink\/\">read more >><\/a><\/p>\n","protected":false},"author":151,"featured_media":2284,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[145,14,8,10,13,12],"tags":[218,222,220],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/posts\/2056"}],"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=2056"}],"version-history":[{"count":14,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/posts\/2056\/revisions"}],"predecessor-version":[{"id":2425,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/posts\/2056\/revisions\/2425"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/media\/2284"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/media?parent=2056"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/categories?post=2056"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/tags?post=2056"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}