当前位置: 首页>>代码示例>>Python>>正文


Python Robot.bouge方法代码示例

本文整理汇总了Python中Robot.Robot.bouge方法的典型用法代码示例。如果您正苦于以下问题:Python Robot.bouge方法的具体用法?Python Robot.bouge怎么用?Python Robot.bouge使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Robot.Robot的用法示例。


在下文中一共展示了Robot.bouge方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: Robot

# 需要导入模块: from Robot import Robot [as 别名]
# 或者: from Robot.Robot import bouge [as 别名]
# -*- coding: utf-8 -*-
import time

from Robot import Robot

robot = Robot('/dev/ttyACM0','/dev/ttyACM1','/dev/ttyACM2')


while (True):
    robot.printPosition()
#    d = raw_input('Enter a distance: ')
#    theta = raw_input('Enter an angle: ')
#    robot.bouge(0,int(theta))
#    robot.bouge(int(d),0)
    d = raw_input('Enter d : ')
    theta = raw_input('Enter theta : ')
    robot.bouge(int(d),int(theta))
    time.sleep(1)
开发者ID:SupelecRobotics,项目名称:RobotsSUMO2017,代码行数:20,代码来源:script4.py

示例2:

# 需要导入模块: from Robot import Robot [as 别名]
# 或者: from Robot.Robot import bouge [as 别名]
#robot.allerA((450, 450))
#robot.goToGobeletLocal((250, 250), True)
#robot.goToCylindreLocal((90, 250), True)
#robot.goToCylindreLocal((90, 150), True)

#claps
robot.allerAangle((int(250),int(230)),-900)
robot.com.appelMonteeActionneurGobeletDevant()
robot.com.appelDescenteClapDroit()
robot.allerAangle((int(250),int(230)), 0)
robot.com.appelMonteeClapDroit()

robot.allerAangle((int(700),int(230)), 0)
robot.com.appelDescenteClapDroit()
#robot.allerAangle((int(900),int(230)), 0)
robot.bouge(int(200),0)
robot.com.appelMonteeClapDroit()

#chercher cylindres près des distributeurs?? (temps tros short)

#poser 2 cylindres dans zone rouge
#clap côté adverse

#poser gobelet 1
robot.allerA((2600, 600))

#poser gobelet2
robot.allerA((2600, 1400))

#rentrer
robot.allerAangle((600, 1000), 0)
开发者ID:SupelecRobotics,项目名称:RobotsSUMO2017,代码行数:33,代码来源:script21.py

示例3: angle

# 需要导入模块: from Robot import Robot [as 别名]
# 或者: from Robot.Robot import bouge [as 别名]
#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))
robot.updatePosition()

orientationInitiale = True
sens = True
robot.printPosition()
l = int(dist((robot.x, robot.y), (1500, 350))) / 10
d1 = 10
d2 = 30
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 + 50
theta =  theta * 10
开发者ID:SupelecRobotics,项目名称:RobotsSUMO2017,代码行数:33,代码来源:script16.py

示例4: Robot

# 需要导入模块: from Robot import Robot [as 别名]
# 或者: from Robot.Robot import bouge [as 别名]
# -*- coding: utf-8 -*-
"""
Created on Wed Apr 15 18:50:04 2015

@author: Fabien
"""

from Robot import Robot
import time

robot = Robot('/dev/ttyACM0','/dev/ttyACM1','/dev/ttyACM2')

robot.allerAangle((int(300),int(550)), int(-1170))
time.sleep(1)
robot.bouge(150,0)
#prend gobelet
#robot.com.appelActionneurMonteeGobeletDevant()
time.sleep(1)
robot.bouge(-150,0)
time.sleep(1)
robot.allerAangle((int(250),int(250)), int(-900))
robot.com.appelDescenteClapDroit()
robot.allerAangle((int(250),int(250)), int(0))
robot.allerAangle((int(850),int(250)), int(-900))
robot.allerAangle((int(850),int(250)), int(0))
robot.bouge(100,0)
robot.com.appelMonteeClapDroit()
# fait claps

robot.allerAangle((int(600),int(1000)), int(1800))
#robot.com.appelDescenteGobeletDevant()
开发者ID:SupelecRobotics,项目名称:RobotsSUMO2017,代码行数:33,代码来源:script11.py

示例5: Robot

# 需要导入模块: from Robot import Robot [as 别名]
# 或者: from Robot.Robot import bouge [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))
开发者ID:SupelecRobotics,项目名称:RobotsSUMO2017,代码行数:33,代码来源:script24.py

