{"id":119,"date":"2021-04-19T18:51:47","date_gmt":"2021-04-19T18:51:47","guid":{"rendered":"https:\/\/mileggedrobots.eecs.umich.edu\/?page_id=119"},"modified":"2022-07-31T15:03:55","modified_gmt":"2022-07-31T15:03:55","slug":"build","status":"publish","type":"page","link":"https:\/\/mileggedrobots.eecs.umich.edu\/index.php\/create-your-website-with-blocks\/build\/","title":{"rendered":"BUILD"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">You&#8217;ve built and tested the&nbsp;<a href=\"https:\/\/mileggedrobots.eecs.umich.edu\/index.php\/create-your-website-with-blocks\/hardware\/\"><strong>Hardware<\/strong><\/a>. You&#8217;ve introduced yourself to <strong>PyCKBot<\/strong>, and seen how it can <a href=\"https:\/\/mileggedrobots.eecs.umich.edu\/index.php\/create-your-website-with-blocks\/control\/\"><strong>Control<\/strong><\/a>&nbsp;the servos that will make your robot move. Now let&#8217;s build a body for those guts and get walking.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"http:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/UM-EECS-imchworm-IMG_1169-1024x768.jpg\" alt=\"finished Inchworm robot\" class=\"wp-image-288\" srcset=\"https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/UM-EECS-imchworm-IMG_1169-1024x768.jpg 1024w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/UM-EECS-imchworm-IMG_1169-300x225.jpg 300w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/UM-EECS-imchworm-IMG_1169-768x576.jpg 768w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/UM-EECS-imchworm-IMG_1169-1536x1152.jpg 1536w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/UM-EECS-imchworm-IMG_1169-2048x1536.jpg 2048w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/UM-EECS-imchworm-IMG_1169-360x270.jpg 360w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>a finished Inchworm (note the rubber bands around the end of each leg to improve grip)<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The \u201cbody\u201d of your inchworm is simple, composed of a pair of legs\u2014the \u201cheadfoot\u201d and \u201ctailfoot\u201d\u2014and a \u201ctiller\u201d that joins its two halves so it can turn.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>You Will Need<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>A marker<\/li><li>A hobby knife<\/li><li>Packing tape<\/li><li>1\/8&#8243;-thick <a href=\"https:\/\/en.wikipedia.org\/wiki\/Foamcore\">foamcore<\/a><\/li><li>A hot glue gun with glue sticks<\/li><li>A pair of wide rubber bands<\/li><li>3x servo \u201chorns\u201d (the \u201cgear-like\u201d plastic doohickeys that came with your servos)<\/li><li>3x long screws that came with your servos<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Making the Body Parts<\/strong><\/h2>\n\n\n\n<ol class=\"wp-block-list\"><li>First measure and cut out the following pieces of foamcore:<ul><li>4 rectangles, each measuring 2&#8243;-by-5&#8243; (the&nbsp; <em>&#8220;legs&#8217; sides&#8221;<\/em>)<\/li><li>1 rectangle measuring 1.25\u201d-by-4\u201d (the central \u201c<em>tiller<\/em>\u201d)<\/li><li>2 rectangles, each 2\u201d by 6\u201d (these will become the &#8220;<em>walking surfaces<\/em>\u201d of each leg)<\/li><\/ul><\/li><li>Set aside the leg sides and tiller.&nbsp;<\/li><li>Take each 2&#8243;-by-6&#8243; walking surface piece and draw lines dividing it into a row of three 2\u201d-by-2\u201d squares (see Figure 1) <img loading=\"lazy\" decoding=\"async\" width=\"500\" height=\"244\" class=\"wp-image-293\" style=\"width: 500px;\" src=\"http:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/a-IMG_1171-scaled.jpg\" alt=\"\" srcset=\"https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/a-IMG_1171-scaled.jpg 2560w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/a-IMG_1171-300x146.jpg 300w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/a-IMG_1171-1024x500.jpg 1024w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/a-IMG_1171-768x375.jpg 768w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/a-IMG_1171-1536x750.jpg 1536w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/a-IMG_1171-2048x1000.jpg 2048w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/a-IMG_1171-553x270.jpg 553w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/li><li>Using your hobby knife, carefully cut <strong><em>halfway<\/em><\/strong> into the foam core at each 2\u201d mark. The result should be something like the \u201ctrifold\u201d piece shown in the Figure 2 below.&nbsp;<img loading=\"lazy\" decoding=\"async\" width=\"500\" height=\"374\" class=\"wp-image-294\" style=\"width: 500px;\" src=\"http:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/b-IMG_1172-scaled.jpg\" alt=\"\" srcset=\"https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/b-IMG_1172-scaled.jpg 2560w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/b-IMG_1172-300x224.jpg 300w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/b-IMG_1172-1024x766.jpg 1024w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/b-IMG_1172-768x575.jpg 768w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/b-IMG_1172-1536x1149.jpg 1536w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/b-IMG_1172-2048x1532.jpg 2048w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/b-IMG_1172-361x270.jpg 361w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/li><li>Add a piece of reinforcing packing tape down the length of the \u201cinside\u201d (i.e., uncut) side of the trifold walking surface <\/li><li>Now assemble each leg. Start by laying a ~5\u201d strip of packing tape on your worktable, sticky side facing up.&nbsp; Place one leg side on the tape so that it forms a &#8220;T&#8221;. Note that about 1\/8th of an inch of tape overhangs the top of the foamcore (see Figure 3) <img loading=\"lazy\" decoding=\"async\" width=\"500\" height=\"375\" class=\"wp-image-295\" style=\"width: 500px;\" src=\"http:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/c-IMG_1173-scaled.jpg\" alt=\"\" srcset=\"https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/c-IMG_1173-scaled.jpg 2560w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/c-IMG_1173-300x225.jpg 300w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/c-IMG_1173-1024x768.jpg 1024w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/c-IMG_1173-768x576.jpg 768w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/c-IMG_1173-1536x1152.jpg 1536w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/c-IMG_1173-2048x1536.jpg 2048w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/c-IMG_1173-360x270.jpg 360w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/li><li>Wrap one of the foamcore walking surfaces you made in Steps 3\u20135 around the end of the foamcore leg side, then secure it in place with the packing tape (as in Figure 4).<img loading=\"lazy\" decoding=\"async\" width=\"500\" height=\"327\" class=\"wp-image-296\" style=\"width: 500px;\" src=\"http:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/d-IMG_1174-scaled.jpg\" alt=\"\" srcset=\"https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/d-IMG_1174-scaled.jpg 2560w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/d-IMG_1174-300x196.jpg 300w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/d-IMG_1174-1024x670.jpg 1024w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/d-IMG_1174-768x503.jpg 768w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/d-IMG_1174-1536x1006.jpg 1536w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/d-IMG_1174-2048x1341.jpg 2048w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/d-IMG_1174-412x270.jpg 412w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/li><li>Next, lay a second 5\u201d length of packing tape on your worktable, sticky-side up. Lay another foamcore leg side piece on the tape, again forming a &#8220;T&#8221;.&nbsp; Take the side-and-surface assembly (constructed in Steps 6 and 7) and cup it around the end of the side piece (see Figure 5).&nbsp; Use the packing tape to secure this side to the assembly. Finally, give that entire end of the leg a reinforcing wrap of tape. Your first leg is complete. <img loading=\"lazy\" decoding=\"async\" width=\"500\" height=\"375\" class=\"wp-image-297\" style=\"width: 500px;\" src=\"http:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/e-IMG_1175-scaled.jpg\" alt=\"\" srcset=\"https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/e-IMG_1175-scaled.jpg 2560w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/e-IMG_1175-300x225.jpg 300w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/e-IMG_1175-1024x768.jpg 1024w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/e-IMG_1175-768x576.jpg 768w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/e-IMG_1175-1536x1152.jpg 1536w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/e-IMG_1175-2048x1536.jpg 2048w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/e-IMG_1175-360x270.jpg 360w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/li><li>Repeat these steps with the remaining walking surface and<em> <\/em>leg side pieces to construct the other leg.<\/li><li>(optional) Wrap a rubber band around the \u201ctoe\u201d of each leg; this will give it better traction on smooth surfaces. (You can see the white rubber bands on the finished Inchworm shown at the top of this page.)<\/li><li>Now take the 3 servo horns, glue one to the inside of each leg, and one to one end of the tiller(see Figure 6 for positioning of leg horns, and Figure 7 for tiller horn)   <img loading=\"lazy\" decoding=\"async\" width=\"500\" height=\"375\" class=\"wp-image-298\" style=\"width: 500px;\" src=\"http:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/f-IMG_1177-scaled.jpg\" alt=\"\" srcset=\"https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/f-IMG_1177-scaled.jpg 2560w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/f-IMG_1177-300x225.jpg 300w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/f-IMG_1177-1024x768.jpg 1024w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/f-IMG_1177-768x576.jpg 768w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/f-IMG_1177-1536x1152.jpg 1536w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/f-IMG_1177-2048x1536.jpg 2048w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/f-IMG_1177-360x270.jpg 360w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/li><li>Glue the other end of the tiller to the side of the &#8220;mid&#8221; servo. Make sure the servo&#8217;s shaft is pointing to the right when you glue it. (see Figure 7.)<img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"590\" class=\"wp-image-299\" style=\"width: 300px;\" src=\"http:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/g-IMG_1178-scaled.jpg\" alt=\"\" srcset=\"https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/g-IMG_1178-scaled.jpg 1301w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/g-IMG_1178-152x300.jpg 152w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/g-IMG_1178-520x1024.jpg 520w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/g-IMG_1178-768x1511.jpg 768w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/g-IMG_1178-781x1536.jpg 781w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/g-IMG_1178-1041x2048.jpg 1041w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/g-IMG_1178-137x270.jpg 137w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/li><li>Finally, you are going to glue the \u201cmid\u201d and \u201cheadfoot\u201d servos together at a 90\u00ba angle such that the \u201cmid\u201d servo\u2019s output shaft points up and the \u201ctailfoot\u201d output shaft points right.&nbsp; (See Figure 8)<img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"360\" class=\"wp-image-300\" style=\"width: 300px;\" src=\"http:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/h-IMG_1179.jpg\" alt=\"\" srcset=\"https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/h-IMG_1179.jpg 2034w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/h-IMG_1179-250x300.jpg 250w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/h-IMG_1179-853x1024.jpg 853w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/h-IMG_1179-768x922.jpg 768w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/h-IMG_1179-1279x1536.jpg 1279w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/h-IMG_1179-1705x2048.jpg 1705w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/h-IMG_1179-225x270.jpg 225w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/li><\/ol>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Zero the Servos<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Before moving into the final assembly, let&#8217;s take a second to &#8220;zero&#8221; your servos (i.e., make sure the shafts are currently at their &#8220;neutral&#8221; position). Your computer should be turned on and booted into Xubuntu, and the Pololu Micro Maestro 6-Channel USB Servo Controller (heceforth the &#8220;Controller&#8221;) should be powered up from it&#8217;s AA batteries and plugged into the computer. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If all that\u2019s the case, then:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Launch the Maestro Control Center (MCC) software like so:<ol><li>Open <strong>Terminal Emulator<\/strong><\/li><li>Navigate to the Maestro folder (probably by running <kbd>cd ~\/Desktop\/maestro-linux<\/kbd>) and type <kbd>.\/MaestroControlCenter<\/kbd> and hit <kbd>Enter<\/kbd> to launch the MCC<\/li><\/ol><\/li><li>Go to the \u201cSerial Settings\u201d tab of the MCC and select \u201cUSB Dual Port\u201d<\/li><li>Go back to \u201cStatus\u201d tab and tick the \u201cEnabled\u201d boxes next to the first three Servo channels listed (i.e., #0, #1, #2)<\/li><li>Use the sliders to set servo position to the center of each range. (The value in the \u201cTarget\u201d box should be \u201c1500.\u201d<\/li><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">That\u2019s it. You can now exit the MCC and finish assembly.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Assemble the Inchworm<\/strong><\/h2>\n\n\n\n<ol class=\"wp-block-list\"><li>Start by securing each servo to its horn.&nbsp; Place the mid\/headfoot servo assembly on your workbench so that the mid\u2019s shaft points toward the ceiling and the headfoot\u2019s shaft points right (see Figure 9). Slide the tiller\u2019s horn onto the shaft of the mid servo. Then attach each leg. (Figure 10) <img loading=\"lazy\" decoding=\"async\" width=\"500\" height=\"667\" class=\"wp-image-373\" style=\"width: 500px;\" src=\"http:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/07\/i-IMG_1182-scaled.jpg\" alt=\"\" srcset=\"https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/07\/i-IMG_1182-scaled.jpg 1920w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/07\/i-IMG_1182-225x300.jpg 225w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/07\/i-IMG_1182-768x1024.jpg 768w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/07\/i-IMG_1182-1152x1536.jpg 1152w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/07\/i-IMG_1182-1536x2048.jpg 1536w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/07\/i-IMG_1182-203x270.jpg 203w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><img loading=\"lazy\" decoding=\"async\" width=\"500\" height=\"375\" class=\"wp-image-374\" style=\"width: 500px;\" src=\"http:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/07\/j-IMG_1183-scaled.jpg\" alt=\"\" srcset=\"https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/07\/j-IMG_1183-scaled.jpg 2560w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/07\/j-IMG_1183-300x225.jpg 300w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/07\/j-IMG_1183-1024x768.jpg 1024w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/07\/j-IMG_1183-768x576.jpg 768w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/07\/j-IMG_1183-1536x1152.jpg 1536w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/07\/j-IMG_1183-2048x1536.jpg 2048w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/07\/j-IMG_1183-360x270.jpg 360w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/li><li>Using the tip of your hobby knife carve the foamcore away from the hub of each servo horn.&nbsp; Then use one long screw to secure each leg\/tiller to its servo (see detail in Figure&nbsp;11)<img loading=\"lazy\" decoding=\"async\" width=\"500\" height=\"375\" class=\"wp-image-303\" style=\"width: 500px;\" src=\"http:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/kk-IMG_1181-scaled.jpg\" alt=\"\" srcset=\"https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/kk-IMG_1181-scaled.jpg 2560w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/kk-IMG_1181-300x225.jpg 300w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/kk-IMG_1181-1024x768.jpg 1024w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/kk-IMG_1181-768x576.jpg 768w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/kk-IMG_1181-1536x1152.jpg 1536w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/kk-IMG_1181-2048x1536.jpg 2048w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/kk-IMG_1181-360x270.jpg 360w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/li><li>Finally, use a little double-sided tape or a zip-tie to secure the Controller to the tiller. The results are shown in Figure 12.<img loading=\"lazy\" decoding=\"async\" width=\"500\" height=\"375\" class=\"wp-image-304\" style=\"width: 500px;\" src=\"http:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/l-IMG_1185-scaled.jpg\" alt=\"\" srcset=\"https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/l-IMG_1185-scaled.jpg 2560w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/l-IMG_1185-300x225.jpg 300w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/l-IMG_1185-1024x768.jpg 1024w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/l-IMG_1185-768x576.jpg 768w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/l-IMG_1185-1536x1152.jpg 1536w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/l-IMG_1185-2048x1536.jpg 2048w, https:\/\/mileggedrobots.eecs.umich.edu\/wp-content\/uploads\/2022\/06\/l-IMG_1185-360x270.jpg 360w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/li><li>The body is assembled; let\u2019s bring it to life! Plug the Controller\u2019s USB cable back into the computer (if it isn\u2019t already), fire up the MCC software (as described in the previous section), and use the sliders to control the servos.&nbsp; Make all the servos wiggle and thrash a bit, and see if anything falls off (it can be hard to get those servo horn screws to catch in the drive shafts).<\/li><\/ol>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Making the Inchworm Inch<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">While you <em>can<\/em> use the sliders in the MCC software to get your Inchworm inching around, doing so is extremely tedious. Instead, we\u2019re going to quickly throw together a script based on <a href=\"https:\/\/mileggedrobots.eecs.umich.edu\/index.php\/create-your-website-with-blocks\/control\/#dynamic-control\">dynamic.py<\/a>&nbsp;<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Using your text editor of choice (such as <strong>Mousepad<\/strong>\u2014included with Xubuntu\u2014or the command line utility <strong>pico<\/strong>) create the script shown below (you can just copy and paste it into your text file). Save it on the Desktop as <strong><em>inchworm.py<\/em><\/strong>:<\/li><li>Using the Terminal navigate to the Desktop, and run your script by entering &#8220;<kbd>python3 inchworm.py<\/kbd>&#8221; (The Terminal may reply with a string of <strong>WARNING<\/strong>s you can ignore.) A fresh blank &#8220;<strong>pygame<\/strong>&#8221; window will pop open. (Tons<em> <\/em>of stuff will start scrolling madly across the open Terminal windows, <em>Matrix<\/em>-style. That&#8217;s fine.)<\/li><li>Click on the <strong>pygame<\/strong> window, so that it&#8217;s in the foreground.<\/li><li>Now you can make your Inchworm inch forward. There are many different ways it might inch:<ul><li> On some surfaces, the following works best:<ul><li>Hit <kbd><strong>d<\/strong><\/kbd> and <kbd><strong>z<\/strong><\/kbd> simultaneously<\/li><li>Hit <kbd><strong>s<\/strong><\/kbd><\/li><li>Hit <kbd><strong>x<\/strong><\/kbd><\/li><li>\u2026 repeat \u2026<\/li><\/ul><\/li><li>On others, you&#8217;ll want to try:<ul><li>Hit <kbd><strong>d<\/strong><\/kbd> <\/li><li>Hit <kbd><strong>z<\/strong><\/kbd><\/li><li>Hit <kbd><strong>s<\/strong><\/kbd><\/li><li>Hit <kbd><strong>x<\/strong><\/kbd><\/li><li>\u2026 repeat \u2026<\/li><\/ul><\/li><li>And on others, it&#8217;s best to lift the tailfoot by hitting <kbd><strong>z<\/strong><\/kbd>, and then just alternating between <strong><kbd>d<\/kbd><\/strong> and <strong><kbd>s<\/kbd><\/strong> to drag your body forward.<\/li><li>Or you might find some other strategy is better. The <strong>inchworm.py<\/strong> code below allows for the following controls<ul><li><kbd><strong>a<\/strong><\/kbd> lifts the headfoot up<\/li><li><kbd><strong>s<\/strong><\/kbd> returns headfoot to zero<\/li><li><kbd><strong>d<\/strong><\/kbd> pushes headfoot down<\/li><li><kbd><strong>z<\/strong><\/kbd> lifts the tailfoot up<\/li><li><kbd><strong>x<\/strong><\/kbd> returns tailfoot to zero<\/li><li><kbd><strong>c<\/strong><\/kbd> pushes tailfoot down<\/li><li>Want to turn? Try using <kbd><strong>i<\/strong><\/kbd>, <kbd><strong>o<\/strong><\/kbd>, and <kbd><strong>p<\/strong><\/kbd><\/li><\/ul><\/li><\/ul><\/li><li>When you\u2019re done, click the <strong>pygame<\/strong> window and hit <kbd>Q<\/kbd> (or click the Terminal window and hit <kbd><strong>Ctrl-c<\/strong><\/kbd>) to terminate the program.<\/li><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Troubleshooting note<\/strong>: If there is something wrong and you&#8217;re sure it isn&#8217;t hardware related (<em>Did you check the batteries? Are there loose wires? Did you forget to plug in the USB cable?<\/em>), then you can always fall back on the <a href=\"https:\/\/mileggedrobots.eecs.umich.edu\/index.php\/create-your-website-with-blocks\/control\/#Universal-PyCKBot-Troubleshooting\"><strong>Universal PyCKBot Troubleshooting<\/strong><\/a> process. <\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"UM EECS NSF &quot;Project Inchworm&quot; inching robot demo\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/dOJ0GH89_6A?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Inchworm.py<\/strong><\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nfrom joy.decl import *\n\nROBOT=dict(required=&#91;0x80,0x81,0x82],names={0x80:&quot;headfoot&quot;, 0x81:&quot;mid&quot;, 0x82:&quot;tailfoot&quot;})\n\ndef on_K_a(evt):\n\tapp.robot.at.headfoot.set_pos(9000)\ndef on_K_s(evt):\n\tapp.robot.at.headfoot.set_pos(0)\ndef on_K_d(evt):\n\tapp.robot.at.headfoot.set_pos(-9000)\n\ndef on_K_z(evt):\n\tapp.robot.at.tailfoot.set_pos(9000)\ndef on_K_x(evt):\n\tapp.robot.at.tailfoot.set_pos(0)\ndef on_K_c(evt):\n\tapp.robot.at.tailfoot.set_pos(-9000)\n\ndef on_K_i(evt):\n\tapp.robot.at.mid.set_pos(6000)\ndef on_K_o(evt):\n\tapp.robot.at.mid.set_pos(0)\ndef on_K_p(evt):\n\tapp.robot.at.mid.set_pos(-6000)\n\n### You need this at the end. It starts the robot and runs your code\n\nfrom joy import runFlatScript\nrunFlatScript(locals())\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\"><strong>Evolving your Inchworm<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This is not an especially good piece of software, or an especially good robot design. Little to no real thought (let alone research or experimentation) went into determining the dimensions of these body components or the parameters of the code. It is simply an easy jumping off point.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When you walk, you hardly think about coordinating your steps, let alone focus on firing off individual muscles or muscle groups. Can you modify this code so the Inchworm walks more like you, and less like a crippled abomination that should have been a thing of beauty?  Start by revising the code so that a single keystroke results in a single complete step forward. After that, can you make it so that a single keystroke makes it walk until a new input makes it stop? Or walk backwards? Is there a better way to handle turning?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Similarly, over uncounted aeons nature has produced many types of creepy-crawling insects\u2014<a href=\"https:\/\/en.wikipedia.org\/wiki\/Hallucigenia\">some quite stunning<\/a>. Nature has yet to settle on the &#8220;best&#8221; body layout for an inchworm. Should this Inchworm&#8217;s legs be shorter? Or longer? What about the tiller? And why should this worm have only three segments? What else can you do with the foamcore, servos, and Controller pin-outs you have left? Is there anything else kicking around your workbench or junk drawer that should be part of a walking robot?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You&#8217;ve built and tested the&nbsp;Hardware. You&#8217;ve introduced yourself to PyCKBot, and seen how it can Control&nbsp;the servos that will make your robot move. Now let&#8217;s build a body for those guts and get walking. The \u201cbody\u201d of your inchworm is simple, composed of a pair of legs\u2014the \u201cheadfoot\u201d and \u201ctailfoot\u201d\u2014and a \u201ctiller\u201d that joins its two halves so it can turn.&nbsp; You Will Need A marker A hobby knife Packing tape 1\/8&#8243;-thick foamcore A hot glue gun with glue sticks&#8230;<\/p>\n<p class=\"read-more\"><a class=\"btn btn-default\" href=\"https:\/\/mileggedrobots.eecs.umich.edu\/index.php\/create-your-website-with-blocks\/build\/\"> Read More<span class=\"screen-reader-text\">  Read More<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":7,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-119","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/mileggedrobots.eecs.umich.edu\/index.php\/wp-json\/wp\/v2\/pages\/119","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mileggedrobots.eecs.umich.edu\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/mileggedrobots.eecs.umich.edu\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/mileggedrobots.eecs.umich.edu\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mileggedrobots.eecs.umich.edu\/index.php\/wp-json\/wp\/v2\/comments?post=119"}],"version-history":[{"count":23,"href":"https:\/\/mileggedrobots.eecs.umich.edu\/index.php\/wp-json\/wp\/v2\/pages\/119\/revisions"}],"predecessor-version":[{"id":407,"href":"https:\/\/mileggedrobots.eecs.umich.edu\/index.php\/wp-json\/wp\/v2\/pages\/119\/revisions\/407"}],"up":[{"embeddable":true,"href":"https:\/\/mileggedrobots.eecs.umich.edu\/index.php\/wp-json\/wp\/v2\/pages\/7"}],"wp:attachment":[{"href":"https:\/\/mileggedrobots.eecs.umich.edu\/index.php\/wp-json\/wp\/v2\/media?parent=119"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}