Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
rndmc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jake Read
rndmc
Commits
85ffd44b
Commit
85ffd44b
authored
6 years ago
by
Jake Read
Browse files
Options
Downloads
Patches
Plain Diff
add robot notes
parent
272032cf
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
robot.js
+25
-6
25 additions, 6 deletions
robot.js
with
25 additions
and
6 deletions
robot.js
+
25
−
6
View file @
85ffd44b
...
@@ -6,13 +6,32 @@ const Programs = require('./programs.js')
...
@@ -6,13 +6,32 @@ const Programs = require('./programs.js')
// the program object: real simple, just has a description, and a 'modules'
// the program object: real simple, just has a description, and a 'modules'
var
program
=
Programs
.
new
(
'
new program
'
)
var
program
=
Programs
.
new
(
'
new program
'
)
/* ok
- robot reads robot joints
- robot takes joint angle samples into array like
[[t1, t2],[t1, t2],...,[t1,t2]]
- robot sends this array to python scripto
- python scripto does l1, l2 guesses
- robot does forward transform with live [t1, t2]
- robot displays forward transform with [t1, t2]
- modules needed
- object collector (i.e. collects inputs into a list, has 'output' and 'reset' input triggers / buttons as well)
- two-up contencator (i.e. takes two inputs, puts them into arrays)
- gate opens, lets a count thru, shuts
*/
var
link
=
Programs
.
loadModuleFromSource
(
program
,
'
./modules/hardware/atkseriallink.js
'
)
var
link
=
Programs
.
loadModuleFromSource
(
program
,
'
./modules/hardware/atkseriallink.js
'
)
link
.
startUp
()
link
.
startUp
()
link
.
state
.
log
=
false
link
.
state
.
log
=
false
Programs
.
setUI
(
link
,
1050
,
50
)
Programs
.
setUI
(
link
,
1050
,
50
)
var
mrbot
=
Programs
.
loadModuleFromSource
(
program
,
'
./modules/hardware/atkmrobot.js
'
)
var
mrbotone
=
Programs
.
loadModuleFromSource
(
program
,
'
./modules/hardware/atkmrobot.js
'
)
Programs
.
setUI
(
mrbot
,
600
,
50
)
Programs
.
setUI
(
mrbotone
,
600
,
50
)
var
mrbottwo
=
Programs
.
loadModuleFromSource
(
program
,
'
./modules/hardware/atkmrobot.js
'
)
Programs
.
setUI
(
mrbottwo
,
600
,
450
)
var
button
=
Programs
.
loadModuleFromSource
(
program
,
'
./modules/ui/button.js
'
)
var
button
=
Programs
.
loadModuleFromSource
(
program
,
'
./modules/ui/button.js
'
)
var
delay
=
Programs
.
loadModuleFromSource
(
program
,
'
./modules/util/delay.js
'
)
var
delay
=
Programs
.
loadModuleFromSource
(
program
,
'
./modules/util/delay.js
'
)
...
@@ -23,18 +42,18 @@ Programs.setUI(button, 90, 50)
...
@@ -23,18 +42,18 @@ Programs.setUI(button, 90, 50)
Programs
.
setUI
(
delay
,
90
,
250
)
Programs
.
setUI
(
delay
,
90
,
250
)
Programs
.
setUI
(
gate
,
90
,
400
)
Programs
.
setUI
(
gate
,
90
,
400
)
button
.
outputs
.
whammy
.
attach
(
mrbot
.
inputs
.
get_pos
)
button
.
outputs
.
whammy
.
attach
(
mrbot
one
.
inputs
.
get_pos
)
button
.
outputs
.
whammy
.
attach
(
delay
.
inputs
.
thru
)
button
.
outputs
.
whammy
.
attach
(
delay
.
inputs
.
thru
)
delay
.
outputs
.
out
.
attach
(
gate
.
inputs
.
thru
)
delay
.
outputs
.
out
.
attach
(
gate
.
inputs
.
thru
)
gate
.
outputs
.
out
.
attach
(
button
.
inputs
.
thru
)
gate
.
outputs
.
out
.
attach
(
button
.
inputs
.
thru
)
var
log
=
Programs
.
loadModuleFromSource
(
program
,
'
./modules/util/log.js
'
)
var
log
=
Programs
.
loadModuleFromSource
(
program
,
'
./modules/util/log.js
'
)
log
.
state
.
prefix
=
"
jnt1:
"
log
.
state
.
prefix
=
"
jnt1:
"
Programs
.
setUI
(
log
,
84
0
,
520
)
Programs
.
setUI
(
log
,
105
0
,
520
)
mrbot
.
outputs
.
pos
.
attach
(
log
.
inputs
.
thru
)
mrbot
one
.
outputs
.
pos
.
attach
(
log
.
inputs
.
thru
)
var
canvas
=
Programs
.
loadModuleFromSource
(
program
,
'
./modules/ui/threeCanvas.js
'
)
var
canvas
=
Programs
.
loadModuleFromSource
(
program
,
'
./modules/ui/threeCanvas.js
'
)
Programs
.
setUI
(
canvas
,
6
00
,
650
)
Programs
.
setUI
(
canvas
,
15
00
,
650
)
/*
/*
var stest = Programs.loadModuleFromSource(program, './modules/ui/stest.js')
var stest = Programs.loadModuleFromSource(program, './modules/ui/stest.js')
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment