-
Notifications
You must be signed in to change notification settings - Fork 0
/
tutorial.html
183 lines (169 loc) · 9.23 KB
/
tutorial.html
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>BuildAnAuton</title>
</head>
<body style="background-color:#ccf6ff">
<table style="background-color:#ccf6ff;font-family:Arial">
<tr>
<td style="background-color:#4269e2;vertical-align:text-top">
<a href="http://slsd.org/"><img src="https://slsd-wikis.wikispaces.com/space/showlogo/1236203029/logo.png" style="padding-left:10px;padding-right:10px;padding-top:10px;padding-bottom:10px"/></a>
<br/>
<a href="http://team834.org/"><img src="http://team834.org/images/Robotics_Logo.JPG" width=110 height=141 style="padding-left:10px;padding-right:10px;padding-top:10px;padding-bottom:10px"/></a>
</td>
<td style="padding-left:10px">
<h1>Build-an-Auton Tutorial</h1>
<table id="toc" style="border:solid black 1px">
<tr><td style="border:solid black 1px; font-size:24px">Table of Contents</td></tr>
<tr><td style="border:solid black 1px"><a href="#info">Info</a></td></tr>
<tr><td style="border:solid black 1px"><a href="#ccom">Creating a Command</a></td></tr>
<tr><td style="border:solid black 1px"><a href="#editing">Editing a Command</a></td></tr>
<tr><td style="border:solid black 1px"><a href="#threading">Threading</a></td></tr>
<tr><td style="border:solid black 1px"><a href="#saving">Saving</a></td></tr>
<tr><td style="border:solid black 1px"><a href="#opening">Opening</a></td></tr>
<tr><td style="border:solid black 1px"><a href="#exporting">Exporting</a></td></tr>
<tr><td style="border:solid black 1px"><a href="#commands">Commands</a></td></tr>
<tr style="font-size:8pt;font-style:italic"><td style="border:solid black 1px"><li><a href="#com_moveStraight">Move Straight Command</a></li></td></tr>
<tr style="font-size:8pt;font-style:italic"><td style="border:solid black 1px"><li><a href="#com_moveAlongCurve">Move Along Curve Command</a></li></td></tr>
<tr style="font-size:8pt;font-style:italic"><td style="border:solid black 1px"><li><a href="#com_moveToPoint">Move To Point Command</a></li></td></tr>
<tr style="font-size:8pt;font-style:italic"><td style="border:solid black 1px"><li><a href="#com_turn">Turn Command</a></li></td></tr>
<tr style="font-size:8pt;font-style:italic"><td style="border:solid black 1px"><li><a href="#com_lights">Lights Command</a></li></td></tr>
<tr style="font-size:8pt;font-style:italic"><td style="border:solid black 1px"><li><a href="#com_delay">Delay Command</a></li></td></tr>
<tr style="font-size:8pt;font-style:italic"><td style="border:solid black 1px"><li><a href="#com_moveFeederArm">Move Feeder Arm Command</a></li></td></tr>
<tr style="font-size:8pt;font-style:italic"><td style="border:solid black 1px"><li><a href="#com_moveBackArm">Move Back Arm Command</a></li></td></tr>
<tr style="font-size:8pt;font-style:italic"><td style="border:solid black 1px"><li><a href="#com_shoot">Shoot Command</a></li></td></tr>
<tr style="font-size:8pt;font-style:italic"><td style="border:solid black 1px"><li><a href="#com_feeder">Feeder Command</a></li></td></tr>
</table>
<p>
Welcome to the Build-an-Auton tutorial. In this tutorial, we'll go through how to create simple programs that the robot will execute.
</p>
<h3 id="info">Info</h3>
When you open Build-an-Auton, you'll see a timeline, along with several buttons for creating and deleting commands and threads.
<ul>
<li>The timeline will be used as a guideline as to when to execute commands.</li>
<li>The commands will be used for making the robot do things like move, turn, etc.</li>
<li>The threads will be used to run multiple commands at the same time.</li>
</ul>
<img src="pics/img1.png"/>
<h3 id="ccom">Creating a Command</h3>
<p>
Firstly, you'll want to click the "Command" button next to "Add:". A window should pop up prompting you to choose a command to run. In this case, we'll choose the "MoveStraightCommand" which makes the robot move straight.
Once you hit OK, you'll notice that three small, connected boxes will appear somewhere around the timeline.
Clicking on the top box (the one with the name of the command) and moving your mouse will allow you to move the command boxes around.
Clicking on the bottom left box (the one that says "Delete") will delete the command.
Clicking on the bottom right box (the one that says "Edit") will open a window allowing you to edit the different properties that go along with the selected command.
</p>
<img src="pics/img2.png"/>
<img src="pics/img3.png"/>
<h3 id="editing">Editing a Command</h3>
<p>
Go ahead and click on the "Edit" button. You will see a box with two fields, distance and speed, come up. For this tutorial, let's input "5.0" as distance, and "0.75" for speed (speed must be between -1 and 1).
After clicking "Done", the window will disappear and the entered values will be saved.
</p>
<img src="pics/img4.png"/>
<h3 id="threading">Threading</h3>
<p>
Now click the "Thread" button next to "Add:". A window will pop up asking for a command to run with. Basically, this is asking if you want to start running this thread at the same time as a certain command. For this tutorial, we'll just type in "1" (the move command we made).
You'll notice that a new timeline has been created. You'll also notice that if you move the move command around, the timeline will move with it.
This is used for running multiple commands at the same time.
Now, create a new "TurnCommand", the same way that you made the "MoveCommand" earlier.
Drag the newly created turn command onto the second timeline.
</p>
<img src="pics/img5.png"/>
<img src="pics/img6.png"/>
<h3 id="saving">Saving</h3>
<p>
Now, you'll want to click "File" on the bar at the top. A drop-down menu should come up. Select "save" from these options.
Double click on "Desktop", and enter a name in the "Save As" field. In this tutorial, we'll name it "MoveExample".
Click "Save".
This has saved the entire program as a raw binary file on the desktop to be opened later.
</p>
<img src="pics/img7.png"/>
<h3 id="opening">Opening</h3>
<p>
To make sure that this worked, go to the "File" bar at the top, and select "Load".
Under the "File Format" drop-down, select "All Files".
Now, double click on "Desktop", select "MoveExample", and click "Open".
You'll see that Build-an-Auton has reopened the program that you just saved.
</p>
<img src="pics/img8.png"/>
<h3 id="exporting">Exporting</h3>
<p>
A dialog will appear asking for the name of your program (file extension is automatically added).
If you are connected to the RoboRIO when you press OK it will send over FTP.
</p>
<img src="pics/img9.png"/>
<br/>
<hr/>
<h1 id="commands">Commands</h1>
<h3 id="com_moveStraight">Move Straight Command</h3>
<p>
The move straight command is used for moving straight forward and backward.
<li><b>Direction</b> - The direction to move in (forward or backward).</li>
<li><b>Angle</b> - The angle to move at.</li>
<li><b>Speed</b> - The speed to move at.</li>
<li><b>Timeout</b> - The time to move before stopping.</li>
</p>
<h3 id="com_moveAlongCurve">Move Along Curve Command</h3>
<p>
The move along curve command is used for moving around along a curve.
<li><b>Direction</b> - The direction to move in (forward or backward).</li>
<li><b>Radius</b> - The radius of the robot.</li>
<li><b>Speed</b> - The speed to move at.</li>
<li><b>Angle</b> - The angle to move to.</li>
</p>
<h3 id="com_moveToPoint">Move To Point Command</h3>
<p>
The move to point command is used for moving to a specific point on the field (assuming the robot is at [0,0]).
<li><b>Displacement X</b> - The point's x value.</li>
<li><b>Displacement Y</b> - The point's y value.</li>
<li><b>Speed</b> - The speed to move at.</li>
</p>
<h3 id="com_turn">Turn Command</h3>
<p>
The turn command is used for turning to a certain angle.
<li><b>Angle</b> - The angle to turn to.</li>
<li><b>Speed</b> - The speed to turn at.</li>
</p>
<h3 id="com_lights">Lights Command</h3>
<p>
The lights command is used for turning the attached light on and off.
<li><b>On/Off</b> - Whether to turn the light on or off.</li>
</p>
<h3 id="com_delay">Delay Command</h3>
<p>
The delay command is used for waiting a certain amount of time before executing the next command.
<li><b>Time</b> - The length of time to wait.</li>
</p>
<h3 id="com_moveFeederArm">Move Feeder Arm Command</h3>
<p>
The turn command is used for moving the feeder arm to a certain angle.
<li><b>Direction</b> - The direction to move the arm in (forward or backward).</li>
<li><b>Angle</b> - The angle to move to.</li>
<li><b>Speed</b> - The speed to move at.</li>
<li><b>Timeout</b> - The time to move before stopping.</li>
</p>
<h3 id="com_moveBackArm">Move Back Arm Command</h3>
<p>
The turn command is used for moving the back arm to a certain angle.
<li><b>Direction</b> - The direction to move the arm in (forward or backward).</li>
<li><b>Angle</b> - The angle to move to.</li>
<li><b>Speed</b> - The speed to move at.</li>
<li><b>Timeout</b> - The time to move before stopping.</li>
</p>
<h3 id="com_shoot">Shoot Command</h3>
<p>
The shoot command is used for shooting the ball.
<li><b>Time</b> - The amount of time to spin the intake for.</li>
</p>
<h3 id="com_feeder">Feeder Command</h3>
<p>
The feeder command is used for spinning the feeder.
<li><b>Timeout</b> - The amount of time to spin the feeder for.</li>
</p>
</td>
</tr>
</table>
</body>
</html>