Skip to content
This repository was archived by the owner on Sep 14, 2019. It is now read-only.

Commit cf4650b

Browse files
authored
Merge pull request #23 from DeepBlueRobotics/aaa-reference.md
add aaa-reference.md
2 parents 9583c2f + 92afd5f commit cf4650b

1 file changed

Lines changed: 56 additions & 0 deletions

File tree

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Synopsis
2+
3+
AAA is a simple, pseudo-assembly, interpreted language.
4+
5+
Individual path scripts start with a name + a colon and end with the next script,the end command, or the end of the file. Each command occupies one line, and anything on a line past a pound sign is ignored.
6+
7+
The language should be able to be converted into either PID + turns or motion profiling commands.
8+
9+
Distance arguments are in inches, rotation in arc degrees. All numbers can have a floating point.
10+
11+
Ex:
12+
```
13+
1 | LLRx:
14+
2 | wait 5 # wait for other robots to move past
15+
3 | move (12,24) (30,48.5) 125.75 # move to those points and turn
16+
4 | scale # place cube in scale
17+
5 | end # end the script (not necessary)
18+
```
19+
20+
# Script Naming Convention
21+
22+
The 4 characters represent 4 values. All paths include crossing the baseline at some point.
23+
24+
1. Robot's start position.
25+
* R = right, C = center, L = left.
26+
2. Switch information.
27+
* R = going for the right plate, L = going for the left plate, x = not going for switch
28+
3. Scale information.
29+
* R = going for the right plate, L = going for the left plate, x = not going for scale
30+
4. Exchange.
31+
* E = going for the exchange, x = not going for exchange
32+
33+
Ex:
34+
35+
**LLRx**: starting on the left, go for the switch's left plate and then the scale's right plate. don't go for the exchange.
36+
**Cxxx**: starting in the center, just cross the baseline. don't go for the exchange.
37+
**LxRx**: starting on the left, go for the scale's right plate. don't go for the exchange.
38+
**RLxE**: starting on the right, go for the switch on the left, and then go for the exchange.
39+
40+
41+
# Instruction Reference
42+
43+
<!-- Sorry about how ugly the table is, it's either this or gigantic spacing that also looks ugly if you have word wrap - @kevinzwang -->
44+
45+
| Name | Description | Example Usage |
46+
| --- | --- | ---|
47+
| end | End the script. Anything after will be ignored. | `end` |
48+
| exchange | Feeds a cube at exchange height. | `exchange` |
49+
| intake | Intakes a cube in front of the robot. | `intake` |
50+
| jump | Jumps to the specified script and continues the current script when finished. (Doesn’t make the robot go up.) | `jump MoveToRScale`
51+
| move | Move forward or backwards for the specified amount in inches, relative to the current position. | `move 24` |
52+
| moveto | Move to 1 or more points, sequentially, with an optional last value having a final angle to face towards, all relative to the starting position. | `moveto (12,0) (36,12)` <br> `moveto (0,12) 90` |
53+
| scale | Place a cube at scale height. | `scale` |
54+
| switch | Place a cube at switch height. | `switch` |
55+
| turn | Turn towards a relative point or rotate clockwise by an angle in degrees, relative to the current position. <br> Negative angle for counterclockwise. | `turn (36,48)` <br> `turn 45` |
56+
| wait | Waits for the number of seconds before proceeding to next command. | `wait 5` |

0 commit comments

Comments
 (0)