Skip to content
Snippets Groups Projects
Commit 83627ec2 authored by Jayant Khatkar's avatar Jayant Khatkar
Browse files

create plan for first print, change home position...

create plan for first print, change home position (twins-controller#19)
parent 6319751b
No related merge requests found
...@@ -511,7 +511,7 @@ def decmcts(contour_tracker, ...@@ -511,7 +511,7 @@ def decmcts(contour_tracker,
if __name__ == "__main__": if __name__ == "__main__":
# Read gcode file # Read gcode file
model = "flexirex_big" model = "CuteOcto_x2"
tracker = tu.get_tracker(model) tracker = tu.get_tracker(model)
# 3arms simulation # 3arms simulation
...@@ -523,14 +523,13 @@ if __name__ == "__main__": ...@@ -523,14 +523,13 @@ if __name__ == "__main__":
# 2arms real calibration # 2arms real calibration
env_desc2 = tu.read_env('calibrations/r1_tforms.yaml', env_desc2 = tu.read_env('calibrations/r1_tforms.yaml',
'calibrations/r2_tforms.yaml') 'calibrations/r2_tforms.yaml')
env = tu.SimEnv(env_desc=env_desc3, gui=False, home=home) env = tu.SimEnv(env_desc=env_desc2, gui=True, home=home)
# decmcts plan first n contours # decmcts plan first n contours
c_traj_file = "gcode/" + model + ".c_traj"
cs, plan = decmcts(tracker, cs, plan = decmcts(tracker,
env, env,
n_layers=2, n_layers=2,
mcts_nodes=1000 mcts_nodes=200
) )
visualiseCombinedSchedule(cs) visualiseCombinedSchedule(cs)
plan.visualise() plan.visualise()
This diff is collapsed.
...@@ -13,7 +13,7 @@ import pickle ...@@ -13,7 +13,7 @@ import pickle
import copy import copy
home = [-pi/2, -pi/2, pi/4, -pi/4, -pi/2, -pi/4] home = [0, -pi/2, pi/4, -pi/4, -pi/2, -pi/4]
def plan(points, env, gui=False): def plan(points, env, gui=False):
......
...@@ -7,7 +7,7 @@ import warnings ...@@ -7,7 +7,7 @@ import warnings
import pickle import pickle
home = [-pi/2, -pi/2, pi/4, -pi/4, -pi/2, -pi/4] home = [0, -pi/2, pi/4, -pi/4, -pi/2, -pi/4]
def greedy(contour_tracker, env_desc, n_contours=None, gui=False): def greedy(contour_tracker, env_desc, n_contours=None, gui=False):
...@@ -151,7 +151,7 @@ def greedy(contour_tracker, env_desc, n_contours=None, gui=False): ...@@ -151,7 +151,7 @@ def greedy(contour_tracker, env_desc, n_contours=None, gui=False):
if __name__ == "__main__": if __name__ == "__main__":
# Read gcode file # Read gcode file
model = "flexirex_big" model = "CuteOcto_x2"
tracker = tu.get_tracker(model) tracker = tu.get_tracker(model)
# 3arms simulation # 3arms simulation
...@@ -165,4 +165,4 @@ if __name__ == "__main__": ...@@ -165,4 +165,4 @@ if __name__ == "__main__":
'calibrations/r2_tforms.yaml') 'calibrations/r2_tforms.yaml')
# Greedily plan first n contours # Greedily plan first n contours
plan = greedy(tracker, env_desc3, n_contours=10, gui=True) plan = greedy(tracker, env_desc2, n_contours=10, gui=True)
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment