{"id":134,"date":"2025-07-18T00:56:48","date_gmt":"2025-07-18T00:56:48","guid":{"rendered":"https:\/\/www.rickykurosawa.com\/?page_id=134"},"modified":"2026-04-07T23:16:30","modified_gmt":"2026-04-07T23:16:30","slug":"designing-a-path-for-a-dualbox-retriever-neo","status":"publish","type":"page","link":"https:\/\/www.rickykurosawa.com\/?page_id=134","title":{"rendered":"Designing a Path for a Dualbox Retriever (Neo)"},"content":{"rendered":"\n<div class=\"wp-block-columns alignwide is-layout-flex wp-container-core-columns-is-layout-3a88641f wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<h2 class=\"wp-block-heading\">Prototype 1<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This Numerical Analysis project&#8217;s objective was to create a path for Neo, a 2-dimensional robot that grasps two boxes simultaneously in MATLAB. I was able to achieve this by defining Neo as a set of 6 parameters and 6 variables. These parameters were the radius of the wheels, the height of the base rectangle, and the length of each arm. We then defined its position at any given time by Neo&#8217;s horizontal position and the angles of each joint.<br> <br> With this information, I randomly selected the positions of n-pairs of boxes, and used Newton&#8217;s Method to find Neo&#8217;s configuration to grasp each box. With the positions I found using Newton&#8217;s Method, I applied cubic splines to allow Neo to smoothly move towards each dualbox. <br> <br>With improved initial conditions for Neo, I was able to increase the success rate of grasping the boxes to around <strong>94%<\/strong>.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\">\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-3a88641f wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><\/div>\n<\/div>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"742\" height=\"452\" src=\"https:\/\/www.rickykurosawa.com\/wordpress\/wp-content\/uploads\/2025\/07\/Neomid-1.gif\" alt=\"\" class=\"wp-image-159\" style=\"width:444px;height:auto\"\/><figcaption class=\"wp-element-caption\"><strong>Prototype 1: <\/strong>This is Neo, my MATLAB robot who grabs a pair of boxes. In this gif, Neo struggles to grab a pair of boxes, which is because Newton&#8217;s Method is not converging to a solution.<\/figcaption><\/figure>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-group alignwide has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n<div class=\"wp-block-columns alignwide is-layout-flex wp-container-core-columns-is-layout-3a88641f wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<h2 class=\"wp-block-heading has-text-align-left\">Prototype 2<\/h2>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\"><\/div>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-group alignwide has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n<div class=\"wp-block-columns alignwide is-layout-flex wp-container-core-columns-is-layout-3a88641f wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<p class=\"wp-block-paragraph\">As I was brainstorming for future development for Neo, I came up with an idea to add a design variable that would give Neo 7 degrees of freedom rather than the 6 prior. The design variable I added was breaking Neo&#8217;s first link into 2. Now, rather than having one link break off into 2, Neo has 2 whole arms. By doing so, we were able to define Neo&#8217;s position as a combination of the same parameters, except having a whole new link of the same length as before, and his 7 variables.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In order to converge to solutions, I needed to apply a variation of Newton&#8217;s Method that converges for underdetermined systems, which I found <a href=\"https:\/\/math.stackexchange.com\/questions\/4384676\/derivation-of-gauss-newton-method-for-underdetermined-inverse-problems\" data-type=\"link\" data-id=\"https:\/\/math.stackexchange.com\/questions\/4384676\/derivation-of-gauss-newton-method-for-underdetermined-inverse-problems\">here<\/a>. To apply this variation of Newton&#8217;s Method, I updated Neo&#8217;s position function, Jacobian of the function, and adjusted the code for the animation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After running 30 environments with both prototypes, prototype 2 delivered with a success rate of <strong>100%<\/strong>. This prototype was able to converge to all 300 boxes with no issues with convergence, while prototype 1 converged to 94% of the boxes. However, as I kept messing around with environments, I was able to find one pair of boxes that prototype 2 could not converge to. Because of this, I would say that the convergence rate of this prototype is likely somewhere over <strong>99%<\/strong>.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\">\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"694\" height=\"436\" src=\"https:\/\/www.rickykurosawa.com\/wordpress\/wp-content\/uploads\/2025\/07\/Neogoat.gif\" alt=\"\" class=\"wp-image-136\" style=\"width:458px;height:auto\"\/><figcaption class=\"wp-element-caption\"><strong>Prototype 2: <\/strong>Neo, who now has an extra variable, converges to all of the pairs of boxes in the same environment as the gif above<\/figcaption><\/figure>\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading alignwide\">Visualizing the Underdetermined Solution<\/h2>\n\n\n\n<div class=\"wp-block-columns alignwide is-layout-flex wp-container-core-columns-is-layout-3a88641f wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<p class=\"wp-block-paragraph\">In linear algebra, we learned that free variables cause a system to have a solution vector, where the solution lies on a line in a certain vector space. However, since the 7-variable function defining Neo is nonlinear, the solution can be thought to exist on some solution curve in 7-space.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">With this in mind, I wanted to create a visual representation of this somehow. At first, I defined my environment as one pair of boxes, and iteratively changed the initial conditions to converge to different roots. From there, I used cubic splines to smoothly connect the solutions. However, I wanted an even better visualization. With a suggestion and description from Professor Borum, I ended up choosing to use numerical continuation to visualize the &#8220;solution curve&#8221;. By choosing our initial guess to be in the null space of the Jacobian, the method converges quickly; to keep &#8220;propagating the solution in one direction&#8221;, I updated the initial guess as the difference between the previous 2 solutions.<\/p>\n\n\n\n<p style=\"font-size: 0.9rem;\">\n    <i>\n    Thanks to Professor Andy Borum for advising this project!\n    <\/i>\n<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\">\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"506\" height=\"314\" src=\"https:\/\/www.rickykurosawa.com\/wordpress\/wp-content\/uploads\/2025\/07\/Neohold.gif\" alt=\"\" class=\"wp-image-137\" style=\"width:456px;height:auto\"\/><figcaption class=\"wp-element-caption\"><strong>Prototype 2: <\/strong>Neo holding a pair of boxes while moving around, representing many solutions that it can converge to multiple solutions<\/figcaption><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Prototype 1 This Numerical Analysis project&#8217;s objective was to create a path for Neo, a 2-dimensional robot that grasps two boxes simultaneously in MATLAB. I was able to achieve this by defining Neo as a set of 6 parameters and 6 variables. These parameters were the radius of the wheels, the height of the base [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-134","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Designing a Path for a Dualbox Retriever (Neo) - Ricky Kurosawa<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.rickykurosawa.com\/?page_id=134\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Designing a Path for a Dualbox Retriever (Neo) - Ricky Kurosawa\" \/>\n<meta property=\"og:description\" content=\"Prototype 1 This Numerical Analysis project&#8217;s objective was to create a path for Neo, a 2-dimensional robot that grasps two boxes simultaneously in MATLAB. I was able to achieve this by defining Neo as a set of 6 parameters and 6 variables. These parameters were the radius of the wheels, the height of the base [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rickykurosawa.com\/?page_id=134\" \/>\n<meta property=\"og:site_name\" content=\"Ricky Kurosawa\" \/>\n<meta property=\"article:modified_time\" content=\"2026-04-07T23:16:30+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rickykurosawa.com\/wordpress\/wp-content\/uploads\/2025\/07\/Neomid-1.gif\" \/>\n\t<meta property=\"og:image:width\" content=\"742\" \/>\n\t<meta property=\"og:image:height\" content=\"452\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/gif\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.rickykurosawa.com\\\/?page_id=134\",\"url\":\"https:\\\/\\\/www.rickykurosawa.com\\\/?page_id=134\",\"name\":\"Designing a Path for a Dualbox Retriever (Neo) - Ricky Kurosawa\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rickykurosawa.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.rickykurosawa.com\\\/?page_id=134#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rickykurosawa.com\\\/?page_id=134#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rickykurosawa.com\\\/wordpress\\\/wp-content\\\/uploads\\\/2025\\\/07\\\/Neomid-1.gif\",\"datePublished\":\"2025-07-18T00:56:48+00:00\",\"dateModified\":\"2026-04-07T23:16:30+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.rickykurosawa.com\\\/?page_id=134#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.rickykurosawa.com\\\/?page_id=134\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rickykurosawa.com\\\/?page_id=134#primaryimage\",\"url\":\"https:\\\/\\\/www.rickykurosawa.com\\\/wordpress\\\/wp-content\\\/uploads\\\/2025\\\/07\\\/Neomid-1.gif\",\"contentUrl\":\"https:\\\/\\\/www.rickykurosawa.com\\\/wordpress\\\/wp-content\\\/uploads\\\/2025\\\/07\\\/Neomid-1.gif\",\"width\":742,\"height\":452},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.rickykurosawa.com\\\/?page_id=134#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.rickykurosawa.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Designing a Path for a Dualbox Retriever (Neo)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.rickykurosawa.com\\\/#website\",\"url\":\"https:\\\/\\\/www.rickykurosawa.com\\\/\",\"name\":\"Ricky Kurosawa\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.rickykurosawa.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Designing a Path for a Dualbox Retriever (Neo) - Ricky Kurosawa","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.rickykurosawa.com\/?page_id=134","og_locale":"en_US","og_type":"article","og_title":"Designing a Path for a Dualbox Retriever (Neo) - Ricky Kurosawa","og_description":"Prototype 1 This Numerical Analysis project&#8217;s objective was to create a path for Neo, a 2-dimensional robot that grasps two boxes simultaneously in MATLAB. I was able to achieve this by defining Neo as a set of 6 parameters and 6 variables. These parameters were the radius of the wheels, the height of the base [&hellip;]","og_url":"https:\/\/www.rickykurosawa.com\/?page_id=134","og_site_name":"Ricky Kurosawa","article_modified_time":"2026-04-07T23:16:30+00:00","og_image":[{"width":742,"height":452,"url":"https:\/\/www.rickykurosawa.com\/wordpress\/wp-content\/uploads\/2025\/07\/Neomid-1.gif","type":"image\/gif"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.rickykurosawa.com\/?page_id=134","url":"https:\/\/www.rickykurosawa.com\/?page_id=134","name":"Designing a Path for a Dualbox Retriever (Neo) - Ricky Kurosawa","isPartOf":{"@id":"https:\/\/www.rickykurosawa.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rickykurosawa.com\/?page_id=134#primaryimage"},"image":{"@id":"https:\/\/www.rickykurosawa.com\/?page_id=134#primaryimage"},"thumbnailUrl":"https:\/\/www.rickykurosawa.com\/wordpress\/wp-content\/uploads\/2025\/07\/Neomid-1.gif","datePublished":"2025-07-18T00:56:48+00:00","dateModified":"2026-04-07T23:16:30+00:00","breadcrumb":{"@id":"https:\/\/www.rickykurosawa.com\/?page_id=134#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rickykurosawa.com\/?page_id=134"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rickykurosawa.com\/?page_id=134#primaryimage","url":"https:\/\/www.rickykurosawa.com\/wordpress\/wp-content\/uploads\/2025\/07\/Neomid-1.gif","contentUrl":"https:\/\/www.rickykurosawa.com\/wordpress\/wp-content\/uploads\/2025\/07\/Neomid-1.gif","width":742,"height":452},{"@type":"BreadcrumbList","@id":"https:\/\/www.rickykurosawa.com\/?page_id=134#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rickykurosawa.com\/"},{"@type":"ListItem","position":2,"name":"Designing a Path for a Dualbox Retriever (Neo)"}]},{"@type":"WebSite","@id":"https:\/\/www.rickykurosawa.com\/#website","url":"https:\/\/www.rickykurosawa.com\/","name":"Ricky Kurosawa","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.rickykurosawa.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/www.rickykurosawa.com\/index.php?rest_route=\/wp\/v2\/pages\/134","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rickykurosawa.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.rickykurosawa.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.rickykurosawa.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rickykurosawa.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=134"}],"version-history":[{"count":6,"href":"https:\/\/www.rickykurosawa.com\/index.php?rest_route=\/wp\/v2\/pages\/134\/revisions"}],"predecessor-version":[{"id":425,"href":"https:\/\/www.rickykurosawa.com\/index.php?rest_route=\/wp\/v2\/pages\/134\/revisions\/425"}],"wp:attachment":[{"href":"https:\/\/www.rickykurosawa.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=134"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}