{"id":1584,"date":"2018-08-15T09:00:29","date_gmt":"2018-08-15T07:00:29","guid":{"rendered":"https:\/\/blogs.mathworks.com\/student-lounge\/?p=1584"},"modified":"2020-09-03T20:33:49","modified_gmt":"2020-09-03T18:33:49","slug":"robocup-athome-education-2018","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/student-lounge\/2018\/08\/15\/robocup-athome-education-2018\/","title":{"rendered":"RoboCup@Home Education: 2018 Update"},"content":{"rendered":"<p><a href=\"https:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/3069683-sebastian-castro\">Sebastian Castro<\/a> is back to talk about his top 2 professional interests: robotics and education.<\/p>\n<p>The <a href=\"http:\/\/www.robocupathomeedu.org\/home\">RoboCup@Home Education Challenge<\/a> is a robotics education experience based on, and built into, the worldwide RoboCup competition. This initiative is headed by <a href=\"https:\/\/scholar.google.co.jp\/citations?user=5taTpIEAAAAJ\">Prof. Jeffrey Tan<\/a>\u00a0from Nankai University, who has been involved in RoboCup for many years.<\/p>\n<p>This part-workshop, part-competition is targeted to get a younger, less-experienced audience a taste of what it takes to program an autonomous service robot. The goal is to get people excited and qualified to tackle the challenges in the <a href=\"http:\/\/www.robocupathome.org\/\">RoboCup@Home<\/a> major league of the competition.<\/p>\n<p>RoboCup@Home Education challenge has been around since 2015, but MathWorks first became involved in 2017. In <a title=\"https:\/\/blogs.mathworks.com\/racing-lounge\/2018\/01\/17\/robocupathome-education-workshop\/ (link no longer works)\">a previous blog post<\/a>, we wrote about our first teaching experience at the RoboCup Asia Pacific Open 2017 in Bangkok, Thailand.<\/p>\n<p>Now that 2018 is halfway through, I am happy to share how our collaboration has continued and evolved.<\/p>\n<h1>What&#8217;s New in 2018?<\/h1>\n<p>So far in 2018, there have been 3 RoboCup@Home Education challenges.<\/p>\n<ul>\n<li>Early May: RoboCup Japan Open 2018 &#8212; Ogaki, Japan<\/li>\n<li>Late May: European RoboCupJunior Championship 2018 &#8212; Montesilvano, Italy<\/li>\n<li>Mid June: RoboCup 2018 &#8212; Montreal, Canada<\/li>\n<\/ul>\n<p>The RoboCup 2018 event was the biggest of the three, and the one we personally attended this year. We had 9 teams representing 7 countries and 4 continents, which is always a fantastic experience.<\/p>\n<p>Since we&#8217;re scaling up the frequency of these workshops, we&#8217;ve made the content open-source and available on the <a href=\"http:\/\/www.robocupathomeedu.org\/learn\">RoboCup@Home Education Web site<\/a>.<\/p>\n<ul>\n<li>GitHub Repositories: [<a href=\"https:\/\/github.com\/robocupathomeedu\/rc-home-edu-learn-matlab\">MATLAB<\/a>] [<a href=\"https:\/\/github.com\/robocupathomeedu\/rc-home-edu-learn-ros\">ROS<\/a>]<\/li>\n<li><a href=\"https:\/\/docs.google.com\/presentation\/d\/e\/2PACX-1vRZv9pTdbuXMjwmHmlcK-HxlLofmGTmG0Rcy4Ina5gdbZa2VMFqIBbi-Q-5hXDV1HYq_Yq8Nl5_8hEf\/pub?start=false&amp;loop=false&amp;delayms=3000&amp;slide=id.p\">Presentation Slides<\/a><\/li>\n<\/ul>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"456\" class=\"aligncenter size-large wp-image-1679\" src=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2018\/08\/athomeedu_whole_team-1024x456.jpg\" alt=\"\" \/><\/p>\n<p style=\"text-align: center;\"><em>RoboCup@Home Education in Canada &#8212; Courtesy of Prof. Jeffrey Tan<\/em><\/p>\n<h1>ROS Supports Many Robots<\/h1>\n<p>As you see in the photo above, we use the <a href=\"https:\/\/www.turtlebot.com\/turtlebot2\/\">TurtleBot 2<\/a> as our development platform because it&#8217;s relatively easy to set up and has been around for quite some time now. This robot uses the <a href=\"http:\/\/www.ros.org\/\">Robot Operating System (ROS)<\/a>, which is a prolific software framework in RoboCup (and robotics in general).<\/p>\n<p><a href=\"https:\/\/sites.google.com\/a\/dis.uniroma1.it\/iocchi\/home\">Prof. Luca Iocchi<\/a> from Sapienza University of Rome is one of the main collaborators of RoboCup@Home and RoboCup@Home Education, and a driving force behind the Italy event this year. One of Prof. Iocchi&#8217;s projects is <a href=\"\">MARRtino<\/a> &#8212; an open-source, low-cost robotic platform that also relies on ROS.<\/p>\n<p>One of the great things about ROS is its communications framework, which lets you switch robot platforms (real or simulated) with little effort. By changing the names of the ROS topics and writing a simple MATLAB script that lets users select their robot, Prof. Tan and Prof. Iocchi were able to hold the workshop in Italy with both TurtleBot 2 and MARRtino. In the future, this material could be extended to other popular educational platforms like the <a href=\"http:\/\/www.robotis.us\/turtlebot-3\/\">TurtleBot 3 from ROBOTIS<\/a>.<\/p>\n<p>Prof. Iocchi summarized the role of MATLAB in teaching newcomers about ROS: &#8220;It is possible to provide high-level functions that hide the complexity of ROS to young students.&#8221;<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-1681 size-full\" src=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2018\/08\/athomeedu_montesilvano-e1532962899267.jpg\" alt=\"\" width=\"800\" height=\"600\" \/><\/p>\n<p style=\"text-align: center;\"><em>RoboCup@Home Education in Italy, featuring TurtleBot and MARRtino &#8212; Courtesy of Prof. Luca Iocchi<\/em><\/p>\n<h1>Not MATLAB *or* Open-Source &#8212; MATLAB *and* Open-Source!<\/h1>\n<p>As we became involved with RoboCup@Home Education, Prof. Tan was gracious enough to let us present anything on MathWorks tools so long as it was relevant to the challenge. Whatever we did not, or could not, cover would be addressed with open-source ROS packages.<\/p>\n<p>&#8230; so, how does this work? Quite well, actually!<\/p>\n<p>ROS is all about distributed functionality. ROS based solutions commonly use several programming languages, or <a href=\"http:\/\/wiki.ros.org\/Client%20Libraries\">client libraries<\/a>, to tackle different parts of a problem. Recall that MATLAB and Simulink have an interface to ROS through <a href=\"https:\/\/www.mathworks.com\/products\/robotics.html\">Robotics System Toolbox<\/a>. If you want to know more, we have a <a href=\"https:\/\/blogs.mathworks.com\/racing-lounge\/2017\/11\/08\/matlab-simulink-ros\/\">blog post about this<\/a>. So, we shouldn&#8217;t think of MATLAB and Simulink as alternatives to ROS, but rather as options for implementing and integrating ROS components.<\/p>\n<p>It is important to reiterate that it&#8217;s not &#8220;MATLAB <em><strong>or<\/strong><\/em>\u00a0open-source&#8221;, but rather &#8220;MATLAB <em><strong>and<\/strong> <\/em>open-source&#8221;, that we use to solve the challenges. That said, teams had the freedom to choose their tools and produced vastly different solutions. We have already benefited from the students&#8217; ability to find creative solutions to improve our workshop materials, and hope to continue doing this!<\/p>\n<p>Here is how MATLAB vs. open-source breaks down in our currently proposed solution.<\/p>\n<ul>\n<li><strong>MATLAB:<\/strong> System integration, decision-making, computer vision, navigation, speech parsing, manipulation algorithms<\/li>\n<li><strong>Open-source:<\/strong> Mapping, speech recognition and synthesis, low-level drivers to mobile base and manipulator<\/li>\n<\/ul>\n<p>To communicate between MATLAB and other software components, we also had several choices:<\/p>\n<ul>\n<li>Use ROS to publish\/subscribe messages between MATLAB and other ROS nodes<\/li>\n<li><a href=\"https:\/\/www.mathworks.com\/help\/matlab\/ref\/system.html\">Run system commands from MATLAB<\/a> to start\/kill external ROS nodes<\/li>\n<li><a href=\"https:\/\/www.mathworks.com\/help\/matlab\/call-python-libraries.html\">Call Python code from MATLAB<\/a> to perform speech recognition without ROS, or to integrate with existing algorithms developed in Python (which some teams had)<\/li>\n<\/ul>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-1691 size-full\" src=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2018\/08\/athomeedu_lecture-e1532962876738.jpg\" alt=\"\" width=\"800\" height=\"600\" \/><\/p>\n<p style=\"text-align: center;\"><em>Lecture at RoboCup 2018 &#8212; Courtesy of Prof. Jeffrey Tan<\/em><\/p>\n<h1>Computer Vision Updates<\/h1>\n<p>The last topic I want to bring up is computer vision. This is where we had the biggest technical update with MATLAB since the Thailand event in 2017. I had started simple with some color thresholding and basic location + depth tracking, but there was a big disconnect between that and the fact that service robots need to interact with &#8212; and therefore detect &#8212; humans. Unfortunately for vision algorithm designers, humans are not giant blobs of a solid and consistent color.<\/p>\n<p>This is where we had to bring in some more advanced solutions that worked pretty well for the challenge.<\/p>\n<ul>\n<li><a title=\"https:\/\/www.mathworks.com\/help\/vision\/object-detectors.html (link no longer works)\">Pretrained face and person detectors<\/a> from Computer Vision System Toolbox<\/li>\n<li><a href=\"https:\/\/www.mathworks.com\/solutions\/deep-learning.html\">Deep learning<\/a> (namely, Convolutional Neural Networks) to classify images<\/li>\n<\/ul>\n<p>We combined these solutions by using a <a href=\"https:\/\/www.mathworks.com\/help\/vision\/ref\/vision.cascadeobjectdetector-system-object.html\">built-in face detector<\/a> to identify regions of interest (ROIs) in images captured by the robot, and then using a <a href=\"https:\/\/talhassner.github.io\/home\/publication\/2015_CVPR\">publicly available neural network<\/a> to classify the gender of each face. To do the latter, I took advantage of the ability to <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/61735-neural-network-toolbox-importer-for-caffe-models\">import Caffe models into MATLAB<\/a>.<\/p>\n<p><em>Side note 1:<\/em> We also support <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/64649-neural-network-toolbox-importer-for-tensorflow-keras-models\">Tensorflow-Keras<\/a> and <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/67296-neural-network-toolbox-converter-for-onnx-model-format\">Open Neural Network eXchange (ONNX)<\/a> model import.<\/p>\n<p><em>Side note 2:<\/em> My teammate <a href=\"https:\/\/www.linkedin.com\/in\/connelldsouza\/\">Connell D&#8217;Souza<\/a> took this a step further by taking an age detection neural network and deploying it to an <a href=\"https:\/\/developer.nvidia.com\/embedded\/buy\/jetson-tx2\">NVIDIA Jetson TX2<\/a> using <a href=\"https:\/\/www.mathworks.com\/products\/gpu-coder.html\">GPU Coder<\/a>. You can find a preview of this on <a href=\"https:\/\/www.facebook.com\/groups\/RoboticsArena\/permalink\/1918608564865057\/\">our Facebook group<\/a>, but expect to see more on this in the future!<\/p>\n<p>Of course, vision is just an example of what MathWorks can bring to the table. As Prof. Tan put it,\u00a0&#8220;The potential to leverage advanced techniques (toolboxes) in MATLAB is a big plus point, not only for beginners but also experienced ROS users.&#8221;<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-1693 size-full\" src=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2018\/08\/athomeedu_gender_net-e1532962913575.jpg\" alt=\"\" width=\"720\" height=\"634\" \/><\/p>\n<p style=\"text-align: center;\"><em>Testing out the face and gender detection solution [<a href=\"https:\/\/twitter.com\/chainsofopacity\/status\/1007150267018727424\">From Sebastian&#8217;s Twitter<\/a>]<\/em><\/p>\n<h1>What Next?<\/h1>\n<p>We already have a couple ideas for expanding the usage of MathWorks tools:<\/p>\n<ul>\n<li>Graphical programming using <a href=\"https:\/\/www.mathworks.com\/products\/simulink.html\">Simulink<\/a> and <a href=\"https:\/\/www.mathworks.com\/products\/stateflow.html\">Stateflow<\/a>, which would be especially useful for system integration and decision-making<\/li>\n<li>Bringing the full navigation solution into MATLAB &#8212; <a href=\"https:\/\/www.mathworks.com\/videos\/implement-simultaneous-localization-and-mapping-slam-with-matlab-1520292583530.html\">SLAM for map generation<\/a> and <a href=\"https:\/\/www.mathworks.com\/help\/robotics\/examples\/localize-turtlebot-using-monte-carlo-localization.html\">Monte Carlo localization<\/a> are available!<\/li>\n<li>Using automatic code generation to <a href=\"https:\/\/www.mathworks.com\/help\/robotics\/examples\/generate-a-standalone-ros-node-from-simulink.html\">deploy standalone C\/C++ ROS nodes<\/a><\/li>\n<\/ul>\n<p>Looking forward to more <a href=\"\">RoboCup@Home Education challenges<\/a>! If you have any questions or ideas for future challenges, let us know here or at <a href=\"mailto:roboticsarena@mathworks.com\">roboticsarena@mathworks.com<\/a>.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"407\" class=\"aligncenter size-large wp-image-1687\" src=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2018\/08\/athomeedu_actionshots-1024x407.jpg\" alt=\"\" \/><\/p>\n<p style=\"text-align: center;\"><em>[Left] Volunteer judges from MathWorks, ROBOTIS, and RoboCup looking at Team Skuba JR (Thailand)&#8217;s Deep Learning capabilities<\/em><br \/>\n<em> [Right] RoboCup@Home Education 2018 Organizing Committee &#8212; Professors Jeffrey Tan,\u00a0 Yoshinobu Hagiwara, M.Q. Azhar, and Kanjanapan Sukvichai<br \/>\nCourtesy of Prof. Jeffrey Tan<br \/>\n<\/em><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"410\" class=\"aligncenter size-large wp-image-1683\" src=\"https:\/\/blogs.mathworks.com\/racing-lounge\/files\/2018\/08\/athomeedu_mwlogo_combined-1024x410.jpg\" alt=\"\" \/><\/p>\n<p style=\"text-align: center;\"><em>To carry the theme from the previous blog post &#8212; Spot the MathWorks logos!<br \/>\n<\/em><em>Courtesy of Prof. Jeffrey Tan and Prof. Kanjanapan Sukvichai<\/em><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img src=\"https:\/\/blogs.mathworks.com\/student-lounge\/files\/2018\/08\/athomeedu_whole_team.jpg\" class=\"img-responsive attachment-post-thumbnail size-post-thumbnail wp-post-image\" alt=\"\" decoding=\"async\" loading=\"lazy\" \/><\/div>\n<p>Sebastian Castro is back to talk about his top 2 professional interests: robotics and education.<br \/>\nThe RoboCup@Home Education Challenge is a robotics education experience based on, and built into, the&#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/student-lounge\/2018\/08\/15\/robocup-athome-education-2018\/\">read more >><\/a><\/p>\n","protected":false},"author":155,"featured_media":1679,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[52,6,14],"tags":[72,144,88,134,94],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/posts\/1584"}],"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\/155"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/comments?post=1584"}],"version-history":[{"count":10,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/posts\/1584\/revisions"}],"predecessor-version":[{"id":4547,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/posts\/1584\/revisions\/4547"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/media\/1679"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/media?parent=1584"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/categories?post=1584"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/student-lounge\/wp-json\/wp\/v2\/tags?post=1584"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}