Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
rocolib
Manage
Activity
Members
Labels
Plan
Issues
31
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
3
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
roco
rocolib
Commits
ac592dea
Commit
ac592dea
authored
2 years ago
by
mehtank
Browse files
Options
Downloads
Plain Diff
Merge branch 'componentfixes' into 'v0.4'
Componentfixes See merge request
mehtank/rocolib!5
parents
e5a52765
fa886c0b
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!34
V0.4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
rocolib/library/ServoMotor.py
+2
-2
2 additions, 2 deletions
rocolib/library/ServoMotor.py
rocolib/library/SimpleUChannel.py
+4
-4
4 additions, 4 deletions
rocolib/library/SimpleUChannel.py
with
6 additions
and
6 deletions
rocolib/library/ServoMotor.py
+
2
−
2
View file @
ac592dea
...
@@ -4,7 +4,7 @@ from rocolib.api.ports import AnchorPort
...
@@ -4,7 +4,7 @@ from rocolib.api.ports import AnchorPort
from
rocolib.utils.utils
import
decorateGraph
from
rocolib.utils.utils
import
decorateGraph
from
rocolib.utils.dimensions
import
getDim
from
rocolib.utils.dimensions
import
getDim
from
rocolib.utils.transforms
import
Translate
,
RotateZ
from
rocolib.utils.transforms
import
Translate
,
RotateZ
from
rocolib.utils.numsym
import
dot
from
rocolib.utils.numsym
import
dot
,
deg2rad
class
ServoMotor
(
FoldedComponent
):
class
ServoMotor
(
FoldedComponent
):
...
@@ -22,7 +22,7 @@ class ServoMotor(FoldedComponent):
...
@@ -22,7 +22,7 @@ class ServoMotor(FoldedComponent):
f
=
Shape
(
"
horn
"
,
0
,
0
)
f
=
Shape
(
"
horn
"
,
0
,
0
)
decorateGraph
(
f
,
Shape
(
"
hole
"
,
1
,
1
))
decorateGraph
(
f
,
Shape
(
"
hole
"
,
1
,
1
))
self
.
addFace
(
f
)
self
.
addFace
(
f
)
self
.
setInterface
(
"
mount
"
,
AnchorPort
(
self
,
self
.
getGraph
(),
"
horn
"
,
dot
(
RotateZ
(
self
.
p
.
angle
),
Translate
([
0
,
-
dy
,
dz
]))))
self
.
setInterface
(
"
mount
"
,
AnchorPort
(
self
,
self
.
getGraph
(),
"
horn
"
,
dot
(
RotateZ
(
deg2rad
(
self
.
p
.
angle
)
)
,
Translate
([
0
,
-
dy
,
dz
]))))
if
__name__
==
"
__main__
"
:
if
__name__
==
"
__main__
"
:
ServoMotor
.
test
()
ServoMotor
.
test
()
This diff is collapsed.
Click to expand it.
rocolib/library/SimpleUChannel.py
+
4
−
4
View file @
ac592dea
...
@@ -9,10 +9,10 @@ class SimpleUChannel(FoldedComponent):
...
@@ -9,10 +9,10 @@ class SimpleUChannel(FoldedComponent):
self
.
addParameter
(
"
width
"
,
50
,
paramType
=
"
length
"
)
self
.
addParameter
(
"
width
"
,
50
,
paramType
=
"
length
"
)
self
.
addParameter
(
"
depth
"
,
20
,
paramType
=
"
length
"
)
self
.
addParameter
(
"
depth
"
,
20
,
paramType
=
"
length
"
)
for
i
in
range
(
3
):
for
i
,
nm
in
enumerate
(
"
lcr
"
):
self
.
addEdgeInterface
(
"
top
edge%d
"
%
i
,
"
r%d.e0
"
%
i
,
[
"
depth
"
,
"
width
"
][
i
%
2
])
self
.
addEdgeInterface
(
f
"
top
{
nm
}
edge
"
,
"
r%d.e0
"
%
i
,
[
"
depth
"
,
"
width
"
][
i
%
2
])
self
.
addEdgeInterface
(
"
bot
edge%d
"
%
i
,
"
r%d.e2
"
%
i
,
[
"
depth
"
,
"
width
"
][
i
%
2
])
self
.
addEdgeInterface
(
f
"
bot
{
nm
}
edge
"
,
"
r%d.e2
"
%
i
,
[
"
depth
"
,
"
width
"
][
i
%
2
])
self
.
addFaceInterface
(
"
face%d
"
%
i
,
"
r%d
"
%
i
)
self
.
addFaceInterface
(
f
"
{
nm
}
face
"
,
"
r%d
"
%
i
)
self
.
addEdgeInterface
(
"
ledge
"
,
"
r0.e3
"
,
"
length
"
)
self
.
addEdgeInterface
(
"
ledge
"
,
"
r0.e3
"
,
"
length
"
)
self
.
addEdgeInterface
(
"
redge
"
,
"
r2.e1
"
,
"
length
"
)
self
.
addEdgeInterface
(
"
redge
"
,
"
r2.e1
"
,
"
length
"
)
...
...
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