-
Notifications
You must be signed in to change notification settings - Fork 0
/
dxl-spider
executable file
·56 lines (50 loc) · 1.26 KB
/
dxl-spider
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
#!/usr/bin/python
from clize import clize, run
@clize
def spider():
from servo.config import ServoConfig
from servo.network import ServoNetwork
from servo.spider import KingSpider
config = ServoConfig()
network = ServoNetwork(config)
spider = KingSpider(network)
spider.reset()
import time
time.sleep(1)
TIME_BETWEEN_UPDOWN=0.0
TIME_BETWEEN_FRONT_BACK=0.0
TIME_BETWEEN_MOUVEMENT=0.1
while 1:
spider.leg_f_l.down()
spider.leg_b_l.down()
spider.leg_m_r.down()
time.sleep(TIME_BETWEEN_UPDOWN)
spider.leg_f_r.up()
spider.leg_b_r.up()
spider.leg_m_l.up()
time.sleep(TIME_BETWEEN_MOUVEMENT)
spider.leg_f_r.front()
spider.leg_b_r.front()
spider.leg_m_l.front()
time.sleep(TIME_BETWEEN_FRONT_BACK)
spider.leg_f_l.back()
spider.leg_b_l.back()
spider.leg_m_r.back()
time.sleep(TIME_BETWEEN_MOUVEMENT)
spider.leg_f_r.down()
spider.leg_b_r.down()
spider.leg_m_l.down()
time.sleep(TIME_BETWEEN_UPDOWN)
spider.leg_f_l.up()
spider.leg_b_l.up()
spider.leg_m_r.up()
time.sleep(TIME_BETWEEN_MOUVEMENT)
spider.leg_f_r.back()
spider.leg_b_r.back()
spider.leg_m_l.back()
time.sleep(TIME_BETWEEN_FRONT_BACK)
spider.leg_f_l.front()
spider.leg_b_l.front()
spider.leg_m_r.front()
time.sleep(TIME_BETWEEN_MOUVEMENT)
run(spider)