Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Jan Koniarik
schpin-robot
Commits
080bfc76
Commit
080bfc76
authored
Jun 10, 2018
by
Jan Koniarik
Browse files
catching up tote
parent
65dbb56e
Changes
3
Hide whitespace changes
Inline
Side-by-side
schpin_tote/src/lib/config.py
View file @
080bfc76
...
...
@@ -233,7 +233,7 @@ def _parse_val(val, top_cfg):
unreplaced_count
=
0
# ignored_names is set of strings that are not considered variables
ignored_names
=
[
"max"
,
"min"
,
"abs"
]
ignored_names
=
[
"max"
,
"min"
,
"abs"
,
"Distance"
]
for
unit_type
in
types
:
ignored_names
.
append
(
str
(
unit_type
.
__name__
))
...
...
@@ -354,7 +354,9 @@ def parse_config(filename):
Returns as dict/list tree with all formulars resolved. """
config
=
yaml
.
load
(
file
(
filename
,
"r"
))
with
open
(
filename
,
'r'
)
as
content_file
:
content
=
content_file
.
read
()
config
=
yaml
.
load
(
content
)
# iterate till replaced_count is bigger than 0
while
_parse_config_rec
(
config
,
config
)[
0
]
>
0
:
...
...
schpin_tote/src/lib/stl.py
View file @
080bfc76
import
subprocess
,
os
from
scad
import
convert_scad
from
lib.util
import
convert_scad
def
render
(
filename
,
scad_cfg
,
mirror
):
...
...
@@ -17,7 +17,7 @@ def render(filename, scad_cfg, mirror):
tmp_stl
=
"../stl/tmp.stl"
print
"Rendering: "
,
filename
print
(
"Rendering: "
,
filename
)
with
open
(
os
.
devnull
,
'wb'
)
as
devnull
:
subprocess
.
check_call
([
'openscad'
,
'-o'
,
tmp_stl
,
scad
],
stdout
=
devnull
,
stderr
=
devnull
)
subprocess
.
check_call
([
'ivcon'
,
tmp_stl
,
filename
])
...
...
schpin_tote/urdf/tote.urdf
View file @
080bfc76
<?xml version="1.0" encoding="UTF-8"?>
<robot
name=
"Tote"
>
<link
name=
"base_link"
>
<visual>
...
...
Write
Preview
Supports
Markdown
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!
Cancel
Please
register
or
sign in
to comment