Commit 0ba6ab62 authored by Jayant Khatkar's avatar Jayant Khatkar

force layer-by-layer by depending on all contours in last layer. add plan...

force layer-by-layer by depending on all contours in last layer. add plan loading script (twins-controller#19)
parent 43cea86d
......@@ -4,7 +4,7 @@ certifi==2020.11.8
cycler==0.10.0
Cython==0.29.21
decorator==4.4.2
gcode2contour @ git+https://code.research.uts.edu.au/bigprint/gcode2contour.git@415b9dd3fff7c2ecd85558ebcfe5f90f1fda43a6
gcode2contour @ git+https://code.research.uts.edu.au/bigprint/gcode2contour.git@defe7cf5eefe80e4dda02a7d051d22245402aa2a
ipython==7.19.0
ipython-genutils==0.2.0
jedi==0.17.2
......
......@@ -165,4 +165,4 @@ if __name__ == "__main__":
'calibrations/r2_tforms.yaml')
# Greedily plan first n contours
plan = greedy(tracker, env_desc2, n_contours=10, gui=True)
plan = greedy(tracker, env_desc2, n_contours=50, gui=True)
import gcode2contour as gc
from pydecmcts import Tree
import utils as tu
from collections import deque
import matplotlib.pyplot as plt
from math import pi
import time
import numpy as np
import pickle
import copy
import warnings
import random
import argparse
if __name__ == "__main__":
# load plan address from args
parser = argparse.ArgumentParser(description='to watch, visulise and inspect loaded plans')
parser.add_argument('plan',
metavar='plan',
help='plan to read')
args = parser.parse_args()
# load plan
plan = tu.load_plan(args.plan, gui=True)
print("plan loaded, it is {}s long".format(plan.len()))
print("use plan.watch(x) to watch the plan in 3D")
print("use plan.visualise(x) to plot plan")
......@@ -428,7 +428,7 @@ def get_tracker(model):
# 5mm safety, max 5 layers ahead
print("\nCalculating dependency graph - this could take some time...")
tracker = gc.DependencyGraph(contours, 5, 5)
tracker = gc.DependencyGraph(contours, 5, 1)
with open(pkl, 'wb') as f:
pickle.dump(tracker, f)
......
Markdown is supported
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