示例6:

# 需要导入模块: from Robot import Robot [as 别名]
# 或者: from Robot.Robot import bouge [as 别名]
robot.goToCylindreLocal((2910, 250), False)

#plot 2
robot.goToCylindreLocal((2910, 150), False)

#claps
robot.allerAangle((int(2750),int(230)),900)
robot.com.appelMonteeActionneurGobeletDerriere()
robot.com.appelDescenteClapGauche()
robot.allerAangle((int(2750),int(230)), 1800)
robot.com.appelMonteeClapGauche()

robot.allerAangle((int(2300),int(230)), 1800)
robot.com.appelDescenteClapGauche()
#robot.allerAangle((int(900),int(230)), 0)
robot.bouge(int(2800),1800)
robot.com.appelMonteeClapGauche()


# 2 cylindres P7 P8 
robot.goToCylindreLocal((1900, 230), True)
robot.goToCylindreLocal((1700, 600), True)

# dépose des 4 cylindres
robot.allerA((1700, 310))
time.sleep(1)

# cylindre P6
robot.allerA((1960, 950))
robot.goToCylindreLocal((2130, 645), True)
开发者ID:SupelecRobotics,项目名称:RobotsSUMO2017,代码行数:32,代码来源:script25.py

示例7: Robot

# 需要导入模块: from Robot import Robot [as 别名]
# 或者: from Robot.Robot import bouge [as 别名]
# -*- coding: utf-8 -*-
"""
Created on Tue Mar 17 19:47:24 2015

@author: Fabien
"""

from Robot import Robot

#print "a"
robot = Robot('/dev/ttyACM0','/dev/ttyACM1','/dev/ttyACM2')
#print "Robot created"
robot.printPosition()
#print "got position"
robot.bouge(100,0)
#print "moved"
robot.printPosition()
robot.bouge(0,100)
robot.printPosition()
开发者ID:SupelecRobotics,项目名称:RobotsSUMO2017,代码行数:21,代码来源:script5.py

示例8: Robot

# 需要导入模块: from Robot import Robot [as 别名]
# 或者: from Robot.Robot import bouge [as 别名]
# -*- coding: utf-8 -*-
"""
Created on Mon Mar 30 14:49:22 2015

@author: Fabien
"""

from Robot import Robot
import time

robot = Robot('/dev/ttyACM0','/dev/ttyACM1','/dev/ttyACM2')
robot.printPosition()
robot.bouge(200,0)
robot.printPosition()
time.sleep(2)
robot.printPosition()
#robot.bougeBest(0,100)
#robot.printPosition()
开发者ID:SupelecRobotics,项目名称:RobotsSUMO2017,代码行数:20,代码来源:script6.py

示例9: Robot

# 需要导入模块: from Robot import Robot [as 别名]
# 或者: from Robot.Robot import bouge [as 别名]
# -*- coding: utf-8 -*-
"""
Created on Thu Apr 16 10:45:59 2015

@author: Fabien
"""

from Robot import Robot
import time

robot = Robot('/dev/ttyACM0','/dev/ttyACM1','/dev/ttyACM2')

robot.bouge(0,-170)
robot.bouge(200,0)
robot.com.appelMonteeActionneurGobeletDevant()
robot.bouge(100,0)
time.sleep(1)
robot.com.appelDescenteActionneurGobeletDevant()
robot.bouge(-200,0)
#robot.bouge(0,-900)
#robot.com.appelDescenteActionneurGobeletDerriere()
#time.sleep(3)
#robot.com.appelMonteeActionneurGobeletDerriere()

#robot.com.appelDescenteClapDroit()
#robot.bouge(0,500)
#robot.bouge(0,-500)
#robot.com.appelMonteeClapDroit()
#robot.com.appelMonteeClapDroit()

#robot.com.appelDescenteClapGauche()
开发者ID:SupelecRobotics,项目名称:RobotsSUMO2017,代码行数:33,代码来源:script12.py

示例10: angle

# 需要导入模块: from Robot import Robot [as 别名]
# 或者: from Robot.Robot import bouge [as 别名]
#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) = (910, 1170)


delta = - robot.theta + angle((1, 0), (x - x0, y - y0))*1800/math.pi

robot.bouge(0, int(delta))
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
开发者ID:SupelecRobotics,项目名称:RobotsSUMO2017,代码行数:33,代码来源:script17.py


注:本文中的Robot.Robot.bouge方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。