{"id":568,"date":"2017-03-24T19:44:49","date_gmt":"2017-03-24T19:44:49","guid":{"rendered":"http:\/\/sar-lab.net\/?page_id=568"},"modified":"2017-03-24T19:44:49","modified_gmt":"2017-03-24T19:44:49","slug":"arc-challenge-software-explanation","status":"publish","type":"page","link":"https:\/\/sar-lab.net\/?page_id=568","title":{"rendered":"ARC Challenge Software Explanation"},"content":{"rendered":"<h1>Behavior of provided software<\/h1>\n<p>The provided starter-project moves the robot as shown in this animation. In includes some body movements and forward crawling. <span style=\"text-decoration: underline;\"><strong>Note, the front of the robot is to the left in all the animations.<\/strong> <\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-600 size-full\" src=\"http:\/\/sar-lab.net\/wp-content\/uploads\/2017\/03\/ARC17-full-sequence.gif\" alt=\"\" height=\"252\" width=\"450\"><\/p>\n<h1>Breakdown of robot body movement function calls<\/h1>\n<p>Below are the main code segments in the demonstration program provided, alongside the movements they result in.<\/p>\n<p>&nbsp; <strong>\/\/ *******************************************************************************************************<\/strong><br \/>\n<strong>\/\/ This code segment is a &#8220;dance&#8221;. With legs planted, the body moves left, back, right, then forward.<\/strong><br \/>\n<strong>\/\/ *******************************************************************************************************<\/strong><br \/>\n&nbsp;&nbsp; &nbsp;move_body_absolute(-move_length, 0, move_up);&nbsp; \/\/moves left: negative on the X-xis<br \/>\n&nbsp;&nbsp; &nbsp;move_body_absolute(0, -move_length, move_up);&nbsp; \/\/moves back: negative on Y-axis<br \/>\n&nbsp;&nbsp; &nbsp;move_body_absolute(move_length, 0, move_up);&nbsp;&nbsp; \/\/ moves right: positive on X-axis<br \/>\n&nbsp;&nbsp; &nbsp;move_body_absolute(0, move_length, move_up);&nbsp; \/\/ moves fowrard: positive on Y-axis<br \/>\n&nbsp;&nbsp;&nbsp; move_body_absolute(0, 0, move_up);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/ moves center: 0 on bot X and Y axes<\/p>\n<p><a href=\"http:\/\/sar-lab.net\/wp-content\/uploads\/2017\/03\/ARC17-dance-translation.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-596\" src=\"http:\/\/sar-lab.net\/wp-content\/uploads\/2017\/03\/ARC17-dance-translation.gif\" alt=\"\" height=\"252\" width=\"450\"><\/a><\/p>\n<p><strong>\/\/ *******************************************************************************************************<\/strong><br \/>\n<strong>\/\/ This code segment is a &#8220;dance&#8221;. With legs planted, the body moves down and up repeatedly.<\/strong><br \/>\n<strong>\/\/ *******************************************************************************************************<\/strong><br \/>\n&nbsp; \/\/ sitting to standing sequence<br \/>\n&nbsp; move_body_absolute(0, 0, 0);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br \/>\n&nbsp; wait_all_reach();&nbsp; &nbsp;<br \/>\n&nbsp; move_body_absolute(0, 0, move_up);<br \/>\n&nbsp; wait_all_reach();&nbsp; &nbsp;<br \/>\n&nbsp; move_body_absolute(0, 0, 0);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br \/>\n&nbsp; wait_all_reach();&nbsp; &nbsp;<br \/>\n&nbsp; move_body_absolute(0, 0, move_up);&nbsp;&nbsp; &nbsp;<br \/>\n&nbsp; wait_all_reach();<br \/>\n&nbsp; move_body_absolute(0, 0, 0);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br \/>\n&nbsp; wait_all_reach();&nbsp; &nbsp;<\/p>\n<p><a href=\"http:\/\/sar-lab.net\/wp-content\/uploads\/2017\/03\/ARC17-dance-vertical.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-597\" src=\"http:\/\/sar-lab.net\/wp-content\/uploads\/2017\/03\/ARC17-dance-vertical.gif\" alt=\"\" height=\"252\" width=\"450\"><\/a><\/p>\n<p><strong>\/\/ ***************************************************************************************** &nbsp;<\/strong><br \/>\n<strong>\/\/ Demonstration of rotation (nodding)<\/strong><br \/>\n<strong>\/\/ ***************************************************************************************** &nbsp;<\/strong><\/p>\n<p>#define rotate_degree 20<\/p>\n<p>&nbsp;&nbsp;&nbsp; move_body_absolute(0, 0, move_up);<br \/>\n&nbsp;&nbsp; &nbsp;delay(200);<\/p>\n<p>&nbsp;&nbsp; &nbsp;rotate_body_absolute_x(-rotate_degree, move_up);&nbsp; \/\/ Nose down (negative rotation on X)<br \/>\n&nbsp;&nbsp; &nbsp;rotate_body_absolute_x(rotate_degree, move_up);&nbsp;&nbsp; \/\/ Nose up (positive rotation on X)<br \/>\n&nbsp;&nbsp; &nbsp;move_body_absolute(0, 0, move_up);<br \/>\n&nbsp;&nbsp; &nbsp;rotate_body_absolute_y(-rotate_degree, move_up); \/\/ Lean left (negative vlalue on Y)<br \/>\n&nbsp;&nbsp; &nbsp;rotate_body_absolute_y(rotate_degree, move_up);&nbsp; \/\/ Lean right (positive value on y)<br \/>\n&nbsp;&nbsp; &nbsp;move_body_absolute(0, 0, move_up);<\/p>\n<p>&nbsp;&nbsp; &nbsp;move_body_absolute(0, 0, 0);<br \/>\n&nbsp;&nbsp; &nbsp;wait_all_reach();<br \/>\n&nbsp;&nbsp; &nbsp;delay(2000);<\/p>\n<p><a href=\"http:\/\/sar-lab.net\/wp-content\/uploads\/2017\/03\/ARC17-dance-rotations.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-595\" src=\"http:\/\/sar-lab.net\/wp-content\/uploads\/2017\/03\/ARC17-dance-rotations.gif\" alt=\"\" height=\"252\" width=\"450\"><\/a><\/p>\n<h1>Demonstration of the crawling sequence<\/h1>\n<p><strong>\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<\/strong><br \/>\n<strong>\/\/ PHASE 1 of gait: forward-left and rear-right legs<\/strong><\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/Move LEG 2 (forward left)<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; move_speed = leg_move_speed;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set_site(2, x_default, 0, z_up);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/ raise it<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wait_all_reach();<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set_site(2, x_default, 2 * y_step, z_up);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/ move it fowrard<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wait_all_reach();<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set_site(2, x_default, 2 * y_step, z_default);&nbsp; \/\/ put it down<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wait_all_reach();<\/p>\n<p><a href=\"http:\/\/sar-lab.net\/wp-content\/uploads\/2017\/03\/ARC17-FL-extend.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-598\" src=\"http:\/\/sar-lab.net\/wp-content\/uploads\/2017\/03\/ARC17-FL-extend.gif\" alt=\"\" height=\"252\" width=\"450\"><\/a><\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/Move body forward &#8211; flexing LEG 2, and extending LEG 1<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; move_speed = body_move_speed;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set_site(0, x_default, 0, z_default);<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set_site(1, x_default, 2 * y_step, z_default);&nbsp;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set_site(2, x_default, y_step, z_default);<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set_site(3, x_default, y_step, z_default);<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wait_all_reach();<\/p>\n<p><a href=\"http:\/\/sar-lab.net\/wp-content\/uploads\/2017\/03\/ARC17-skate-left.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-603\" src=\"http:\/\/sar-lab.net\/wp-content\/uploads\/2017\/03\/ARC17-skate-left.gif\" alt=\"\" height=\"252\" width=\"450\"><\/a><\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/ Move LEG 1&nbsp; (rear right)<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; move_speed = leg_move_speed;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set_site(1, x_default, 2 * y_step, z_up);&nbsp;&nbsp; \/\/ raise it (it&#8217;s extended from the previous step)<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wait_all_reach();<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set_site(1, x_default, 0, z_up);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/ bring it in<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wait_all_reach();<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set_site(1, x_default, 0, z_default);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/ put it down<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wait_all_reach();<\/p>\n<p><a href=\"http:\/\/sar-lab.net\/wp-content\/uploads\/2017\/03\/ARC17-RR-move.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-602\" src=\"http:\/\/sar-lab.net\/wp-content\/uploads\/2017\/03\/ARC17-RR-move.gif\" alt=\"\" height=\"252\" width=\"450\"><\/a><\/p>\n<p><strong>\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<\/strong><br \/>\n<strong>\/\/ PHASE 2 of gait, forward-right and rear-left legs<\/strong><\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/Move LEG 0 (forward right)<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set_site(0, x_default, 0, z_up);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/ raise it<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wait_all_reach();<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set_site(0, x_default, 2 * y_step, z_up);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/ move it forward<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wait_all_reach();<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set_site(0, x_default, 2 * y_step, z_default);&nbsp; \/\/ put it down &nbsp;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wait_all_reach();<\/p>\n<p><a href=\"http:\/\/sar-lab.net\/wp-content\/uploads\/2017\/03\/ARC17-FR-extend.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-599\" src=\"http:\/\/sar-lab.net\/wp-content\/uploads\/2017\/03\/ARC17-FR-extend.gif\" alt=\"\" height=\"252\" width=\"450\"><\/a><\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/Move body forward &#8211; flexing LEG 0, and extending LEG 3<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; move_speed = body_move_speed;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set_site(0, x_default, y_step, z_default);<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set_site(1, x_default, y_step, z_default);<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set_site(2, x_default, 0, z_default);<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set_site(3, x_default, 2 * y_step, z_default);<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wait_all_reach();<\/p>\n<p><a href=\"http:\/\/sar-lab.net\/wp-content\/uploads\/2017\/03\/ARC17-skate-right.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-594\" src=\"http:\/\/sar-lab.net\/wp-content\/uploads\/2017\/03\/ARC17-skate-right.gif\" alt=\"\" height=\"252\" width=\"450\"><\/a><\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/ Move LEG 3 (rear left)<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; move_speed = leg_move_speed; &nbsp;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set_site(3, x_default, 2 * y_step, z_up);&nbsp;&nbsp; \/\/&nbsp; raise it (it&#8217;s extended from previous step)<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wait_all_reach();<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set_site(3, x_default, 0, z_up);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/&nbsp; bring it in<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wait_all_reach();<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set_site(3, x_default, 0, z_default);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/\/&nbsp; put it down<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wait_all_reach();<\/p>\n<p><a href=\"http:\/\/sar-lab.net\/wp-content\/uploads\/2017\/03\/ARC17-RL-move.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-601\" src=\"http:\/\/sar-lab.net\/wp-content\/uploads\/2017\/03\/ARC17-RL-move.gif\" alt=\"\" height=\"252\" width=\"450\"><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Behavior of provided software The provided starter-project moves the robot as shown in this animation. In includes some body movements and forward crawling. Note, the front of the robot is to the left in all the animations. Breakdown of robot body movement function calls Below are the main code segments in the demonstration program provided, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"ngg_post_thumbnail":0,"footnotes":"","_links_to":"","_links_to_target":""},"class_list":["post-568","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/sar-lab.net\/index.php?rest_route=\/wp\/v2\/pages\/568","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sar-lab.net\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/sar-lab.net\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/sar-lab.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sar-lab.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=568"}],"version-history":[{"count":0,"href":"https:\/\/sar-lab.net\/index.php?rest_route=\/wp\/v2\/pages\/568\/revisions"}],"wp:attachment":[{"href":"https:\/\/sar-lab.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=568"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}