Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
roco-scr2022
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
mehtank
roco-scr2022
Commits
756386ce
Commit
756386ce
authored
2 years ago
by
mehtank
Browse files
Options
Downloads
Patches
Plain Diff
Bobble cleanup
parent
eaa2d9bf
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bobble/builders/BobbleBuilder.py
+17
-9
17 additions, 9 deletions
bobble/builders/BobbleBuilder.py
bobble/library/Bobble.yaml
+258
-0
258 additions, 0 deletions
bobble/library/Bobble.yaml
with
275 additions
and
9 deletions
bobble/builders/BobbleBuilder.py
+
17
−
9
View file @
756386ce
from
rocolib.api.components.Component
import
newComponent
from
rocolib.api.components.Component
import
newComponent
from
rocolib.api.Function
import
Function
from
rocolib.library
import
save
from
rocolib.library
import
save
c
=
newComponent
(
"
Bobble
"
)
c
=
newComponent
(
"
Bobble
"
)
c
.
addParameter
(
"
headheight
"
,
50
,
paramType
=
"
length
"
)
c
.
addParameter
(
"
bodyheight
"
,
75
,
paramType
=
"
length
"
)
c
.
addParameter
(
"
bodywidth
"
,
40
,
paramType
=
"
length
"
)
c
.
addSubcomponent
(
"
drive
"
,
"
DualMountedServo
"
,
inherit
=
True
,
prefix
=
None
)
c
.
addSubcomponent
(
"
drive
"
,
"
DualMountedServo
"
,
inherit
=
True
,
prefix
=
None
)
c
.
addSubcomponent
(
"
head
"
,
"
Box
"
,
inherit
=
"
length
"
)
c
.
addSubcomponent
(
"
head
"
,
"
Box
"
)
c
.
addSubcomponent
(
"
body
"
,
"
Box
"
,
inherit
=
"
length
"
)
c
.
addSubcomponent
(
"
body
"
,
"
Box
"
)
c
.
addSubcomponent
(
"
loop
"
,
"
bobble:
SimpleUChannel
"
)
c
.
addSubcomponent
(
"
loop
"
,
"
SimpleUChannel
"
)
c
.
delParameter
(
"
length
"
)
c
.
delParameter
(
"
length
"
)
...
@@ -26,19 +31,22 @@ c.addConstraint(("drive", "length"), "servo", l)
...
@@ -26,19 +31,22 @@ c.addConstraint(("drive", "length"), "servo", l)
c
.
addConstraint
((
"
head
"
,
"
w
"
),
"
servo
"
,
d1
)
c
.
addConstraint
((
"
head
"
,
"
w
"
),
"
servo
"
,
d1
)
c
.
addConstraint
((
"
head
"
,
"
l
"
),
"
servo
"
,
d1
)
c
.
addConstraint
((
"
head
"
,
"
l
"
),
"
servo
"
,
d1
)
c
.
addConstraint
((
"
head
"
,
"
h
"
),
"
headheight
"
)
c
.
addConstraint
((
"
body
"
,
"
w
"
),
"
servo
"
,
d2
)
c
.
addConstraint
((
"
body
"
,
"
w
"
),
"
bodywidth
"
)
c
.
addConstraint
((
"
body
"
,
"
l
"
),
"
servo
"
,
d2
)
c
.
addConstraint
((
"
body
"
,
"
l
"
),
"
servo
"
,
d2
)
c
.
addConstraint
((
"
body
"
,
"
h
"
),
"
bodyheight
"
)
c
.
join
((
"
body
"
,
"
l.b
"
),
(
"
loop
"
,
"
ledge
"
))
c
.
addConstraint
((
"
loop
"
,
"
length
"
),
"
bodywidth
"
)
c
.
join
((
"
body
"
,
"
r.b
"
),
(
"
loop
"
,
"
redge
"
),
tabWidth
=
8
)
c
.
addConstraint
((
"
loop
"
,
"
width
"
),
"
servo
"
,
d2
)
c
.
addConstraint
((
"
loop
"
,
"
width
"
),
"
servo
"
,
d2
)
c
.
addConstraint
((
"
loop
"
,
"
depth
"
),
"
servo
"
,
l
)
c
.
addConstraint
((
"
loop
"
,
"
depth
"
),
"
servo
"
,
l
)
c
.
inheritAllInterfaces
(
"
drive
"
,
prefix
=
None
)
c
.
addConnection
((
"
body
"
,
"
l.b
"
),
(
"
loop
"
,
"
ledge
"
))
c
.
addConnection
((
"
body
"
,
"
r.b
"
),
(
"
loop
"
,
"
redge
"
),
tabWidth
=
15
)
c
.
addParameter
(
"
offset
"
,
(
0
,
15
),
valueType
=
"
list
"
)
c
.
addConnection
((
"
drive
"
,
"
motor1.horn
"
),
c
.
addConnection
((
"
drive
"
,
"
motor1.horn
"
),
(
"
head
"
,
"
f.face
"
),
copyDecorations
=
True
)
(
"
head
"
,
"
f.face
"
),
offset
=
Function
(
"
offset
"
),
copyDecorations
=
True
)
c
.
addConnection
((
"
drive
"
,
"
motor2.horn
"
),
c
.
addConnection
((
"
drive
"
,
"
motor2.horn
"
),
(
"
loop
"
,
"
lface
"
),
rotate
=
90
,
copyDecorations
=
True
)
(
"
loop
"
,
"
lface
"
),
rotate
=
90
,
copyDecorations
=
True
)
...
...
This diff is collapsed.
Click to expand it.
bobble/library/Bobble.yaml
0 → 100644
+
258
−
0
View file @
756386ce
connections
:
connection0
:
-
-
body
-
l.b
-
-
loop
-
ledge
-
{}
connection1
:
-
-
body
-
r.b
-
-
loop
-
redge
-
tabWidth
:
15
connection2
:
-
-
drive
-
motor1.horn
-
-
head
-
f.face
-
copyDecorations
:
true
offset
:
parameter
:
offset
connection3
:
-
-
drive
-
motor2.horn
-
-
loop
-
lface
-
copyDecorations
:
true
rotate
:
90
interfaces
:
{}
parameters
:
_dx
:
defaultValue
:
0
spec
:
hidden
:
true
minValue
:
null
units
:
mm
valueType
:
float
_dy
:
defaultValue
:
0
spec
:
hidden
:
true
minValue
:
null
units
:
mm
valueType
:
float
_dz
:
defaultValue
:
0
spec
:
hidden
:
true
minValue
:
null
units
:
mm
valueType
:
float
_q_a
:
defaultValue
:
1
spec
:
hidden
:
true
maxValue
:
1
minValue
:
-1
valueType
:
float
_q_i
:
defaultValue
:
0
spec
:
hidden
:
true
maxValue
:
1
minValue
:
-1
valueType
:
float
_q_j
:
defaultValue
:
0
spec
:
hidden
:
true
maxValue
:
1
minValue
:
-1
valueType
:
float
_q_k
:
defaultValue
:
0
spec
:
hidden
:
true
maxValue
:
1
minValue
:
-1
valueType
:
float
addTabs
:
defaultValue
:
true
spec
:
hidden
:
true
valueType
:
bool
bodyheight
:
defaultValue
:
75
spec
:
minValue
:
0
units
:
mm
valueType
:
float
bodywidth
:
defaultValue
:
40
spec
:
minValue
:
0
units
:
mm
valueType
:
float
centermount
:
defaultValue
:
true
spec
:
valueType
:
bool
flip
:
defaultValue
:
false
spec
:
valueType
:
bool
headheight
:
defaultValue
:
50
spec
:
minValue
:
0
units
:
mm
valueType
:
float
hornmount
:
defaultValue
:
true
spec
:
valueType
:
bool
hornslots
:
defaultValue
:
true
spec
:
valueType
:
bool
offset
:
defaultValue
:
-
0
-
15
spec
:
valueType
:
list
pitch
:
defaultValue
:
15
spec
:
maxValue
:
360
minValue
:
0
units
:
degrees
valueType
:
float
roll
:
defaultValue
:
10
spec
:
maxValue
:
360
minValue
:
0
units
:
degrees
valueType
:
float
servo
:
defaultValue
:
fs90r
spec
:
values
:
ds2g
:
horndepth
:
2
hornheight
:
9
hornlength
:
10
hornoffset
:
4
hornwidth
:
3
motorheight
:
11
motorlength
:
17
motorwidth
:
8.5
shoulderlength
:
3.5
fs90r
:
horndepth
:
2
hornheight
:
11
hornlength
:
10
hornoffset
:
8
hornwidth
:
5
motorheight
:
19
motorlength
:
23
motorwidth
:
13
shoulderlength
:
5
s4303r
:
horndepth
:
2
hornheight
:
14
hornlength
:
38
hornoffset
:
7
hornwidth
:
3
motorheight
:
29
motorlength
:
31
motorwidth
:
17
shoulderlength
:
10
tgy1370a
:
horndepth
:
2
hornheight
:
10
hornlength
:
7
hornoffset
:
4
hornwidth
:
3
motorheight
:
14
motorlength
:
20
motorwidth
:
9
shoulderlength
:
4
source
:
../../../plugins/bobble/bobble/builders/BobbleBuilder.py
subcomponents
:
body
:
classname
:
Box
kwargs
:
{}
parameters
:
h
:
parameter
:
bodyheight
l
:
function
:
2 * (x.get("horndepth") + x.get("hornheight")) + x.get("motorwidth")
parameter
:
servo
w
:
parameter
:
bodywidth
drive
:
classname
:
DualMountedServo
kwargs
:
{}
parameters
:
_dx
:
parameter
:
_dx
_dy
:
parameter
:
_dy
_dz
:
parameter
:
_dz
_q_a
:
parameter
:
_q_a
_q_i
:
parameter
:
_q_i
_q_j
:
parameter
:
_q_j
_q_k
:
parameter
:
_q_k
addTabs
:
parameter
:
addTabs
centermount
:
parameter
:
centermount
flip
:
parameter
:
flip
hornmount
:
parameter
:
hornmount
hornslots
:
parameter
:
hornslots
length
:
function
:
4 * x.get("shoulderlength") + x.get("motorlength")
parameter
:
servo
pitch
:
parameter
:
pitch
roll
:
parameter
:
roll
servo
:
parameter
:
servo
head
:
classname
:
Box
kwargs
:
{}
parameters
:
h
:
parameter
:
headheight
l
:
function
:
2 * (x.get("horndepth") + x.get("hornheight") + x.get("motorheight"))
+ x.get("motorwidth")
parameter
:
servo
w
:
function
:
2 * (x.get("horndepth") + x.get("hornheight") + x.get("motorheight"))
+ x.get("motorwidth")
parameter
:
servo
loop
:
classname
:
SimpleUChannel
kwargs
:
{}
parameters
:
depth
:
function
:
4 * x.get("shoulderlength") + x.get("motorlength")
parameter
:
servo
length
:
parameter
:
bodywidth
width
:
function
:
2 * (x.get("horndepth") + x.get("hornheight")) + x.get("motorwidth")
parameter
:
servo
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