-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcoach.py
37 lines (33 loc) · 1.51 KB
/
coach.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
from base_robot import *
# Copy this text into a new mission file. Name it something like
# myname.py. You can name it pretty much anything, but don't use
# any spaces or punctuation, other than _ and -. The name MUST
# end with .py (unlike this file, which ends with .txt)
#
# Add good comments, such as what the mission is supposed to do,
# how to align the robot in home, any initial starting instructions,
# such as how it should be loaded with anything, arm positions, etc.
# Please delete all of these comments, and consider writing your
# own here.
# When we run this program from the master program, we will call this
# "Run(br)" method.
def Run ( br: BaseRobot ) :
# Your mission code goes here, step-by-step
# It MUST be indented just like the lines below
br.driveForDistance(distance=250) # Drive distance
br.turnInPlace( angle = 90 )
br.moveLeftAttachmentMotorForDegrees(degrees=-720)
br.waitForForwardButton ( )
br.driveUntilStalled(speedPct=80, stallPct=5)
br.moveRightAttachmentMotorForMillis(millis=1500)
br.waitForMillis(millis=1000)
br.moveLeftAttachmentMotorUntilStalled(stallPct=100)
br.driveArcDist(radius=)
# If running this program directly (not from the master program), this is
# how we know it is running directly. In which case, this method will
# create a BaseRobot and run the Run(br) method above.
# In other words, keep these three lines at the bottom of your code and
# everything will be fine.
if __name__ == "__main__":
br = BaseRobot()
Run(br)