-
Notifications
You must be signed in to change notification settings - Fork 0
/
bacasable.py
96 lines (76 loc) · 1.56 KB
/
bacasable.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#!/usr/bin/python3
# from class_highway import *<
from class_point import *
from class_robot import *
from class_table import *
from math import *
from math import *
from proxi_serial import *
from time import sleep
import random
import threading
table = Table();
proxy = Proxy_serial()
robot = Robot(table,proxy);
robot.distanceHard()
robot.rotationHard()
robot.distanceMedium()
robot.setTicks(0,0)
robot.setX(0)
robot.setY(0)
robot.setAngle(0)
# robot.closeBackGrip()
# robot.closeBallGrip()
# sleep (4)
# robot.openBallGrip()
# robot.openBackGrip()
# robot.moveForward(50)
# robot.closeFrontGrip()
# robot.getRotCoeffs()
# robot.distanceVeryHard()
# robot.goSlow()
# robot.dumpSpeed()
# robot.goFast()
# robot.dumpSpeed()
# robot.goto(100,0)
# robot.setX(1000)
# robot.setY(1000)
# while True:
# print(robot.checkObstacle())
# # while True :
robot.openFrontGrip()
sleep(1)
robot.closeFrontGrip()
sleep(1)
robot.openBackGrip()
sleep(1)
robot.closeBackGrip()
sleep(1)
robot.openBallGrip()
sleep(1)
# robot.closeBa<llGrip()
# robot.setBras(0,0)
# sleep(1)
# robot.setBras(50,50)
# robot.goto(30, 0, end_angle = 0)
# robot.goto(0, 0, end_angle = 0)
# robot.moveBackwardUntilblockage()
# robot.emergencyStop()
# robot.moveBackward(400)
# robot.rotateTo(pi)
# sleep(2)
# robot.rotateTo(0)
# sleep(5)
# robot.distanceSoft()
# robot.rotationSoft()
# # robot.setDistCoeffs(0,0)
# while True :
# print(robot.isJumperIn())
# robot.proxy.setServo(15,10)
# sleep(1)
# robot.proxy.setServo(15,100)
print(robot.getX())
print(robot.getY())
print(robot.getAngle())
# # print()
# sleep(1)