2018a/Member/montbell/Mission2
¤ò¥Æ¥ó¥×¥ì¡¼¥È¤Ë¤·¤ÆºîÀ®
[
¥È¥Ã¥×
] [
¿·µ¬
|
°ìÍ÷
|
¸¡º÷
|
ºÇ½ª¹¹¿·
|
¥Ø¥ë¥×
|
¥í¥°¥¤¥ó
]
³«»Ï¹Ô:
*Ìܼ¡ [#e1e7976c]
#contents
Á°²ó¤Î²ÝÂê
[[2018a/Member/montbell/Mission1]]
*²ÝÂê¶¡§¥é¥¤¥ó¥È¥ì¡¼¥µ¡¼ [#de3e13ad]
º£²ó¤Î²ÝÂê¤Ï»ØÄꤵ¤ì¤¿¥³¡¼¥¹¤ò³Æ¥Á¡¼¥à¤ÇºîÀ®¤·¡¢¡Ö¥ß¥Ã¥·¥ç¥ó¡×¤ò¿ë¹Ô¤¹¤ë¤¿¤á¤Î¥í¥Ü¥Ã¥È¤òºîÀ®¤¹¤ë¤³¤È¤Ç¤¢¤ë¡£¥ß¥Ã¥·¥ç¥ó¤È¤ÏÂè°ì¥³¡¼¥¹¡¢¤â¤·¤¯¤ÏÂèÆó¥³¡¼¥¹¤Ç¹õ¤¤Àþ¤Ë±è¤Ã¤ÆÆ°¤¡¢350ml¤Î¶õ¤´Ì¤ò°Üư¤µ¤»¤ë¤³¤È¤Ç¤¢¤ë¡£»ä¤ÏÂè°ì¥³¡¼¥¹¤òÁªÂò¤·¤¿¤Î¤Ç¤½¤Î½çÏ©¤ò²¼¤Ë¼¨¤¹¡£
&ref(2018a/Member/montbell/Mission2/2018a-mission2.png,70%,Mission2 );
¡Ê¥ª¥ì¥ó¥¸¤¬½çÏ©¡¢ÎФ¬´Ì¤ò½¦¤¦°ÌÃÖ¡¢»ç¤¬´Ì¤òÃÖ¤¯°ÌÃÖ¤ò¼¨¤·¤Æ¤¤¤ë¡Ë
*¶íÂÎËÜÂÎ [#tea846eb]
**³ÆÉô̾¾Î [#k85dc485]
&ref(2018a/Member/montbell/Mission2/IMG_20180719_001833.jpg,30%,Mission2 );
&ref(2018a/Member/montbell/Mission2/IMG_20180719_001944.jpg,30%,Mission2 );
&ref(2018a/Member/montbell/Mission2/IMG_20180719_002013.jpg,30%,Mission2 );
¡mA = MediumMotor('outA')
¡¡¡¡
¡¡¡¡´Ì¤ò¥¥ã¥Ã¥Á¤¹¤ë¥¢¡¼¥à¤òưºî¤µ¤»¤ë¤¿¤á¤Î¥ß¥Ç¥£¥¢¥à¥â¡¼¥¿¡£¥â¡¼¥¿¤Î²óž¤ò¥¢¡¼¥à¤ËÅÁ¤¨¤ëµ¡¹½¤ÏMission1¤ÎÀÖ¤Ù¤³¥Ø¥Ã¥É¤ÈƱ¤¸¤¿¤á¾ÜºÙ¤Ï¾Êά¤¹¤ë¡£
¢mR = LargeMotor('outB')
¡¡¡¡¿Ê¹ÔÊý¸þ±¦Â¦¤Î¥´¥à¥¿¥¤¥ä¤òư¤«¤¹¥é¡¼¥¸¥â¡¼¥¿¡¼¡£
£mL = LargeMotor('outC')
¡¡¡¡¿Ê¹ÔÊý¸þº¸Â¦¤Î¥´¥à¥¿¥¤¥ä¤òư¤«¤¹¥é¡¼¥¸¥â¡¼¥¿¡¼¡£
¤cs = ColorSensor('in1')
¡¡¡¡ÃÏÌ̤理òȽÊ̤¹¤ë¥»¥ó¥µ¡£¤³¤ì¤ò»ÈÍѤ·¹õ¤¤Àþ¤òȽÊ̤µ¤»¤ë¡£
**¥«¥é¡¼¥»¥ó¥µ¡¼¤Î¼è¤êÉÕ¤±°ÌÃ֤ˤĤ¤¤Æ [#a73e0e8e]
»ä¤¿¤Á¤ÏºÇ½é¥«¥é¡¼¥»¥ó¥µ¤ò¾å¤Î¼Ì¿¿¤ÎⒶ¤Î°ÌÃ֤˼è¤êÉÕ¤±¤Æ¤¤¤¿¡£¤³¤ì¤Ï¥»¥ó¥µ¡¼¤Î°ÌÃÖ¤ò¤Ç¤¤ë¤À¤±Á°Îؤμּ´¤Î¶á¤¯¤Ë¤¹¤ë¤³¤È¤ÇµÞ¥«¡¼¥Ö¤Ç¤â¥¹¥à¡¼¥º¤Ëưºî¤¹¤ë¥í¥Ü¥Ã¥È¤òºî¤ë¤³¤ÈÁÀ¤Ã¤¿¤â¤Î¤À¤Ã¤¿¡£¤·¤«¤·¾®²ó¤ê¤¬Íø¤¤¹¤®¤ë¤¿¤á°ìÅÙ¥³¡¼¥¹¤«¤é³°¤ì¤ë¤È¡¢¥³¡¼¥¹¤ËÉüµ¢¤·¤¿ºÝ¿ÊÆþ³ÑÅÙ¤¬µÞ¤Ë¤Ê¤ê¸òº¹ÅÀ¤È¸íǧ¼±¤¹¤ë¤³¤È¤¬Â¿¤«¤Ã¤¿¡£¤½¤³¤Ç¤¢¤¨¤Æ¶îÆ°ÎØ¤Î¼Ö¼´¤«¤éÎ¥¤ì¤¿º£¤Î°ÌÃ֤˰ܤ¹¤³¤È¤Ç¾¯¤·¤Îư¤¤Ç¥»¥ó¥µ¡¼¤¬¥³¡¼¥¹¾å¤ËÉüµ¢¤Ç¤¤ë¤è¤¦²þ½¤¤ò¹Ô¤Ã¤¿¡£
¡¡¤Þ¤¿²þ½¤¸å¥«¥é¡¼¥»¥ó¥µ¡¼¤Î¸ÇÄ꤬´Å¤¯»þ¤Ë¤è¤Ã¤ÆÃͤ¬ÊѲ½¤·¤Æ¤·¤Þ¤¦ÉÔ¶ñ¹ç¤¬È¯À¸¤·¤Æ¤·¤Þ¤Ã¤¿¡£¤½¤³¤Ç¥«¥é¡¼¥»¥ó¥µ¤ò¤è¤ê¶¯¸Ç¤Ë¸ÇÄꤹ¤ë¤è¤¦¹©Éפ·¤¿¡£
**´Ì¤ò¤Ä¤«¤àµ¡¹½¤Ë¤Ä¤¤¤Æ [#b6810553]
¤³¤Î¥í¥Ü¥Ã¥È¤Ç¤Ï´Ì¤Ë°Ï¤¤¤òÈ碌¤ë·Á¤Ç´Ì¤Î¥¥ã¥Ã¥Á¤ò¹Ô¤Ã¤¿¡£¶ñÂÎŪ¤Ë¤ÏÁ°²ó¤Î²ÝÂê¤ÇÀÖ¤Ù¤³¥Ø¥Ã¥É¤ò²ÔƯ¤µ¤»¤ëµ¡¹½¤òήÍѤ·¤¿¤â¤Î¤ò»ÈÍѤ·ÏĤó¤À»Í³Ñ·Á¤Î·Á¤ò¤·¤¿¥¢¡¼¥à¤ò²¼¤í¤·¤Æ¤¤¤ë¡£¤³¤Î¥¢¡¼¥à¤ÏÂ礤á¤Ëºî¤é¤ì¤Æ¤ª¤ê¡¢¤Þ¤¿Ä¾Á°¤Ë¾¯¤·¥¢¡¼¥à¤òÅݤ·¤Æ¤ª¤¯¤³¤È¤Ç¤ï¤¶¤ï¤¶¥³¡¼¥¹¤òΥæ¤·¤Ê¤¯¤Æ¤â´Ì¤ò¥¥ã¥Ã¥Á¤Ç¤¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤ë¡£¤Þ¤¿¥¢¡¼¥à¤Î·Á¤¬ÏĤó¤Ç¤¤¤ë¤Î¤Ï´Ì¤òÃÖ¤¯Ä¾Á°¤Ë¥í¥Ü¥Ã¥È¤¬Àû²ó¤¹¤ë¤È¤´Ì¤¬¾å¤«¤é¸«¤Æ±¦¾å¤Ëư¤¤¤ÆÍè¤ë¤è¤¦¤Ë¤¹¤¿¤á¤Ç¤¢¤ë¡£¤³¤ì¤Ë¤è¤ê´Ì¤ò±ß¤Î¤è¤êÃæ±û¤ËÃÖ¤¯¤³¤È¤¬¤Ç¤¤ë¡£¤Þ¤¿´Ì¤òÎ¥¤·¤¿¸å¤ËËÜÂΤ¬Àû²ó¤¹¤ë¤¬¤½¤Î¤È¤¤ËËÜÂΤ¬´Ì¤ËÀÜ¿¨¤¹¤ë¤Î¤òËɤ°¸ú²Ì¤â¤¢¤ë¡£
*¥×¥í¥°¥é¥à [#b79376de]
**¸òº¹ÅÀ¤Î¼±ÊÌÊýË¡ [#v3b9b597]
º£²ó¤Î²ÝÂê¤ÎºÇÂç¤ÎÊɤϸòº¹ÅÀ¤ò¤¤¤«¤Ë¤·¤ÆÇ§¼±¤¹¤ë¤Ç¤·¤¿¡£¤½¤³¤Çº£²ó¤Ï¥é¥¤¥ó¥È¥ì¡¼¥¹¤Î´Ø¿ô¤Ë¤ª¤¤¤Æ°ìÄê»þ´Ö°Ê¾å¹õ¤¤Éôʬ¤òÁö¹Ô¤·¤¿¾ì¹ç¤Ë´Ø¿ô¤¬½ªÎ»¤¹¤ë»ÅÁȤߤˤ·¤Þ¤·¤¿¡£°Ê²¼¤Ï¤½¤Î¥¢¥ë¥´¥ê¥º¥à¤ò¥Õ¥í¡¼¥Á¥ã¡¼¥È¤Çɽ¤·¤¿¤â¤Î¤Ç¤¹¡£¤³¤³¤ÇItime¤Ï¹õ¤¤Éôʬ¤ò²¿ÉÃÄ̲ᤷ¤¿¤é¸òº¹ÅÀ¤Èǧ¼±¤¹¤ë¤«¤òɽ¤·¤Æ¤¤¤ë¡£
&ref(2018a/Member/montbell/Mission2/¥×¥í¥È¥³¥ë.JPG,70%,Mission2 );
**´Ø¿ô...¤ÎÁ°¤Ë [#bb49b518]
¤Þ¤º¼¡¤Îʸ¾Ï¤ò¥×¥í¥°¥é¥à¤·¤Þ¤·¤¿¡£ÀâÌÀ¤Ï¾Êά¤·¤Þ¤¹¡£
#!/usr/bin/env python3
from ev3dev.ev3 import *
from time import sleep
mA = MediumMotor('outA')
mR = LargeMotor('outB')
mL = LargeMotor('outC')
cs = ColorSensor('in1')
cs.mode = 'COL-REFLECT'
Itime = 0.491
mR.reset()
mL.reset()
**´Ø¿ô [#me652ce4]
´Ø¿ô¤òºîÀ®¤·¤Þ¤¹¡£
:¥í¥Ü¥Ã¥È¤ò´õ˾¤¹¤ëÊý¸þ¤ØÆ°¤«¤¹´Ø¿ô|
Í¿¤¨¤é¤ì¤¿¿ôÃͤÀ¤±Æ°¤«¤¹
def move_position(R,L):
mR.run_to_rel_pos(position_sp=R, speed_sp=130, stop_action='brake')
mL.run_to_rel_pos(position_sp=L, speed_sp=130, stop_action='brake')
ľ¿Ê
def move_foward():
mR.run_forever(speed_sp=140, stop_action='brake')
mL.run_forever(speed_sp=140, stop_action='brake')
´Ë¤ä¤«¤Ë±¦
def move_right1():
mR.run_forever(speed_sp=60, stop_action='brake')
mL.run_forever(speed_sp=100, stop_action='brake')
±¦¤Ë¶Ê¤¬¤ë
def move_right2():
mR.run_forever(speed_sp=35, stop_action='brake')
mL.run_forever(speed_sp=100, stop_action='brake')
±¦µÞ¥«¡¼¥Ö
def move_right3():
mR.run_forever(speed_sp=-55, stop_action='brake')
mL.run_forever(speed_sp=90, stop_action='brake')
´Ë¤ä¤«¤Ëº¸
def move_left1():
mR.run_forever(speed_sp=100, stop_action='brake')
mL.run_forever(speed_sp=60, stop_action='brake')
º¸¤Ë¶Ê¤¬¤ë
def move_left2():
mR.run_forever(speed_sp=100, stop_action='brake')
mL.run_forever(speed_sp=35, stop_action='brake')
º¸µÞ¥«¡¼¥Ö
def move_left3():
mR.run_forever(speed_sp=90, stop_action='brake')
mL.run_forever(speed_sp=-55, stop_action='brake')
Ää»ß
def stop():
mR.run_timed(time_sp=0, speed_sp=0, stop_action='coast')
mL.run_timed(time_sp=0, speed_sp=0, stop_action='coast')
:¥¢¡¼¥à¤òư¤«¤¹´Ø¿ô|
Àµ¤ÎÃͤDz¼¤²¡¢Éé¤ÎÃͤǾ夲¤ë¡£
def armturn(t):
mA.run_to_rel_pos(position_sp=t, speed_sp=70, stop_action='brake')
sleep(1)
:¥é¥¤¥ó¤Î±¦Â¦¤ò¥È¥ì¡¼¥¹¤¹¤ë´Ø¿ô|
&ref(2018a/Member/montbell/Mission2/IMG_20180815_212749.png,18%,Mission2 );
¤³¤³¤Ç¤Ï¥«¥é¡¼¥»¥ó¥µ¤ÎÃͤˤè¤Ã¤Æ¥í¥Ü¥Ã¥È¤Î¿Ê¤ßÊý¤ò£·Ãʳ¬¤Ëʬ¤±¤Æ¥é¥¤¥ó¥È¥ì¡¼¥¹¤ò¹Ô¤Ã¤Æ¤¤¤Þ¤¹¡£¹õ¤¤Éôʬ¤ò°ìÄê»þ´Ö(Itime)°Ê¾åÄ̲᤹¤ë¤È¤³¤Î´Ø¿ô¤Ï½ªÎ»¤·¤Þ¤¹¡£
def toresu_right():
t0 = time.time()
while time.time() - t0 < Itime:
if 75 < cs.value(0):
t0 = time.time()
if 60 < cs.value(0) < 75:
move_left2()
t0 = time.time()
if 50 < cs.value(0) < 60:
move_left1()
t0 = time.time()
if 45 < cs.value(0) < 50:
move_foward()
t0 = time.time()
if 40 < cs.value(0) < 45:
move_right1()
t0 = time.time()
if 35 < cs.value(0) < 40:
move_right2()
if cs.value(0) < 35:
move_right3()
:¥é¥¤¥ó¤Îº¸Ã¼¤ò¥È¥ì¡¼¥¹¤¹¤ë´Ø¿ô|
¥é¥¤¥ó¤Î±¦Â¦¤ò¥È¥ì¡¼¥¹¤¹¤ë´Ø¿ô¤ÈƱ¤¸¥×¥í¥È¥³¥ë¤Ç¿Ê¤à¸þ¤¤¬º¸±¦È¿Å¾¤·¤Æ¤¤¤ë¡£
def toresu_left():
t0 = time.time()
while time.time() - t0 < Itime:
while 75 < cs.value(0):
move_right3()
t0 = time.time()
while 60 < cs.value(0) < 75:
move_right2()
t0 = time.time()
while 50 < cs.value(0) < 60:
move_right1()
t0 = time.time()
while 45 < cs.value(0) < 50:
move_foward()
t0 = time.time()
while 40 < cs.value(0) < 45:
move_left1()
while 35 < cs.value(0) < 40:
move_left2()
while cs.value(0) < 35:
move_left3()
:¥í¥Ü¥Ã¥È¤òº¸¥È¥ì¡¼¥¹¤ËÉüµ¢¤µ¤»¤ë´Ø¿ô|
run_to_rel_pos¤ò»ÈÍѤ·¥í¥Ü¥Ã¥È¤ÎÂÎÀª¤òÀ°¤¨¤¿¤¦¤¨¤Ç¹õ¤¤¥é¥¤¥ó¤ò¸«¤Ä¤±¤ë¤Ç´Ë¤ä¤«¤Ë±¦¤Ë¶Ê¤¬¤ê¤Ê¤¬¤é¿Ê¤à¡£
def return_toresu_left(R,L):
mR.run_to_rel_pos(position_sp=R, speed_sp=100, stop_action='brake')
mL.run_to_rel_pos(position_sp=L, speed_sp=100, stop_action='brake')
sleep(3.5)
while cs.value(0) > 45:
move_right1()
:¥í¥Ü¥Ã¥È¤ò±¦¥È¥ì¡¼¥¹¤ËÉüµ¢¤µ¤»¤ë´Ø¿ô|
¥í¥Ü¥Ã¥È¤òº¸¥È¥ì¡¼¥¹¤ËÉüµ¢¤µ¤»¤ë´Ø¿ô¤ÈƱ¤¸¥×¥í¥È¥³¥ë¤Ç¿Ê¤à¸þ¤¤¬º¸±¦È¿Å¾¤·¤Æ¤¤¤ë¡£
def return_toresu_right(R,L):
mR.run_to_rel_pos(position_sp=R, speed_sp=100, stop_action='brake')
mL.run_to_rel_pos(position_sp=L, speed_sp=100, stop_action='brake')
sleep(6.5)
while cs.value(0) > 45:
move_left1()
:¥í¥Ü¥Ã¥È¤ò¥µ¡¼¥¯¥ë¾å¤Ç±¦¥È¥ì¡¼¥¹¤ËÉüµ¢¤µ¤»¤ë´Ø¿ô|
¸òº¹ÅÀL¤äK¤Ê¤É¤Ç»ÈÍѤ¹¤ë¡£run_to_rel_pos¤Ç¸òº¹ÅÀ¤ò¾è¤ê±Û¤¨¤Æ¤«¤é¥µ¡¼¥¯¥ë¤Ë¤Ê¤Ã¤Æ¤¤¤ë¹õ¤¤¥é¥¤¥ó¤ò¸«¤Ä¤±¤ë¤Þ¤ÇµÞ·ã¤Ëº¸¤Ø¶Ê¤¬¤ê³¤±¤ë¡£
def return_circle_right():
mR.run_to_rel_pos(position_sp=180, speed_sp=80, stop_action='brake')
mL.run_to_rel_pos(position_sp=0, speed_sp=80, stop_action='brake')
sleep(4)
while cs.value(0) > 40:
mR.run_forever(speed_sp=100, stop_action='brake')
mL.run_forever(speed_sp=0, stop_action='brake')
:¥í¥Ü¥Ã¥È¤ò¥µ¡¼¥¯¥ë¾å¤Çº¸¥È¥ì¡¼¥¹¤ËÉüµ¢¤µ¤»¤ë´Ø¿ô|
¥í¥Ü¥Ã¥È¤ò¥µ¡¼¥¯¥ë¾å¤Ç±¦¥È¥ì¡¼¥¹¤ËÉüµ¢¤µ¤»¤ë´Ø¿ô¤ÈƱ¤¸¥×¥í¥È¥³¥ë¤Ç¿Ê¤à¸þ¤¤¬º¸±¦È¿Å¾¤·¤Æ¤¤¤ë¡£
def return_circle_left():
mL.run_to_rel_pos(position_sp=180, speed_sp=80, stop_action='brake')
mR.run_to_rel_pos(position_sp=0, speed_sp=80, stop_action='brake')
sleep(4)
while cs.value(0) > 40:
mL.run_forever(speed_sp=100, stop_action='brake')
mR.run_forever(speed_sp=0, stop_action='brake')
:¥í¥Ü¥Ã¥È¤òÇò¤¤¥¨¥ê¥¢¤Ë½Ð¤ë¤Þ¤Çº¸¤ËµÞÀû²ó¤µ¤»¤ë´Ø¿ô|
¤ª¤â¤Ë¸òº¹ÅÀD¤Ç»ÈÍѤ¹¤ë¤¿¤á¤ËºîÀ®¤·¤¿¡£¸òº¹ÅÀ¤«¤éÈ´¤±½Ð¤¹ºÝ¤ËƱ¤¸¸òº¹ÅÀ¤òºÆÅÙǧ¼±¤·¤Æ¤·¤Þ¤¦¤³¤È¤òËɤ°¤³¤È¤¬¤Ç¤¤ë¡£¤³¤Î¤³¤È¤¬¸å¤«¤éʬ¤«¤Ã¤¿¤¿¤á¿ÍѤ·¤Æ¤¤¤ë¡£Èó¾ï¤ËÌò¤ËΩ¤Ä¡£
def return_circle_right_W():
while cs.value(0) < 45:
mR.run_forever(speed_sp=80, stop_action='brake')
mL.run_forever(speed_sp=-30, stop_action='brake')
:¥í¥Ü¥Ã¥È¤òÇò¤¤¥¨¥ê¥¢¤Ë½Ð¤ë¤Þ¤Ç±¦¤ËµÞÀû²ó¤µ¤»¤ë´Ø¿ô|
¾åµ¤Î´Ø¿ô¤¬Èó¾ï¤ËÌòΩ¤Ä¤³¤È¤¬È½ÌÀ¤·¤¿¤¿¤áºîÀ®¤·¤¿¡£¾åµ¤Î´Ø¿ô¤ÈƱ¤¸¥×¥í¥È¥³¥ë¤Ç¿Ê¤à¸þ¤¤¬º¸±¦È¿Å¾¤·¤Æ¤¤¤ë¡£
def return_circle_left_W():
while cs.value(0) < 45:
mR.run_forever(speed_sp=-30, stop_action='brake')
mL.run_forever(speed_sp=80, stop_action='brake')
:¥È¥ì¡¼¥¹¤¹¤ëü¤òÀÚ¤êÂØ¤¨¤ë´Ø¿ô|
¸òº¹ÅÀG¤òÄ̲á¸å¤Ë¡¢º¸¥È¥ì¡¼¥¹¤«¤é±¦¥È¥ì¡¼¥¹¤ËÀÚ¤êÂØ¤¨¤ë¤¿¤á¤À¤±¤Ëºî¤Ã¤¿´Ø¿ô¡£°ìÄêµ÷Î¥Áö¹Ô¤Î¸å¡¢Çò¤¤¥¨¥ê¥¢¤Ë½Ð¤ë¤Þ¤Çľ¿Ê¤¹¤ë¡£
def return_circle_foward_W():
mR.run_to_rel_pos(position_sp=60, speed_sp=80, stop_action='brake')
mL.run_to_rel_pos(position_sp=60, speed_sp=80, stop_action='brake')
sleep(2)
while cs.value(0) < 45:
mR.run_forever(speed_sp=50, stop_action='brake')
mL.run_forever(speed_sp=50, stop_action='brake')
**¼ÂºÝ¤ËÁö¹Ô¤µ¤»¤ë¤¿¤á¤Î¥×¥í¥°¥é¥à [#w11dd679]
return_toresu_left(360,360) ¡¡¡¡//¥¹¥¿¡¼¥È°ÌÃÖA¤òÆÍÇˤ·º¸¥È¥ì¡¼¥¹¥È¥ì¡¼¥¹¤Ë°Ü¹Ô
toresu_left()
stop()
sleep(2)
return_toresu_left(0,240)¡¡¡¡¡¡¡¡¡¡¡¡ //¸òº¹ÅÀC¤òÆÍÇË
toresu_left()
stop()
armturn(110)¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ ¡¡//¡¦¡¦¡¦¡¦¡¦¡
sleep(1)
return_circle_right_W()¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡
toresu_left()
stop()¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ //¸òº¹ÅÀD
sleep(3)
armturn(25)¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ //´Ì¤ò¥¥ã¥Ã¥Á
sleep(1)
return_circle_right_W()
toresu_left()
return_circle_left()¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ //¸òº¹ÅÀE
toresu_left()
stop()
sleep(3) ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ //¸òº¹ÅÀF
return_circle_right_W()
toresu_left()
stop()¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ //¸òº¹ÅÀG
sleep(3)
return_circle_foward_W()¡¡¡¡¡¡¡¡¡¡¡¡¡¡//º¸¥È¥ì¡¼¥¹¤«¤é±¦¥È¥ì¡¼¥¹¤ËÀÚ¤êÂØ¤¨
toresu_right()
stop()
sleep(1)
return_circle_left_W()¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡//ľ³Ñ¥«¡¼¥Ö
toresu_right()
toresu_right()
return_circle_right_W() ¡¡¡¡¡¡¡¡¡¡¡¡¡¡//£²¸ÄÌܤΥإ¢¥Ô¥ó¥«¡¼¥Ö¤Çº¸¥È¥ì¡¼¥¹¤Ë°Ü¹Ô
toresu_left()
stop()¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ //¸òº¹ÅÀH
sleep(3)
return_toresu_left(-290,0)
return_circle_left_W()¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ //¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢
toresu_right()
return_circle_left_W()¡¡ ¡¡¡¡¡¡¡¡¡¡¡¡¡¡//¸òº¹ÅÀI
stop()
sleep(3)
toresu_right()
return_circle_right()¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡//¸òº¹ÅÀL
toresu_right()
return_circle_right()¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡//¸òº¹ÅÀK
toresu_right()
stop()
sleep(3)¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ //¸òº¹ÅÀJ
move_position(185,-345) ¡¡¡¡¡¡¡¡¡¡¡¡¡¡//Y¤Ë´Ì¤òÃÖ¤¤Ë¹Ô¤¯
sleep(3)
armturn(-140)¡¡¡¡¡¡¡¡¡¡¡¡¡¡ ¡¡¡¡¡¡¡¡¡¡¡¡//´Ì¤ò¥ê¥ê¡¼¥¹
stop()
sleep(2)
return_toresu_right(-60,-625)¡¡ ¡¡¡¡//JB´Ö¤Îº¸¥È¥ì¡¼¥¹¤ËÉüµ¢
return_circle_right_W()
toresu_left()
stop()
sleep(3)¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ ¡¡//¸òº¹ÅÀB
return_circle_right_W()¡¡
toresu_left()
stop()
sleep(1)
move_position(230,1100)¡¡¡¡¡¡¡¡¡¡¡¡ ¡¡//¥¾¡¼¥óA¤ËÃó¼Ö
sleep(8)
stop()
:¡¤Ë¤Ä¤¤¤Æ|
´Ì¤ò¥¥ã¥Ã¥Á¤¹¤ëºÝ¤ËǺ¤Þ¤µ¤ì¤¿¤Î¤Ï¸òº¹ÅÀD¤Ë¤ª¤¤¤Æ¥í¥Ü¥Ã¥È¤¬°ì»þÄä»ß¤¹¤ë¤È¤¤Î¼ÖÂΤθþ¤¤¬°ìÄê¤Ç¤Ï¤Ê¤¤¤³¤È¤À¤Ã¤¿¡£¤½¤³¤Ç¡¤Çͽ¤á¥¢¡¼¥à¤òÅݤ·¤Æ¤ª¤¯¤³¤È¤Ç¡¢¤¦¤Þ¤¯´Ì¤òÀµÌ̤ˤȤ館¤é¤ì¤º¤È¤â¥¢¡¼¥à¤Ë´Ì¤¬°ú¤Ã¤«¤«¤ë¤³¤È¤Ç¥¥ã¥Ã¥Á¤Ç¤¤ë¤è¤¦¤Ë¤·¤¿¡£
:¢¤Ë¤Ä¤¤¤Æ|
¤³¤³¤Ç¤Ï¸òº¹ÅÀH¤Ø¤Î¿ÊÆþ³ÑÅ٤ˤè¤Ã¤Æ¤ÏIH´Ö¤Ø¤ÎÉüµ¢¤ÎºÝ¥³¡¼¥¹¤ËÂФ·¤ÆÆß³Ñ¤Ë¿¯Æþ¤·¤Æ¤·¤Þ¤¦¤³¤È¤¬¤¢¤Ã¤¿¡£return_circle_left_W()¤ò»ÈÍѤ¹¤ë¤³¤È¤Ë¤è¤ê¤¹¤°¤Ë¸òº¹ÅÀ¤È¤Î¸íǧ¼±¤Ï¤Ê¤¯¤Ê¤Ã¤¿¤¬¡¢ËÜÈ֤ǤÏIH´Ö¤Ø¤Î¿ÊÆþ¸å¤Î±¦¥È¥ì¡¼¥¹¤¬ÉÔ°ÂÄê¤Ë¤Ê¤ê¸òº¹ÅÀ¤È¸íǧ¼±¤·¤Æ¤·¤Þ¤Ã¤¿¡£
*ºÇ¸å¤Ë [#s74396f3]
¡¡º£²ó¤Î²ÝÂê¤ÏͽÁ۰ʾå¤ËÆñ¤·¤¯¤Û¤È¤ó¤ÉͽÄêÄ̤ê¤Ë¤¤¤«¤Ê¤«¤Ã¤¿¡£¤Þ¤¿¥È¥ì¡¼¥¹¼«ÂΤϤǤ¤Æ¤â¸òº¹ÅÀǧ¼±¤Î¥¢¥ë¥´¥ê¥º¥à¤ò¹Í¤¨¤ë¤³¤È¤¬¤Ç¤¤ºÀèÀ¸¤ÎÎϤò¼Ú¤ê¤Æ¤·¤Þ¤Ã¤¿¡£¤½¤ì¤À¤±»þ´Ö¤«¤±¤Æ¤â
¿®ÍêÀ¤Î¤¢¤ë´°À®·Á¤òºî¤ë¤³¤È¤¬¤Ç¤¤º¡¢ËÜÈ֤Ǥϸòº¹ÅÀ¤Î¸íǧ¼±¤¬È¯À¸¤·¤Æ¤·¤Þ¤¤´°Á´¼«Æ°¤Ç²ÝÂê¤òãÀ®¤Ç¤¤Ê¤«¤Ã¤¿¤Î¤ÏÈó¾ï¤Ë²ù¤·¤¤¡£¼¡²ó¤Ï¤â¤Ã¤ÈÀ®¸ù³ÎΨ¤Î¹â¤¤¥í¥Ü¥Ã¥È¤òºî¤ê¤¿¤¤¡£
½ªÎ»¹Ô:
*Ìܼ¡ [#e1e7976c]
#contents
Á°²ó¤Î²ÝÂê
[[2018a/Member/montbell/Mission1]]
*²ÝÂê¶¡§¥é¥¤¥ó¥È¥ì¡¼¥µ¡¼ [#de3e13ad]
º£²ó¤Î²ÝÂê¤Ï»ØÄꤵ¤ì¤¿¥³¡¼¥¹¤ò³Æ¥Á¡¼¥à¤ÇºîÀ®¤·¡¢¡Ö¥ß¥Ã¥·¥ç¥ó¡×¤ò¿ë¹Ô¤¹¤ë¤¿¤á¤Î¥í¥Ü¥Ã¥È¤òºîÀ®¤¹¤ë¤³¤È¤Ç¤¢¤ë¡£¥ß¥Ã¥·¥ç¥ó¤È¤ÏÂè°ì¥³¡¼¥¹¡¢¤â¤·¤¯¤ÏÂèÆó¥³¡¼¥¹¤Ç¹õ¤¤Àþ¤Ë±è¤Ã¤ÆÆ°¤¡¢350ml¤Î¶õ¤´Ì¤ò°Üư¤µ¤»¤ë¤³¤È¤Ç¤¢¤ë¡£»ä¤ÏÂè°ì¥³¡¼¥¹¤òÁªÂò¤·¤¿¤Î¤Ç¤½¤Î½çÏ©¤ò²¼¤Ë¼¨¤¹¡£
&ref(2018a/Member/montbell/Mission2/2018a-mission2.png,70%,Mission2 );
¡Ê¥ª¥ì¥ó¥¸¤¬½çÏ©¡¢ÎФ¬´Ì¤ò½¦¤¦°ÌÃÖ¡¢»ç¤¬´Ì¤òÃÖ¤¯°ÌÃÖ¤ò¼¨¤·¤Æ¤¤¤ë¡Ë
*¶íÂÎËÜÂÎ [#tea846eb]
**³ÆÉô̾¾Î [#k85dc485]
&ref(2018a/Member/montbell/Mission2/IMG_20180719_001833.jpg,30%,Mission2 );
&ref(2018a/Member/montbell/Mission2/IMG_20180719_001944.jpg,30%,Mission2 );
&ref(2018a/Member/montbell/Mission2/IMG_20180719_002013.jpg,30%,Mission2 );
¡mA = MediumMotor('outA')
¡¡¡¡
¡¡¡¡´Ì¤ò¥¥ã¥Ã¥Á¤¹¤ë¥¢¡¼¥à¤òưºî¤µ¤»¤ë¤¿¤á¤Î¥ß¥Ç¥£¥¢¥à¥â¡¼¥¿¡£¥â¡¼¥¿¤Î²óž¤ò¥¢¡¼¥à¤ËÅÁ¤¨¤ëµ¡¹½¤ÏMission1¤ÎÀÖ¤Ù¤³¥Ø¥Ã¥É¤ÈƱ¤¸¤¿¤á¾ÜºÙ¤Ï¾Êά¤¹¤ë¡£
¢mR = LargeMotor('outB')
¡¡¡¡¿Ê¹ÔÊý¸þ±¦Â¦¤Î¥´¥à¥¿¥¤¥ä¤òư¤«¤¹¥é¡¼¥¸¥â¡¼¥¿¡¼¡£
£mL = LargeMotor('outC')
¡¡¡¡¿Ê¹ÔÊý¸þº¸Â¦¤Î¥´¥à¥¿¥¤¥ä¤òư¤«¤¹¥é¡¼¥¸¥â¡¼¥¿¡¼¡£
¤cs = ColorSensor('in1')
¡¡¡¡ÃÏÌ̤理òȽÊ̤¹¤ë¥»¥ó¥µ¡£¤³¤ì¤ò»ÈÍѤ·¹õ¤¤Àþ¤òȽÊ̤µ¤»¤ë¡£
**¥«¥é¡¼¥»¥ó¥µ¡¼¤Î¼è¤êÉÕ¤±°ÌÃ֤ˤĤ¤¤Æ [#a73e0e8e]
»ä¤¿¤Á¤ÏºÇ½é¥«¥é¡¼¥»¥ó¥µ¤ò¾å¤Î¼Ì¿¿¤ÎⒶ¤Î°ÌÃ֤˼è¤êÉÕ¤±¤Æ¤¤¤¿¡£¤³¤ì¤Ï¥»¥ó¥µ¡¼¤Î°ÌÃÖ¤ò¤Ç¤¤ë¤À¤±Á°Îؤμּ´¤Î¶á¤¯¤Ë¤¹¤ë¤³¤È¤ÇµÞ¥«¡¼¥Ö¤Ç¤â¥¹¥à¡¼¥º¤Ëưºî¤¹¤ë¥í¥Ü¥Ã¥È¤òºî¤ë¤³¤ÈÁÀ¤Ã¤¿¤â¤Î¤À¤Ã¤¿¡£¤·¤«¤·¾®²ó¤ê¤¬Íø¤¤¹¤®¤ë¤¿¤á°ìÅÙ¥³¡¼¥¹¤«¤é³°¤ì¤ë¤È¡¢¥³¡¼¥¹¤ËÉüµ¢¤·¤¿ºÝ¿ÊÆþ³ÑÅÙ¤¬µÞ¤Ë¤Ê¤ê¸òº¹ÅÀ¤È¸íǧ¼±¤¹¤ë¤³¤È¤¬Â¿¤«¤Ã¤¿¡£¤½¤³¤Ç¤¢¤¨¤Æ¶îÆ°ÎØ¤Î¼Ö¼´¤«¤éÎ¥¤ì¤¿º£¤Î°ÌÃ֤˰ܤ¹¤³¤È¤Ç¾¯¤·¤Îư¤¤Ç¥»¥ó¥µ¡¼¤¬¥³¡¼¥¹¾å¤ËÉüµ¢¤Ç¤¤ë¤è¤¦²þ½¤¤ò¹Ô¤Ã¤¿¡£
¡¡¤Þ¤¿²þ½¤¸å¥«¥é¡¼¥»¥ó¥µ¡¼¤Î¸ÇÄ꤬´Å¤¯»þ¤Ë¤è¤Ã¤ÆÃͤ¬ÊѲ½¤·¤Æ¤·¤Þ¤¦ÉÔ¶ñ¹ç¤¬È¯À¸¤·¤Æ¤·¤Þ¤Ã¤¿¡£¤½¤³¤Ç¥«¥é¡¼¥»¥ó¥µ¤ò¤è¤ê¶¯¸Ç¤Ë¸ÇÄꤹ¤ë¤è¤¦¹©Éפ·¤¿¡£
**´Ì¤ò¤Ä¤«¤àµ¡¹½¤Ë¤Ä¤¤¤Æ [#b6810553]
¤³¤Î¥í¥Ü¥Ã¥È¤Ç¤Ï´Ì¤Ë°Ï¤¤¤òÈ碌¤ë·Á¤Ç´Ì¤Î¥¥ã¥Ã¥Á¤ò¹Ô¤Ã¤¿¡£¶ñÂÎŪ¤Ë¤ÏÁ°²ó¤Î²ÝÂê¤ÇÀÖ¤Ù¤³¥Ø¥Ã¥É¤ò²ÔƯ¤µ¤»¤ëµ¡¹½¤òήÍѤ·¤¿¤â¤Î¤ò»ÈÍѤ·ÏĤó¤À»Í³Ñ·Á¤Î·Á¤ò¤·¤¿¥¢¡¼¥à¤ò²¼¤í¤·¤Æ¤¤¤ë¡£¤³¤Î¥¢¡¼¥à¤ÏÂ礤á¤Ëºî¤é¤ì¤Æ¤ª¤ê¡¢¤Þ¤¿Ä¾Á°¤Ë¾¯¤·¥¢¡¼¥à¤òÅݤ·¤Æ¤ª¤¯¤³¤È¤Ç¤ï¤¶¤ï¤¶¥³¡¼¥¹¤òΥæ¤·¤Ê¤¯¤Æ¤â´Ì¤ò¥¥ã¥Ã¥Á¤Ç¤¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤ë¡£¤Þ¤¿¥¢¡¼¥à¤Î·Á¤¬ÏĤó¤Ç¤¤¤ë¤Î¤Ï´Ì¤òÃÖ¤¯Ä¾Á°¤Ë¥í¥Ü¥Ã¥È¤¬Àû²ó¤¹¤ë¤È¤´Ì¤¬¾å¤«¤é¸«¤Æ±¦¾å¤Ëư¤¤¤ÆÍè¤ë¤è¤¦¤Ë¤¹¤¿¤á¤Ç¤¢¤ë¡£¤³¤ì¤Ë¤è¤ê´Ì¤ò±ß¤Î¤è¤êÃæ±û¤ËÃÖ¤¯¤³¤È¤¬¤Ç¤¤ë¡£¤Þ¤¿´Ì¤òÎ¥¤·¤¿¸å¤ËËÜÂΤ¬Àû²ó¤¹¤ë¤¬¤½¤Î¤È¤¤ËËÜÂΤ¬´Ì¤ËÀÜ¿¨¤¹¤ë¤Î¤òËɤ°¸ú²Ì¤â¤¢¤ë¡£
*¥×¥í¥°¥é¥à [#b79376de]
**¸òº¹ÅÀ¤Î¼±ÊÌÊýË¡ [#v3b9b597]
º£²ó¤Î²ÝÂê¤ÎºÇÂç¤ÎÊɤϸòº¹ÅÀ¤ò¤¤¤«¤Ë¤·¤ÆÇ§¼±¤¹¤ë¤Ç¤·¤¿¡£¤½¤³¤Çº£²ó¤Ï¥é¥¤¥ó¥È¥ì¡¼¥¹¤Î´Ø¿ô¤Ë¤ª¤¤¤Æ°ìÄê»þ´Ö°Ê¾å¹õ¤¤Éôʬ¤òÁö¹Ô¤·¤¿¾ì¹ç¤Ë´Ø¿ô¤¬½ªÎ»¤¹¤ë»ÅÁȤߤˤ·¤Þ¤·¤¿¡£°Ê²¼¤Ï¤½¤Î¥¢¥ë¥´¥ê¥º¥à¤ò¥Õ¥í¡¼¥Á¥ã¡¼¥È¤Çɽ¤·¤¿¤â¤Î¤Ç¤¹¡£¤³¤³¤ÇItime¤Ï¹õ¤¤Éôʬ¤ò²¿ÉÃÄ̲ᤷ¤¿¤é¸òº¹ÅÀ¤Èǧ¼±¤¹¤ë¤«¤òɽ¤·¤Æ¤¤¤ë¡£
&ref(2018a/Member/montbell/Mission2/¥×¥í¥È¥³¥ë.JPG,70%,Mission2 );
**´Ø¿ô...¤ÎÁ°¤Ë [#bb49b518]
¤Þ¤º¼¡¤Îʸ¾Ï¤ò¥×¥í¥°¥é¥à¤·¤Þ¤·¤¿¡£ÀâÌÀ¤Ï¾Êά¤·¤Þ¤¹¡£
#!/usr/bin/env python3
from ev3dev.ev3 import *
from time import sleep
mA = MediumMotor('outA')
mR = LargeMotor('outB')
mL = LargeMotor('outC')
cs = ColorSensor('in1')
cs.mode = 'COL-REFLECT'
Itime = 0.491
mR.reset()
mL.reset()
**´Ø¿ô [#me652ce4]
´Ø¿ô¤òºîÀ®¤·¤Þ¤¹¡£
:¥í¥Ü¥Ã¥È¤ò´õ˾¤¹¤ëÊý¸þ¤ØÆ°¤«¤¹´Ø¿ô|
Í¿¤¨¤é¤ì¤¿¿ôÃͤÀ¤±Æ°¤«¤¹
def move_position(R,L):
mR.run_to_rel_pos(position_sp=R, speed_sp=130, stop_action='brake')
mL.run_to_rel_pos(position_sp=L, speed_sp=130, stop_action='brake')
ľ¿Ê
def move_foward():
mR.run_forever(speed_sp=140, stop_action='brake')
mL.run_forever(speed_sp=140, stop_action='brake')
´Ë¤ä¤«¤Ë±¦
def move_right1():
mR.run_forever(speed_sp=60, stop_action='brake')
mL.run_forever(speed_sp=100, stop_action='brake')
±¦¤Ë¶Ê¤¬¤ë
def move_right2():
mR.run_forever(speed_sp=35, stop_action='brake')
mL.run_forever(speed_sp=100, stop_action='brake')
±¦µÞ¥«¡¼¥Ö
def move_right3():
mR.run_forever(speed_sp=-55, stop_action='brake')
mL.run_forever(speed_sp=90, stop_action='brake')
´Ë¤ä¤«¤Ëº¸
def move_left1():
mR.run_forever(speed_sp=100, stop_action='brake')
mL.run_forever(speed_sp=60, stop_action='brake')
º¸¤Ë¶Ê¤¬¤ë
def move_left2():
mR.run_forever(speed_sp=100, stop_action='brake')
mL.run_forever(speed_sp=35, stop_action='brake')
º¸µÞ¥«¡¼¥Ö
def move_left3():
mR.run_forever(speed_sp=90, stop_action='brake')
mL.run_forever(speed_sp=-55, stop_action='brake')
Ää»ß
def stop():
mR.run_timed(time_sp=0, speed_sp=0, stop_action='coast')
mL.run_timed(time_sp=0, speed_sp=0, stop_action='coast')
:¥¢¡¼¥à¤òư¤«¤¹´Ø¿ô|
Àµ¤ÎÃͤDz¼¤²¡¢Éé¤ÎÃͤǾ夲¤ë¡£
def armturn(t):
mA.run_to_rel_pos(position_sp=t, speed_sp=70, stop_action='brake')
sleep(1)
:¥é¥¤¥ó¤Î±¦Â¦¤ò¥È¥ì¡¼¥¹¤¹¤ë´Ø¿ô|
&ref(2018a/Member/montbell/Mission2/IMG_20180815_212749.png,18%,Mission2 );
¤³¤³¤Ç¤Ï¥«¥é¡¼¥»¥ó¥µ¤ÎÃͤˤè¤Ã¤Æ¥í¥Ü¥Ã¥È¤Î¿Ê¤ßÊý¤ò£·Ãʳ¬¤Ëʬ¤±¤Æ¥é¥¤¥ó¥È¥ì¡¼¥¹¤ò¹Ô¤Ã¤Æ¤¤¤Þ¤¹¡£¹õ¤¤Éôʬ¤ò°ìÄê»þ´Ö(Itime)°Ê¾åÄ̲᤹¤ë¤È¤³¤Î´Ø¿ô¤Ï½ªÎ»¤·¤Þ¤¹¡£
def toresu_right():
t0 = time.time()
while time.time() - t0 < Itime:
if 75 < cs.value(0):
t0 = time.time()
if 60 < cs.value(0) < 75:
move_left2()
t0 = time.time()
if 50 < cs.value(0) < 60:
move_left1()
t0 = time.time()
if 45 < cs.value(0) < 50:
move_foward()
t0 = time.time()
if 40 < cs.value(0) < 45:
move_right1()
t0 = time.time()
if 35 < cs.value(0) < 40:
move_right2()
if cs.value(0) < 35:
move_right3()
:¥é¥¤¥ó¤Îº¸Ã¼¤ò¥È¥ì¡¼¥¹¤¹¤ë´Ø¿ô|
¥é¥¤¥ó¤Î±¦Â¦¤ò¥È¥ì¡¼¥¹¤¹¤ë´Ø¿ô¤ÈƱ¤¸¥×¥í¥È¥³¥ë¤Ç¿Ê¤à¸þ¤¤¬º¸±¦È¿Å¾¤·¤Æ¤¤¤ë¡£
def toresu_left():
t0 = time.time()
while time.time() - t0 < Itime:
while 75 < cs.value(0):
move_right3()
t0 = time.time()
while 60 < cs.value(0) < 75:
move_right2()
t0 = time.time()
while 50 < cs.value(0) < 60:
move_right1()
t0 = time.time()
while 45 < cs.value(0) < 50:
move_foward()
t0 = time.time()
while 40 < cs.value(0) < 45:
move_left1()
while 35 < cs.value(0) < 40:
move_left2()
while cs.value(0) < 35:
move_left3()
:¥í¥Ü¥Ã¥È¤òº¸¥È¥ì¡¼¥¹¤ËÉüµ¢¤µ¤»¤ë´Ø¿ô|
run_to_rel_pos¤ò»ÈÍѤ·¥í¥Ü¥Ã¥È¤ÎÂÎÀª¤òÀ°¤¨¤¿¤¦¤¨¤Ç¹õ¤¤¥é¥¤¥ó¤ò¸«¤Ä¤±¤ë¤Ç´Ë¤ä¤«¤Ë±¦¤Ë¶Ê¤¬¤ê¤Ê¤¬¤é¿Ê¤à¡£
def return_toresu_left(R,L):
mR.run_to_rel_pos(position_sp=R, speed_sp=100, stop_action='brake')
mL.run_to_rel_pos(position_sp=L, speed_sp=100, stop_action='brake')
sleep(3.5)
while cs.value(0) > 45:
move_right1()
:¥í¥Ü¥Ã¥È¤ò±¦¥È¥ì¡¼¥¹¤ËÉüµ¢¤µ¤»¤ë´Ø¿ô|
¥í¥Ü¥Ã¥È¤òº¸¥È¥ì¡¼¥¹¤ËÉüµ¢¤µ¤»¤ë´Ø¿ô¤ÈƱ¤¸¥×¥í¥È¥³¥ë¤Ç¿Ê¤à¸þ¤¤¬º¸±¦È¿Å¾¤·¤Æ¤¤¤ë¡£
def return_toresu_right(R,L):
mR.run_to_rel_pos(position_sp=R, speed_sp=100, stop_action='brake')
mL.run_to_rel_pos(position_sp=L, speed_sp=100, stop_action='brake')
sleep(6.5)
while cs.value(0) > 45:
move_left1()
:¥í¥Ü¥Ã¥È¤ò¥µ¡¼¥¯¥ë¾å¤Ç±¦¥È¥ì¡¼¥¹¤ËÉüµ¢¤µ¤»¤ë´Ø¿ô|
¸òº¹ÅÀL¤äK¤Ê¤É¤Ç»ÈÍѤ¹¤ë¡£run_to_rel_pos¤Ç¸òº¹ÅÀ¤ò¾è¤ê±Û¤¨¤Æ¤«¤é¥µ¡¼¥¯¥ë¤Ë¤Ê¤Ã¤Æ¤¤¤ë¹õ¤¤¥é¥¤¥ó¤ò¸«¤Ä¤±¤ë¤Þ¤ÇµÞ·ã¤Ëº¸¤Ø¶Ê¤¬¤ê³¤±¤ë¡£
def return_circle_right():
mR.run_to_rel_pos(position_sp=180, speed_sp=80, stop_action='brake')
mL.run_to_rel_pos(position_sp=0, speed_sp=80, stop_action='brake')
sleep(4)
while cs.value(0) > 40:
mR.run_forever(speed_sp=100, stop_action='brake')
mL.run_forever(speed_sp=0, stop_action='brake')
:¥í¥Ü¥Ã¥È¤ò¥µ¡¼¥¯¥ë¾å¤Çº¸¥È¥ì¡¼¥¹¤ËÉüµ¢¤µ¤»¤ë´Ø¿ô|
¥í¥Ü¥Ã¥È¤ò¥µ¡¼¥¯¥ë¾å¤Ç±¦¥È¥ì¡¼¥¹¤ËÉüµ¢¤µ¤»¤ë´Ø¿ô¤ÈƱ¤¸¥×¥í¥È¥³¥ë¤Ç¿Ê¤à¸þ¤¤¬º¸±¦È¿Å¾¤·¤Æ¤¤¤ë¡£
def return_circle_left():
mL.run_to_rel_pos(position_sp=180, speed_sp=80, stop_action='brake')
mR.run_to_rel_pos(position_sp=0, speed_sp=80, stop_action='brake')
sleep(4)
while cs.value(0) > 40:
mL.run_forever(speed_sp=100, stop_action='brake')
mR.run_forever(speed_sp=0, stop_action='brake')
:¥í¥Ü¥Ã¥È¤òÇò¤¤¥¨¥ê¥¢¤Ë½Ð¤ë¤Þ¤Çº¸¤ËµÞÀû²ó¤µ¤»¤ë´Ø¿ô|
¤ª¤â¤Ë¸òº¹ÅÀD¤Ç»ÈÍѤ¹¤ë¤¿¤á¤ËºîÀ®¤·¤¿¡£¸òº¹ÅÀ¤«¤éÈ´¤±½Ð¤¹ºÝ¤ËƱ¤¸¸òº¹ÅÀ¤òºÆÅÙǧ¼±¤·¤Æ¤·¤Þ¤¦¤³¤È¤òËɤ°¤³¤È¤¬¤Ç¤¤ë¡£¤³¤Î¤³¤È¤¬¸å¤«¤éʬ¤«¤Ã¤¿¤¿¤á¿ÍѤ·¤Æ¤¤¤ë¡£Èó¾ï¤ËÌò¤ËΩ¤Ä¡£
def return_circle_right_W():
while cs.value(0) < 45:
mR.run_forever(speed_sp=80, stop_action='brake')
mL.run_forever(speed_sp=-30, stop_action='brake')
:¥í¥Ü¥Ã¥È¤òÇò¤¤¥¨¥ê¥¢¤Ë½Ð¤ë¤Þ¤Ç±¦¤ËµÞÀû²ó¤µ¤»¤ë´Ø¿ô|
¾åµ¤Î´Ø¿ô¤¬Èó¾ï¤ËÌòΩ¤Ä¤³¤È¤¬È½ÌÀ¤·¤¿¤¿¤áºîÀ®¤·¤¿¡£¾åµ¤Î´Ø¿ô¤ÈƱ¤¸¥×¥í¥È¥³¥ë¤Ç¿Ê¤à¸þ¤¤¬º¸±¦È¿Å¾¤·¤Æ¤¤¤ë¡£
def return_circle_left_W():
while cs.value(0) < 45:
mR.run_forever(speed_sp=-30, stop_action='brake')
mL.run_forever(speed_sp=80, stop_action='brake')
:¥È¥ì¡¼¥¹¤¹¤ëü¤òÀÚ¤êÂØ¤¨¤ë´Ø¿ô|
¸òº¹ÅÀG¤òÄ̲á¸å¤Ë¡¢º¸¥È¥ì¡¼¥¹¤«¤é±¦¥È¥ì¡¼¥¹¤ËÀÚ¤êÂØ¤¨¤ë¤¿¤á¤À¤±¤Ëºî¤Ã¤¿´Ø¿ô¡£°ìÄêµ÷Î¥Áö¹Ô¤Î¸å¡¢Çò¤¤¥¨¥ê¥¢¤Ë½Ð¤ë¤Þ¤Çľ¿Ê¤¹¤ë¡£
def return_circle_foward_W():
mR.run_to_rel_pos(position_sp=60, speed_sp=80, stop_action='brake')
mL.run_to_rel_pos(position_sp=60, speed_sp=80, stop_action='brake')
sleep(2)
while cs.value(0) < 45:
mR.run_forever(speed_sp=50, stop_action='brake')
mL.run_forever(speed_sp=50, stop_action='brake')
**¼ÂºÝ¤ËÁö¹Ô¤µ¤»¤ë¤¿¤á¤Î¥×¥í¥°¥é¥à [#w11dd679]
return_toresu_left(360,360) ¡¡¡¡//¥¹¥¿¡¼¥È°ÌÃÖA¤òÆÍÇˤ·º¸¥È¥ì¡¼¥¹¥È¥ì¡¼¥¹¤Ë°Ü¹Ô
toresu_left()
stop()
sleep(2)
return_toresu_left(0,240)¡¡¡¡¡¡¡¡¡¡¡¡ //¸òº¹ÅÀC¤òÆÍÇË
toresu_left()
stop()
armturn(110)¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ ¡¡//¡¦¡¦¡¦¡¦¡¦¡
sleep(1)
return_circle_right_W()¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡
toresu_left()
stop()¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ //¸òº¹ÅÀD
sleep(3)
armturn(25)¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ //´Ì¤ò¥¥ã¥Ã¥Á
sleep(1)
return_circle_right_W()
toresu_left()
return_circle_left()¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ //¸òº¹ÅÀE
toresu_left()
stop()
sleep(3) ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ //¸òº¹ÅÀF
return_circle_right_W()
toresu_left()
stop()¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ //¸òº¹ÅÀG
sleep(3)
return_circle_foward_W()¡¡¡¡¡¡¡¡¡¡¡¡¡¡//º¸¥È¥ì¡¼¥¹¤«¤é±¦¥È¥ì¡¼¥¹¤ËÀÚ¤êÂØ¤¨
toresu_right()
stop()
sleep(1)
return_circle_left_W()¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡//ľ³Ñ¥«¡¼¥Ö
toresu_right()
toresu_right()
return_circle_right_W() ¡¡¡¡¡¡¡¡¡¡¡¡¡¡//£²¸ÄÌܤΥإ¢¥Ô¥ó¥«¡¼¥Ö¤Çº¸¥È¥ì¡¼¥¹¤Ë°Ü¹Ô
toresu_left()
stop()¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ //¸òº¹ÅÀH
sleep(3)
return_toresu_left(-290,0)
return_circle_left_W()¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ //¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¢
toresu_right()
return_circle_left_W()¡¡ ¡¡¡¡¡¡¡¡¡¡¡¡¡¡//¸òº¹ÅÀI
stop()
sleep(3)
toresu_right()
return_circle_right()¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡//¸òº¹ÅÀL
toresu_right()
return_circle_right()¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡//¸òº¹ÅÀK
toresu_right()
stop()
sleep(3)¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ //¸òº¹ÅÀJ
move_position(185,-345) ¡¡¡¡¡¡¡¡¡¡¡¡¡¡//Y¤Ë´Ì¤òÃÖ¤¤Ë¹Ô¤¯
sleep(3)
armturn(-140)¡¡¡¡¡¡¡¡¡¡¡¡¡¡ ¡¡¡¡¡¡¡¡¡¡¡¡//´Ì¤ò¥ê¥ê¡¼¥¹
stop()
sleep(2)
return_toresu_right(-60,-625)¡¡ ¡¡¡¡//JB´Ö¤Îº¸¥È¥ì¡¼¥¹¤ËÉüµ¢
return_circle_right_W()
toresu_left()
stop()
sleep(3)¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ ¡¡//¸òº¹ÅÀB
return_circle_right_W()¡¡
toresu_left()
stop()
sleep(1)
move_position(230,1100)¡¡¡¡¡¡¡¡¡¡¡¡ ¡¡//¥¾¡¼¥óA¤ËÃó¼Ö
sleep(8)
stop()
:¡¤Ë¤Ä¤¤¤Æ|
´Ì¤ò¥¥ã¥Ã¥Á¤¹¤ëºÝ¤ËǺ¤Þ¤µ¤ì¤¿¤Î¤Ï¸òº¹ÅÀD¤Ë¤ª¤¤¤Æ¥í¥Ü¥Ã¥È¤¬°ì»þÄä»ß¤¹¤ë¤È¤¤Î¼ÖÂΤθþ¤¤¬°ìÄê¤Ç¤Ï¤Ê¤¤¤³¤È¤À¤Ã¤¿¡£¤½¤³¤Ç¡¤Çͽ¤á¥¢¡¼¥à¤òÅݤ·¤Æ¤ª¤¯¤³¤È¤Ç¡¢¤¦¤Þ¤¯´Ì¤òÀµÌ̤ˤȤ館¤é¤ì¤º¤È¤â¥¢¡¼¥à¤Ë´Ì¤¬°ú¤Ã¤«¤«¤ë¤³¤È¤Ç¥¥ã¥Ã¥Á¤Ç¤¤ë¤è¤¦¤Ë¤·¤¿¡£
:¢¤Ë¤Ä¤¤¤Æ|
¤³¤³¤Ç¤Ï¸òº¹ÅÀH¤Ø¤Î¿ÊÆþ³ÑÅ٤ˤè¤Ã¤Æ¤ÏIH´Ö¤Ø¤ÎÉüµ¢¤ÎºÝ¥³¡¼¥¹¤ËÂФ·¤ÆÆß³Ñ¤Ë¿¯Æþ¤·¤Æ¤·¤Þ¤¦¤³¤È¤¬¤¢¤Ã¤¿¡£return_circle_left_W()¤ò»ÈÍѤ¹¤ë¤³¤È¤Ë¤è¤ê¤¹¤°¤Ë¸òº¹ÅÀ¤È¤Î¸íǧ¼±¤Ï¤Ê¤¯¤Ê¤Ã¤¿¤¬¡¢ËÜÈ֤ǤÏIH´Ö¤Ø¤Î¿ÊÆþ¸å¤Î±¦¥È¥ì¡¼¥¹¤¬ÉÔ°ÂÄê¤Ë¤Ê¤ê¸òº¹ÅÀ¤È¸íǧ¼±¤·¤Æ¤·¤Þ¤Ã¤¿¡£
*ºÇ¸å¤Ë [#s74396f3]
¡¡º£²ó¤Î²ÝÂê¤ÏͽÁ۰ʾå¤ËÆñ¤·¤¯¤Û¤È¤ó¤ÉͽÄêÄ̤ê¤Ë¤¤¤«¤Ê¤«¤Ã¤¿¡£¤Þ¤¿¥È¥ì¡¼¥¹¼«ÂΤϤǤ¤Æ¤â¸òº¹ÅÀǧ¼±¤Î¥¢¥ë¥´¥ê¥º¥à¤ò¹Í¤¨¤ë¤³¤È¤¬¤Ç¤¤ºÀèÀ¸¤ÎÎϤò¼Ú¤ê¤Æ¤·¤Þ¤Ã¤¿¡£¤½¤ì¤À¤±»þ´Ö¤«¤±¤Æ¤â
¿®ÍêÀ¤Î¤¢¤ë´°À®·Á¤òºî¤ë¤³¤È¤¬¤Ç¤¤º¡¢ËÜÈ֤Ǥϸòº¹ÅÀ¤Î¸íǧ¼±¤¬È¯À¸¤·¤Æ¤·¤Þ¤¤´°Á´¼«Æ°¤Ç²ÝÂê¤òãÀ®¤Ç¤¤Ê¤«¤Ã¤¿¤Î¤ÏÈó¾ï¤Ë²ù¤·¤¤¡£¼¡²ó¤Ï¤â¤Ã¤ÈÀ®¸ù³ÎΨ¤Î¹â¤¤¥í¥Ü¥Ã¥È¤òºî¤ê¤¿¤¤¡£
¥Ú¡¼¥¸Ì¾: