{"id":6156,"date":"2021-09-13T15:16:31","date_gmt":"2021-09-13T06:16:31","guid":{"rendered":"http:\/\/zero.globalzeus.com\/?p=6156"},"modified":"2022-10-05T14:38:28","modified_gmt":"2022-10-05T05:38:28","slug":"zra-ex24_circle_move-py","status":"publish","type":"post","link":"http:\/\/zero.globalzeus.com\/en\/zra-ex24_circle_move-py\/","title":{"rendered":"ZRA &#8211; ex24_circle_move.py"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"6156\" class=\"elementor elementor-6156\">\n\t\t\t\t\t\t<div class=\"elementor-inner\">\n\t\t\t\t<div class=\"elementor-section-wrap\">\n\t\t\t\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-1200a6c elementor-section-stretched elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"1200a6c\" data-element_type=\"section\" data-settings=\"{&quot;jet_parallax_layout_list&quot;:[{&quot;jet_parallax_layout_image&quot;:{&quot;url&quot;:&quot;&quot;,&quot;id&quot;:&quot;&quot;},&quot;_id&quot;:&quot;1a4921b&quot;,&quot;jet_parallax_layout_image_tablet&quot;:{&quot;url&quot;:&quot;&quot;,&quot;id&quot;:&quot;&quot;},&quot;jet_parallax_layout_image_mobile&quot;:{&quot;url&quot;:&quot;&quot;,&quot;id&quot;:&quot;&quot;},&quot;jet_parallax_layout_speed&quot;:{&quot;unit&quot;:&quot;%&quot;,&quot;size&quot;:50,&quot;sizes&quot;:[]},&quot;jet_parallax_layout_type&quot;:&quot;scroll&quot;,&quot;jet_parallax_layout_direction&quot;:null,&quot;jet_parallax_layout_fx_direction&quot;:null,&quot;jet_parallax_layout_z_index&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_x&quot;:50,&quot;jet_parallax_layout_bg_x_tablet&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_x_mobile&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_y&quot;:50,&quot;jet_parallax_layout_bg_y_tablet&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_y_mobile&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_size&quot;:&quot;auto&quot;,&quot;jet_parallax_layout_bg_size_tablet&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_size_mobile&quot;:&quot;&quot;,&quot;jet_parallax_layout_animation_prop&quot;:&quot;transform&quot;,&quot;jet_parallax_layout_on&quot;:[&quot;desktop&quot;,&quot;tablet&quot;]}],&quot;background_background&quot;:&quot;classic&quot;,&quot;stretch_section&quot;:&quot;section-stretched&quot;}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-50 elementor-top-column elementor-element elementor-element-4d6f5e4\" data-id=\"4d6f5e4\" data-element_type=\"column\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"jupiter-tooltip-widget elementor-element elementor-element-953aaf9 elementor-aspect-ratio-11 elementor-widget elementor-widget-video\" data-jupiter-tooltip-settings=\"{&quot;tooltip&quot;:&quot;false&quot;,&quot;tooltipDescription&quot;:&quot;This is Tooltip!&quot;,&quot;tooltipPlacement&quot;:&quot;top&quot;,&quot;tooltipArrow&quot;:true,&quot;xOffset&quot;:0,&quot;yOffset&quot;:0,&quot;tooltipAnimation&quot;:&quot;fade&quot;,&quot;tooltipTrigger&quot;:&quot;mouseenter&quot;,&quot;zIndex&quot;:999,&quot;customSelector&quot;:&quot;&quot;,&quot;delay&quot;:0}\" data-id=\"953aaf9\" data-element_type=\"widget\" data-settings=\"{&quot;youtube_url&quot;:&quot;https:\\\/\\\/youtu.be\\\/VJQ39B97nAQ&quot;,&quot;aspect_ratio&quot;:&quot;11&quot;,&quot;video_type&quot;:&quot;youtube&quot;,&quot;controls&quot;:&quot;yes&quot;}\" data-widget_type=\"video.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"elementor-wrapper elementor-fit-aspect-ratio elementor-open-inline\">\n\t\t\t<div class=\"elementor-video\"><\/div>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t<div class=\"elementor-column elementor-col-50 elementor-top-column elementor-element elementor-element-58634d0\" data-id=\"58634d0\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"jupiter-tooltip-widget elementor-element elementor-element-fd41ce6 elementor-widget elementor-widget-code-highlight\" data-jupiter-tooltip-settings=\"{&quot;tooltip&quot;:&quot;false&quot;,&quot;tooltipDescription&quot;:&quot;This is Tooltip!&quot;,&quot;tooltipPlacement&quot;:&quot;top&quot;,&quot;tooltipArrow&quot;:true,&quot;xOffset&quot;:0,&quot;yOffset&quot;:0,&quot;tooltipAnimation&quot;:&quot;fade&quot;,&quot;tooltipTrigger&quot;:&quot;mouseenter&quot;,&quot;zIndex&quot;:999,&quot;customSelector&quot;:&quot;&quot;,&quot;delay&quot;:0}\" data-id=\"fd41ce6\" data-element_type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"prismjs-tomorrow copy-to-clipboard word-wrap\">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-python line-numbers\">\n\t\t\t\t<code readonly=\"true\" class=\"language-python\">\n\t\t\t\t\t<xmp>#!\/usr\/bin\/python\r\n# -*- coding: utf-8 -*-\r\n\r\nfrom i611_extend import *\r\nfrom i611_io import *\r\nfrom i611_MCS import *\r\nfrom i611shm import shm_read \r\n\r\ndef main(): \r\n    ## 1. \ucd08\uae30 \uc124\uc815 ################ \r\n    rb = i611Robot()\r\n    rb.open()\r\n    IOinit(rb)\r\n    rb.enable_interrupt(0,True)     # \ub3d9\uc791 \uc911\uc758\u300c \uac10\uc18d \uc815\uc9c0\u300d\uc785\ub825 \uc2dc\uc758 \uc608\uc678 \ubc1c\uc0dd \ud65c\uc131\ud654\r\n    rb.enable_interrupt(1,True)     # \uc2e4\ud589\uc911\uc778 \ube44\uc0c1 \uc815\uc9c0 \uc785\ub825\uc2dc \uc608\uc678 \ubc1c\uc0dd\uc744 \ud65c\uc131\ud654\ud558\ub824\uba74\r\n\r\n    # \uc624\ubc84\ub77c\uc774\ub4dc\r\n    rb.override( 70 )\r\n\r\n    ## 2. Tool \ucd08\uae30 \uc124\uc815 ################ \r\n    #rb.settool( id=1, offx=0.0, offy=0.0, offz=100.0, offrz=0.0, offry=20, offrx=20 )   # Tool \uc124\uc815 \r\n    #rb.changetool( tid=1 )\r\n\r\n    ## 3. \uad50\uc2dc \ud3ec\uc778\ud2b8 \uc124\uc815 #############\r\n    StartSpeed  = MotionParam(jnt_speed = 40.0, lin_speed = 50.0, acctime = 0.4, dacctime = 0.4, overlap = 1.0, pose_speed = 80) # Speed \uc124\uc815\r\n    StartJoint  = Joint(0, -30, -90, 0, -60, 0)     # \uc2dc\uc791 \uc124\uc815\r\n    rb.motionparam(StartSpeed)                      # Speed \uc14b\ud305  \r\n\r\n    ## 4. \ub3d9\uc791 \uc870\uac74 \uc124\uc815 #############\r\n    rb.move(StartJoint)                         # Start \uc704\uce58 \uc774\ub3d9  \r\n    start_pos = rb.Joint2Position(StartJoint)   # coordinate \ubcc0\uacbd \r\n    start_pos = start_pos.offset(dy=-100)       # offset \uc801\uc6a9\r\n\r\n    try:\r\n        while True:\r\n            ## 5. \ub85c\ubd07 \ub3d9\uc791\uc758 \uc815\uc758 ########## \r\n            p1 = start_pos.offset(dx=100,dy=50) # circle  \uacbd\ub85c1\ubc88 \uc124\uc815\r\n            p2 = start_pos.offset(dx=50,dy=200) # circle  \uacbd\ub85c2\ubc88 \uc124\uc815\r\n\r\n            print 'mode = 0'\r\n            rb.circlemove(p1,p2,0)  # circle \uadf8\ub9ac\uae30, (\uc6d4\ub4dc \uc88c\ud45c \uace0\uc815)\r\n            rb.move(StartJoint)     # \uc2dc\uc791 \uc704\uce58 \uc774\ub3d9\r\n\r\n            print 'mode = 1'\r\n            rb.circlemove(p1,p2,1)  # circle \uadf8\ub9ac\uae30, (rz,ry,rx \uc790\uc138 \uc720\uc9c0)\r\n            rb.move(StartJoint)     # \uc2dc\uc791 \uc704\uce58 \uc774\ub3d9 \r\n\r\n    ## 6. \uc885\ub8cc ################## \r\n    except Robot_emo:\r\n        print \"Program is finish.\"\r\n\r\n    except KeyboardInterrupt:\r\n        rb.abort()\r\n        print \"Stop by Ctrl+C\"\r\n\r\n    finally:\r\n        rb.close()\r\n        \r\nif __name__ == \"__main__\":\r\n    main()\r\n<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-1210eb9 elementor-section-stretched elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"1210eb9\" data-element_type=\"section\" data-settings=\"{&quot;jet_parallax_layout_list&quot;:[{&quot;jet_parallax_layout_image&quot;:{&quot;url&quot;:&quot;&quot;,&quot;id&quot;:&quot;&quot;},&quot;_id&quot;:&quot;1a4921b&quot;,&quot;jet_parallax_layout_image_tablet&quot;:{&quot;url&quot;:&quot;&quot;,&quot;id&quot;:&quot;&quot;},&quot;jet_parallax_layout_image_mobile&quot;:{&quot;url&quot;:&quot;&quot;,&quot;id&quot;:&quot;&quot;},&quot;jet_parallax_layout_speed&quot;:{&quot;unit&quot;:&quot;%&quot;,&quot;size&quot;:50,&quot;sizes&quot;:[]},&quot;jet_parallax_layout_type&quot;:&quot;scroll&quot;,&quot;jet_parallax_layout_direction&quot;:null,&quot;jet_parallax_layout_fx_direction&quot;:null,&quot;jet_parallax_layout_z_index&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_x&quot;:50,&quot;jet_parallax_layout_bg_x_tablet&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_x_mobile&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_y&quot;:50,&quot;jet_parallax_layout_bg_y_tablet&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_y_mobile&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_size&quot;:&quot;auto&quot;,&quot;jet_parallax_layout_bg_size_tablet&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_size_mobile&quot;:&quot;&quot;,&quot;jet_parallax_layout_animation_prop&quot;:&quot;transform&quot;,&quot;jet_parallax_layout_on&quot;:[&quot;desktop&quot;,&quot;tablet&quot;]}],&quot;background_background&quot;:&quot;classic&quot;,&quot;stretch_section&quot;:&quot;section-stretched&quot;}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-c3fd39b\" data-id=\"c3fd39b\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>#!\/usr\/bin\/python # -*- coding: utf-8 -*- from i611_extend import * from i611_io import * from i611_MCS import * from i611shm import shm_read def main(): ## 1. \ucd08\uae30 \uc124\uc815 ################ rb = i611Robot() rb.open() IOinit(rb) rb.enable_interrupt(0,True) # \ub3d9\uc791 \uc911\uc758\u300c \uac10\uc18d \uc815\uc9c0\u300d\uc785\ub825 \uc2dc\uc758 \uc608\uc678 \ubc1c\uc0dd \ud65c\uc131\ud654 rb.enable_interrupt(1,True) # \uc2e4\ud589\uc911\uc778 \ube44\uc0c1 \uc815\uc9c0 \uc785\ub825\uc2dc \uc608\uc678 \ubc1c\uc0dd\uc744 \ud65c\uc131\ud654\ud558\ub824\uba74 # \uc624\ubc84\ub77c\uc774\ub4dc [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"full-width.php","format":"standard","meta":[],"categories":[35],"tags":[],"acf":[],"_links":{"self":[{"href":"http:\/\/zero.globalzeus.com\/en\/wp-json\/wp\/v2\/posts\/6156"}],"collection":[{"href":"http:\/\/zero.globalzeus.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/zero.globalzeus.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/zero.globalzeus.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/zero.globalzeus.com\/en\/wp-json\/wp\/v2\/comments?post=6156"}],"version-history":[{"count":7,"href":"http:\/\/zero.globalzeus.com\/en\/wp-json\/wp\/v2\/posts\/6156\/revisions"}],"predecessor-version":[{"id":7322,"href":"http:\/\/zero.globalzeus.com\/en\/wp-json\/wp\/v2\/posts\/6156\/revisions\/7322"}],"wp:attachment":[{"href":"http:\/\/zero.globalzeus.com\/en\/wp-json\/wp\/v2\/media?parent=6156"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/zero.globalzeus.com\/en\/wp-json\/wp\/v2\/categories?post=6156"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/zero.globalzeus.com\/en\/wp-json\/wp\/v2\/tags?post=6156"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}