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
gcode2contour @ git+
gcode2contour @ git+
......@@ -165,4 +165,4 @@ if __name__ == "__main__":
# 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')
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 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