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
84a1799f
Commit
84a1799f
authored
Jan 03, 2021
by
Jayant Khatkar
Browse files
add structure for moveIt execution (
#11
)
parent
cf341479
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main.py
View file @
84a1799f
...
...
@@ -17,12 +17,13 @@ from trajectory_msgs.msg import (
## Our libraries
from
utils
import
load_plan
,
JTraj2ROS
from
Controller
import
Controller
#import gcode2contour as gc
#from extrudex.msg._ExtruderControl import ExtruderControl
#from extrudex.srv._Hotend import Hotend
def
execute_plan
(
plan
):
def
execute_plan
(
plan
,
controller
):
"""
Executes a plan on MoveIt
...
...
@@ -30,8 +31,15 @@ def execute_plan(plan):
"""
for
t
in
plan
.
trajs
[
0
]:
jt
=
JTraj2ROS
(
t
)
try
:
controller
.
exec_traj
(
jt
)
except
:
print
(
"Failed trajectory Execution"
)
break
return
if
__name__
==
'__main__'
:
plan
=
load_plan
(
'plans/1.plan'
)
con
=
Controller
()
execute_plan
(
plan
,
con
)
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