本文整理汇总了Python中Robot.Robot.allerA方法的典型用法代码示例。如果您正苦于以下问题:Python Robot.allerA方法的具体用法?Python Robot.allerA怎么用?Python Robot.allerA使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Robot.Robot
的用法示例。
在下文中一共展示了Robot.allerA方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Robot
# 需要导入模块: from Robot import Robot [as 别名]
# 或者: from Robot.Robot import allerA [as 别名]
# -*- coding: utf-8 -*-
from Robot import Robot
from calculAngle import donneAlpha
from calculAngle import donneL
from util import *
import time
robot = Robot('/dev/ttyACM0','/dev/ttyACM1','/dev/ttyACM2')
print 'pré pouet'
robot.allerA(( 1500, 650))
print 'pouet'
time.sleep(1)
#robot.bouge(100, 0)
print 'post pouet'
# robot.bouge(0, 900)
# robot.bouge(0, -900)
robot.updatePosition()
(x0, y0) = (robot.x,robot.y)
(x, y) = (1500, 350)
delta = - robot.theta + angle((1, 0), (x - x0, y - y0))*1800/math.pi
robot.bouge(0, int(delta))
示例2: Robot
# 需要导入模块: from Robot import Robot [as 别名]
# 或者: from Robot.Robot import allerA [as 别名]
# -*- coding: utf-8 -*-
from Robot import Robot
import time
robot = Robot('/dev/ttyACM0','/dev/ttyACM1','/dev/ttyACM2')
#3 cylindres + gobelet
robot.allerA((700, 950))
robot.goToCylindreLocal((870, 645), False)
robot.allerA((900, 520))
robot.goToCylindreLocal((1100, 230), False)
robot.goToCylindreLocal((1300, 600), False)
robot.allerA((1250, 400))
robot.goToGobeletLocal((1500, 350), False)
#gobelet
robot.allerA((910, 850))
robot.goToGobeletLocal((910, 1170), True)
#poser gobelet + 3 cylindres + balle
robot.allerAangle((600, 1000), 0)
robot.allerA((450, 1000))
#2 cylindres + gobelet
#robot.allerA((450, 450))
示例3:
# 需要导入模块: from Robot import Robot [as 别名]
# 或者: from Robot.Robot import allerA [as 别名]
#robot.goToGobeletLocal((250, 250), True)
#
#
#
##1er plot
#
#
#robot.goToCylindreLocal((90, 250), True)
#
#
#
#
#
##plot 2
#
#robot.goToCylindreLocal((90, 150), True)
#
#
#
#robot.com.appelDescenteActionneurGobeletDevant()
robot.com.appelMonteeActionneurGobeletDevant()
robot.com.appelDescenteActionneurGobeletDevant()
robot.allerA((2400, 450))
robot.allerA((600, 450))
robot.allerA((1000, 1000))
robot.allerA((1200, 1000))
robot.allerA((1800, 1000))
示例4: Robot
# 需要导入模块: from Robot import Robot [as 别名]
# 或者: from Robot.Robot import allerA [as 别名]
# -*- coding: utf-8 -*-
from Robot import Robot
import time
robot = Robot('/dev/ttyACM0','/dev/ttyACM1','/dev/ttyACM2')
# les deux cylindres en haut (P2 et P3)
robot.allerA((730, 1580))
robot.goToCylindreLocal((850, 1800), True)
robot.goToCylindreLocal((850, 1900), True)
robot.bouge(-100, 0)
# Gobelet G2 + dépose dans la zone de départ
robot.allerA((690, 1050))
robot.goToCylindreLocal((910, 1170), False)
# robot.bouge(0, -900)
# robot.allerAangle((600, 1000), 1800)
# robot.allerA((250, 1000))
# robot.com.appelDescenteActionneurGobeletDerriere()
# # Gobelet G1 + Cylindres P4 et P5
# robot.allerA(( 450, 450))
示例5: Robot
# 需要导入模块: from Robot import Robot [as 别名]
# 或者: from Robot.Robot import allerA [as 别名]
# -*- coding: utf-8 -*-
from Robot import Robot
import time
robot = Robot('/dev/ttyACM0','/dev/ttyACM1','/dev/ttyACM2')
robot.allerA((2600, 1000))
示例6: Robot
# 需要导入模块: from Robot import Robot [as 别名]
# 或者: from Robot.Robot import allerA [as 别名]
# -*- coding: utf-8 -*-
from Robot import Robot
from CommunicationSerial import CommunicationSerial as com
import time
robot = Robot('/dev/ttyACM0','/dev/ttyACM1','/dev/ttyACM2')
sens = False
gobelet = True
point = (910, 850)
robot.allerA(point)
#robot.allerAangle(point, 0)
if(gobelet) :
robot.goToGobeletLocal((910, 1170), sens)
else :
robot.goToCylindreLocal((910, 1170), sens)
time.sleep(1)
if(gobelet and sens) :
robot.com.appelDescenteActionneurGobeletDevant()
elif(gobelet and (not sens)) :
robot.com.appelDescenteActionneurGobeletDerriere()
elif((not gobelet) and sens) :
robot.com.appelDescenteActionneurCylindreDevant()
else :
robot.com.appelDescenteActionneurCylindreDerriere()
示例7: Robot
# 需要导入模块: from Robot import Robot [as 别名]
# 或者: from Robot.Robot import allerA [as 别名]
# -*- coding: utf-8 -*-
from Robot import Robot
import time
robot = Robot('/dev/ttyACM0','/dev/ttyACM1','/dev/ttyACM2')
# les deux cylindres en haut (P12 et P13)
robot.allerA((2270, 1580))
robot.goToCylindreLocal((2150, 1800), False)
robot.goToCylindreLocal((2150, 1900), False)
# Gobelet G2 + dépose dans la zone de départ
robot.allerA((2310, 1050))
robot.goToCylindreLocal((2090, 1170), True)
# Gobelet G + Cylindres 164 et P15
robot.allerA(( 2550, 450))
robot.goToGobeletLocal((2750, 250), False)
#1er plot
robot.goToCylindreLocal((2910, 250), False)
#plot 2
robot.goToCylindreLocal((2910, 150), False)
示例8: int
# 需要导入模块: from Robot import Robot [as 别名]
# 或者: from Robot.Robot import allerA [as 别名]
robot.updatePosition()
orientationInitiale = True
sens = True
robot.printPosition()
l = int(dist((robot.x, robot.y), (910, 1170))) / 10
d1 = 10.25
d2 = 8.5
gobelet = True
theta = donneAlpha(orientationInitiale, bool(sens), int(l), d1, d2, gobelet)
print theta
profSpot = 7
L = donneL(theta, int(l), profSpot)
L = L * 10 + 60
theta = theta * 10
robot.bouge(0,int(theta))
time.sleep(1)
robot.bouge(int(L),0)
time.sleep(0.5)
robot.com.appelMonteeActionneurGobeletDevant()
time.sleep(1)
robot.updatePosition()
robot.allerAangle((600, 1000), 1800)
robot.bouge(200, 0)
robot.com.appelDescenteActionneurGobeletDevant()
robot.bouge(-250, 0)
robot.updatePosition()
robot.allerA((1000, 800))
示例9: Robot
# 需要导入模块: from Robot import Robot [as 别名]
# 或者: from Robot.Robot import allerA [as 别名]
# -*- coding: utf-8 -*-
from Robot import Robot
from calculAngle import donneAlpha
from calculAngle import donneL
from util import *
import time
robot = Robot('/dev/ttyACM0','/dev/ttyACM1','/dev/ttyACM2')
#robot.bouge(200, 0)
print 'pré pouet'
robot.allerA(( 450, 450))
print 'pouet'
time.sleep(1)
#robot.bouge(100, 0)
print 'post pouet'
# robot.bouge(0, 900)
# robot.bouge(0, -900)
# robot.updatePosition()
# (x0, y0) = (robot.x,robot.y)
# (x, y) = (250, 250)
# delta = - robot.theta + angle((1, 0), (x - x0, y - y0))*1800/math.pi
示例10:
# 需要导入模块: from Robot import Robot [as 别名]
# 或者: from Robot.Robot import allerA [as 别名]
#pos gob 1500, 350
#
#3 cylindres
#
#cyl 850, 1800
#cyl 850, 1900
#cyl 90, 1800
#
#
#
#
#
robot.allerA(( 700, 950))
# robot.bouge(0, 900)
# robot.bouge(0, -900)
#1er plot
robot.goToCylindreLocal((870, 645), False)
#plot 2
robot.allerA((900, 520))