Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
rocolibjill
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jillian Pantig
rocolibjill
Commits
b02615a9
Commit
b02615a9
authored
4 years ago
by
pjil27
Browse files
Options
Downloads
Patches
Plain Diff
ESP32STACK for boat
parent
b569a669
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
rocolib/builders/ESP32StackBoatBuilder.py
+32
-5
32 additions, 5 deletions
rocolib/builders/ESP32StackBoatBuilder.py
rocolib/library/ESP32StackBoat.yaml
+95
-11
95 additions, 11 deletions
rocolib/library/ESP32StackBoat.yaml
with
127 additions
and
16 deletions
rocolib/builders/ESP32StackBoatBuilder.py
+
32
−
5
View file @
b02615a9
...
...
@@ -3,26 +3,53 @@ from rocolib.api.components.Component import Component
#ESP3 STACK WITH PWM SERVO FEATHERWING
c
=
Component
()
c
.
addSubcomponent
(
"
stack
"
,
"
SubESP32Stack
"
)
c
.
addSubcomponent
(
"
boat
"
,
"
BoatBase
"
)
#the length of the both should always be a multiple of the width of the motor
#as of now i will be setting the length to 117 (so that means 9 * width of the motor which is 13)
c
.
addParameter
(
"
length
"
,
130
,
paramType
=
"
length
"
)
c
.
addParameter
(
"
width
"
,
50
,
paramType
=
"
length
"
)
c
.
addParameter
(
"
depth
"
,
40
,
paramType
=
"
length
"
)
c
.
addParameter
(
"
brains
"
,
"
esp32stack
"
,
paramType
=
"
dimension
"
)
c
.
addParameter
(
"
boat.depth
"
,
20
,
paramType
=
"
length
"
)
c
.
addConstraint
((
"
boat
"
,
"
boat.length
"
),
"
length
"
)
c
.
addConstraint
((
"
boat
"
,
"
boat.width
"
),
"
width
"
)
c
.
addConstraint
((
"
boat
"
,
"
boat.depth
"
),
"
depth
"
)
for
i
in
range
(
2
):
c
.
addSubcomponent
(
"
splitside%d
"
%
i
,
"
SplitEdge
"
)
c
.
addConstraint
((
"
splitside%d
"
%
i
,
"
toplength
"
),
"
length
"
,
"
(x,)
"
)
c
.
addConstraint
((
"
splitside%d
"
%
i
,
"
botlength
"
),
(
"
length
"
,
"
brains
"
),
'
(getDim(x[1],
"
width
"
)/2., getDim(x[1],
"
width
"
)/2.,
'
'
getDim(x[1],
"
width
"
)/2., getDim(x[1],
"
width
"
)/2., getDim(x[1],
"
width
"
)/2., getDim(x[1],
"
width
"
)/2. ,getDim(x[1],
"
width
"
)/2., x[0] - 7 * (getDim(x[1],
"
width
"
)/2))
'
)
c
.
addSubcomponent
(
"
stack
"
,
"
SubESP32Stack
"
)
for
i
in
range
(
4
):
c
.
addSubcomponent
(
"
support%d
"
%
i
,
"
Rectangle
"
)
c
.
addConstraint
((
"
support%d
"
%
i
,
"
w
"
),
"
brains
"
,
"
getDim(x,
'
width
'
)/2.
"
)
c
.
addConstraint
((
"
support%d
"
%
i
,
"
l
"
),
"
boat.
depth
"
)
c
.
addConstraint
((
"
support%d
"
%
i
,
"
l
"
),
"
depth
"
)
for
i
in
range
(
2
):
c
.
addSubcomponent
(
"
split%d
"
%
i
,
"
SplitEdge
"
)
c
.
addConstraint
((
"
split%d
"
%
i
,
"
toplength
"
),
"
brains
"
,
'
(getDim(x,
"
width
"
),)
'
)
c
.
addConstraint
((
"
split%d
"
%
i
,
"
botlength
"
),
"
brains
"
,
'
(getDim(x,
"
width
"
)/2.,getDim(x,
"
width
"
)/2.)
'
)
c
.
addConnection
((
"
stack
"
,
"
topedge
2
"
),
(
"
split0
"
,
"
topedge0
"
))
c
.
addConnection
((
"
stack
"
,
"
botedge
2
"
),
(
"
split1
"
,
"
topedge0
"
))
c
.
addConnection
((
"
stack
"
,
"
topedge
0
"
),
(
"
split0
"
,
"
topedge0
"
))
c
.
addConnection
((
"
stack
"
,
"
botedge
0
"
),
(
"
split1
"
,
"
topedge0
"
))
c
.
addConnection
((
"
split0
"
,
"
botedge0
"
),
(
"
support0
"
,
"
l
"
),
angle
=
90
)
c
.
addConnection
((
"
split0
"
,
"
botedge1
"
),
(
"
support1
"
,
"
l
"
),
angle
=
90
)
c
.
addConnection
((
"
split1
"
,
"
botedge0
"
),
(
"
support2
"
,
"
l
"
),
angle
=
90
)
c
.
addConnection
((
"
split1
"
,
"
botedge1
"
),
(
"
support3
"
,
"
l
"
),
angle
=
90
)
c
.
addConnection
((
"
splitside0
"
,
"
topedge0
"
),
(
"
boat
"
,
"
staredge
"
))
c
.
addConnection
((
"
splitside1
"
,
"
topedge0
"
),
(
"
boat
"
,
"
portedge
"
))
c
.
addConnection
((
"
support0
"
,
"
r
"
),
(
"
splitside0
"
,
"
botedge4
"
),
tabWidth
=
5
)
c
.
addConnection
((
"
support1
"
,
"
r
"
),
(
"
splitside0
"
,
"
botedge5
"
),
tabWidth
=
5
)
c
.
addConnection
((
"
support2
"
,
"
r
"
),
(
"
splitside1
"
,
"
botedge5
"
),
tabWidth
=
5
)
c
.
addConnection
((
"
support3
"
,
"
r
"
),
(
"
splitside1
"
,
"
botedge6
"
),
tabWidth
=
5
)
c
.
toLibrary
(
"
ESP32StackBoat
"
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
rocolib/library/ESP32StackBoat.yaml
+
95
−
11
View file @
b02615a9
connections
:
connection0
:
-
-
stack
-
topedge
2
-
topedge
0
-
-
split0
-
topedge0
-
{}
connection1
:
-
-
stack
-
botedge
2
-
botedge
0
-
-
split1
-
topedge0
-
{}
connection10
:
-
-
support2
-
r
-
-
splitside1
-
botedge5
-
tabWidth
:
5
connection11
:
-
-
support3
-
r
-
-
splitside1
-
botedge6
-
tabWidth
:
5
connection2
:
-
-
split0
-
botedge0
...
...
@@ -35,20 +47,66 @@ connections:
-
-
support3
-
l
-
angle
:
90
connection6
:
-
-
splitside0
-
topedge0
-
-
boat
-
staredge
-
{}
connection7
:
-
-
splitside1
-
topedge0
-
-
boat
-
portedge
-
{}
connection8
:
-
-
support0
-
r
-
-
splitside0
-
botedge4
-
tabWidth
:
5
connection9
:
-
-
support1
-
r
-
-
splitside0
-
botedge5
-
tabWidth
:
5
interfaces
:
{}
parameters
:
boat.depth
:
defaultValue
:
20
brains
:
defaultValue
:
esp32stack
spec
:
valueType
:
str
depth
:
defaultValue
:
40
spec
:
minValue
:
0
units
:
mm
valueType
:
(float, int)
brains
:
defaultValue
:
esp32stack
length
:
defaultValue
:
130
spec
:
valueType
:
str
minValue
:
0
units
:
mm
valueType
:
(float, int)
width
:
defaultValue
:
50
spec
:
minValue
:
0
units
:
mm
valueType
:
(float, int)
source
:
..\builders\ESP32StackBoatBuilder.py
subcomponents
:
boat
:
classname
:
BoatBase
kwargs
:
{}
parameters
:
boat.depth
:
parameter
:
depth
boat.length
:
parameter
:
length
boat.width
:
parameter
:
width
split0
:
classname
:
SplitEdge
kwargs
:
{}
...
...
@@ -69,6 +127,32 @@ subcomponents:
toplength
:
function
:
(getDim(x, "width"),)
parameter
:
brains
splitside0
:
classname
:
SplitEdge
kwargs
:
{}
parameters
:
botlength
:
function
:
(getDim(x[1], "width")/2., getDim(x[1], "width")/2., getDim(x[1],
"width")/2., getDim(x[1], "width")/2., getDim(x[1], "width")/2., getDim(x[1],
"width")/2. ,getDim(x[1], "width")/2., x[0] - 7 * (getDim(x[1], "width")/2))
parameter
:
&id001
-
length
-
brains
toplength
:
function
:
(x,)
parameter
:
length
splitside1
:
classname
:
SplitEdge
kwargs
:
{}
parameters
:
botlength
:
function
:
(getDim(x[1], "width")/2., getDim(x[1], "width")/2., getDim(x[1],
"width")/2., getDim(x[1], "width")/2., getDim(x[1], "width")/2., getDim(x[1],
"width")/2. ,getDim(x[1], "width")/2., x[0] - 7 * (getDim(x[1], "width")/2))
parameter
:
*id001
toplength
:
function
:
(x,)
parameter
:
length
stack
:
classname
:
SubESP32Stack
kwargs
:
{}
...
...
@@ -78,7 +162,7 @@ subcomponents:
kwargs
:
{}
parameters
:
l
:
parameter
:
boat.
depth
parameter
:
depth
w
:
function
:
getDim(x, 'width')/2.
parameter
:
brains
...
...
@@ -87,7 +171,7 @@ subcomponents:
kwargs
:
{}
parameters
:
l
:
parameter
:
boat.
depth
parameter
:
depth
w
:
function
:
getDim(x, 'width')/2.
parameter
:
brains
...
...
@@ -96,7 +180,7 @@ subcomponents:
kwargs
:
{}
parameters
:
l
:
parameter
:
boat.
depth
parameter
:
depth
w
:
function
:
getDim(x, 'width')/2.
parameter
:
brains
...
...
@@ -105,7 +189,7 @@ subcomponents:
kwargs
:
{}
parameters
:
l
:
parameter
:
boat.
depth
parameter
:
depth
w
:
function
:
getDim(x, 'width')/2.
parameter
:
brains
This diff is collapsed.
Click to expand it.
Preview
0%
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