Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bigprint
twins-controller
Commits
242b963b
Commit
242b963b
authored
Jan 15, 2021
by
Jayant Khatkar
Browse files
printing multiple contours with timing issue (
#10
)
parent
242fd886
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/Controller.py
View file @
242b963b
...
...
@@ -145,9 +145,7 @@ class Controller(object):
if
contour
is
not
None
:
print
(
"THIS NEXT TRAJ REQUIRES EXTRUSION"
)
pre_extrude_time
=
0.2
self
.
extrude
(
10
,
pre_extrude_time
)
# extrude 10mm in 0.2s to get started
time
.
sleep
(
pre_extrude_time
)
self
.
preprint_load
()
self
.
extrude
(
contour
.
Ext
[
-
1
],
jtraj
.
time
[
-
1
])
rospy
.
loginfo
(
'Sending trajectory to UR5e'
)
...
...
@@ -164,7 +162,7 @@ class Controller(object):
self
.
traj_complete
=
False
if
contour
is
not
None
:
self
.
extrude
(
-
10
,
0.2
)
self
.
postprint_retract
(
)
return
True
...
...
@@ -277,10 +275,12 @@ class Controller(object):
def
postprint_retract
(
self
):
self
.
extrude
(
-
self
.
retractionDist_mm
,
self
.
retractionTime_s
)
time
.
sleep
(
self
.
retractionTime_s
)
def
preprint_load
(
self
):
self
.
extrude
(
self
.
retractionDist_mm
,
self
.
retractionTime_s
)
time
.
sleep
(
self
.
retractionTime_s
)
def
printFilament
(
self
,
ext_mm
,
t_s
):
...
...
src/main.py
View file @
242b963b
...
...
@@ -36,6 +36,8 @@ def execute_plan(plan, controller, contours=None, confirm=False):
if
confirm
:
a
=
raw_input
(
'Press enter to continue'
)
if
a
==
'n'
:
break
if
t
.
contour
is
not
None
:
controller
.
exec_ctraj
(
speed_multiplier
(
t
,
5
),
contour
=
contours
[
t
.
contour
])
...
...
@@ -51,7 +53,7 @@ if __name__ == '__main__':
# Printing
con
=
Controller
()
execute_plan
(
plan2
,
con
,
contours
=
flexirex_contours
)
execute_plan
(
plan2
,
con
,
contours
=
flexirex_contours
,
confirm
=
True
)
# no printing
#con = Controller(disable_extruder=True)
...
...
src/plans/flexirex.plan
View file @
242b963b
No preview for this file type
src/plans/flexirex1.plan
0 → 100644
View file @
242b963b
File added
src/plans/origin.plan
View file @
242b963b
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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