README.md 5.11 KB
Newer Older
1
# Automatakit API
Jake Read's avatar
Jake Read committed
2

Jake Read's avatar
Jake Read committed
3
4
aka project 'consistent-sandbox' 

Jake Read's avatar
Jake Read committed
5
6
![img software](doc/images/atkapi.png)
![img hardware](doc/images/machine-with-atkapi.jpg)
Jake Read's avatar
Jake Read committed
7

Jake Read's avatar
Jake Read committed
8
[Automatakit](http://gitlab.cba.mit.edu/jakeread/automatakit) is a system architecture for robotics where machine controllers are extensible, and organized around the principle of event propagation: things happen because of other things that have happened beforehand. 
Jake Read's avatar
Jake Read committed
9

Jake Read's avatar
Jake Read committed
10
We aim to take an event graph architecture down through multiple layers of computing, routing event propagation also through a message passing network between multiple cpus each operating modular hardware endpoints.
Jake Read's avatar
Jake Read committed
11

Jake Read's avatar
Jake Read committed
12
This project serves the developement environment / api we use to write and represent programs that are event graphs. 
Jake Read's avatar
Jake Read committed
13

Jake Read's avatar
Jake Read committed
14
![img moving](doc/images/mothermother.gif)
Jake Read's avatar
Jake Read committed
15

Jake Read's avatar
Jake Read committed
16
17
## For MW

Jake Read's avatar
Jake Read committed
18
19
20
21
22
23
24
25
26
27
 - GIFS
  - load a program
  - drag around
  - zoom in and out 
  - add a module
  - hook events up
  - rm events
  - rm modules
  - change settings 

28
 - right now
Jake Read's avatar
Jake Read committed
29
30
31
32
  - push state down & up 
   - note below : 
   - not actually setting, do node main, change ms, watch console 
  - some wholistic test ... 
33

Jake Read's avatar
hookup    
Jake Read committed
34
 - *don't forget*
Jake Read's avatar
Jake Read committed
35
  - onload, load state... 
Jake Read's avatar
hookup    
Jake Read committed
36
  - when hooking back to server, server.emitChange(key) ... from writeStateObject 
Jake Read's avatar
Jake Read committed
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51

 - this spiral
  - entire programs read into UI
   - hook sever-and-back 
    - for event hookup
    - for module add 
    - for state push-down 
   - re-hook state push-down 
  - can req and add to program new modules
  - can req to load new program 
  - can req to save this program 

 - next spiral
  - programs come in chunk-wise and get placed 
  - programs are modules are heirarchical 
Jake Read's avatar
hookup    
Jake Read committed
52

Jake Read's avatar
Jake Read committed
53
 - fundament
Jake Read's avatar
Jake Read committed
54
55
56
57
  - the basic unit is a .js file having inputs, outputs, and state objects 
  - we can compose programs of these modules, being collections of them with connections 
  - we can represent these programs heirarchically, or in a flat manner ... heirarchy just requires an extra wrap, we do it later
  
Jake Read's avatar
Jake Read committed
58
  - load / save programs (req. prgmem representation) 
Jake Read's avatar
Jake Read committed
59
  - rewrite ui & transfers to use this rep. 
Jake Read's avatar
Jake Read committed
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
 - UI 
  - title bar descr. how to operate
  - 'L' for load, 'M' for new module, type for module search ?
  - right-click delete / copy etc 
  - evt line highlight on hover 
  - hover display type

## WRT Representations

OK

Module have 
 Inputs
 Outputs
 State (initial states are settings)

Also
 Names, IDs
 Paths-to-source 

Modules-that-represent-remote-computing also have
 Ports
Jake Read's avatar
Jake Read committed
82
 that connect to a
Jake Read's avatar
Jake Read committed
83
84
85
86
87
 Link 

To assemble a representation of these, we want to have a kind of 'netlist' that, for convenience, we'll treat like a JSON object. We want heirarchy, so consider the representation having 'top-level' outputs / inputs / state as well ? 


Jake Read's avatar
Jake Read committed
88
## Programming Notes
Jake Read's avatar
Jake Read committed
89

Jake Read's avatar
Jake Read committed
90
91
92
### 15 Minute Tasks 
 - @ views.js, uiRequestModuleMenu and uiRequestProgramMenu don't properly build trees from folder structure. similarly, reciprical fn's in client.js do the same 
 - @ these load / save functions could also reach into the modules' source to retrieve their proper names, as spec'd in description ... 
Jake Read's avatar
Jake Read committed
93

Jake Read's avatar
Jake Read committed
94
 - 's' for save program uses hack-asf DOM alert to ask for path
Jake Read's avatar
Jake Read committed
95
96
97
98
99

title bar
L for load prgmem
M for add module

Jake Read's avatar
Jake Read committed
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
- once we can plan gcode sequence, work towards more
 - better hardware abstraction, i.e.
   stepper.port = bridge.port('0,1')
   stepper.port.onPacket = function(){ ... } 
   callbacks ? 
 - UI elements, i.e. demonstrating slider for individual axis movements, or just an arrow / keypad capture on mouseover thing 

## Deeply Missing
- delete modules / module context menu 
- load / save program 
- decent page nav 
- title bar / instructions 
- heirarchy zoom 
- states / uis / etc - one off / one-at-a-time for updates 
 - i.e. all f'n update calls are to single module-global state update
 - ! 
- states / getters / setters not applicable to sub-elements in an object within state
 - i.e. array access 
- consistent dereferencing, type checking implementation?

Jake Read's avatar
Jake Read committed
120
121
122
## Planner Bugs
 - trapezoid linking doesn't account for speed changes properly, i.e. doesn't ramp down into next move if next move's cruise speed is less than our exit speed 

Jake Read's avatar
Jake Read committed
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
## Want
- log() for logs-from-module tagged 

## Demo Desires 
- want to show immediacy of hardware: software representation
- want to show physical reconfigurability and software reconfigurability
 - i.e. mill, add rotary tool, pull normal vector from planner moves and route to r motor 
- want to have UI elements
 - button, terminal, 
- live motor torque display, vector from accelerometer 

## Network Desires
- c improvements / dma etc, would be very cool
- flow control probably desired ... what can we model with uart and implement with fpga?
- proper speed tests
- DMA not possible / not enough channels for router implementation / not portable enough ... 
- lights displaying activity

## Bugs
- when bridge has two addresses only one sends
 - add watch for identical addresses
 - besides we want a different network representation 
- cannot connect input to output w/o backwards bezier 
146

Jake Read's avatar
Jake Read committed
147
148
149
150
151
152
153
154
155
156
# The RPI

 - sudo apt-get update
 - sudo apt-get upgrade
 - install nvm
  -  
 - install git 

- https://cnc.js.org/ 
- https://github.com/cncjs/cncjs/wiki/Setup-Guide:-Raspberry-Pi-%7C-Install-Node.js-via-Node-Version-Manager-(NVM)