Commit a9faff9a authored by Jayant Khatkar's avatar Jayant Khatkar

manually change calibration and urdf to get greedy to make a sensible plan...

manually change calibration and urdf to get greedy to make a sensible plan (twins-controller#19)
parent 0ba6ab62
......@@ -298,7 +298,7 @@
<visual>
<origin rpy="0 0 0" xyz="0.074 0 0"/>
<geometry>
<box size="0.148 0.23 0.13"/>
<box size="0.145 0.23 0.13"/>
</geometry>
<material name="pt_material">
<color rgba="0.3 0.8 0.3 0.95"/>
......@@ -307,7 +307,7 @@
<collision>
<origin rpy="0 0 0" xyz="0.074 0 0"/>
<geometry>
<box size="0.148 0.23 0.13"/>
<box size="0.145 0.23 0.13"/>
</geometry>
</collision>
</link>
......
calibration:
pos_ET: [0.1502296461658024, -0.04698558961114961, -0.031116243011024135]
pos_WR: [0.03844669361396861, -0.572941079182837, -0.13103114911618197]
pos_WR: [0.03844669361396861, -0.572941079182837, -0.13003114911618197]
quat_ET: [-0.2705980500730985, -0.6532814824381882, 0.27059805007309845, 0.6532814824381883]
quat_WR: [-0.005519573998493153, 0.0023551564258786424, -0.999981578967214, 0.0009106411601250241]
measurements:
......
......@@ -511,7 +511,7 @@ def decmcts(contour_tracker,
if __name__ == "__main__":
# Read gcode file
model = "Kitchen_sponge_holder_small-ascii"
model = "CuteOcto_x2"
tracker = tu.get_tracker(model)
# 3arms simulation
......
......@@ -15,9 +15,9 @@ def greedy(contour_tracker, env_desc, n_contours=None, gui=False):
Greedily create a plan on for n arms printer setup
"""
if n_contours is None:
#n_contours = len(contour_tracker.all_contours)
n_contours = len(contour_tracker.available_contours)
if n_contours is None or \
n_contours > len(contour_tracker.available_contours):
n_contours = len(contour_tracker.all_contours)
l_height = tu.get_layer_height(contour_tracker)
bound_mins, bound_maxs = tu.get_bounding_box(contour_tracker)
......@@ -109,7 +109,8 @@ def greedy(contour_tracker, env_desc, n_contours=None, gui=False):
# stay at home for another 10s
stayhome = tu.JTrajectory([home, home],[0,10], arm)
if plan.appendTrajectory([stayhome], arm)!=0:
raise Exception("cannot stay at home - this should never happen, choose a better home position")
return plan
#raise Exception("cannot stay at home - this should never happen, choose a better home position")
else:
# try going to home pos
......@@ -165,4 +166,4 @@ if __name__ == "__main__":
'calibrations/r2_tforms.yaml')
# Greedily plan first n contours
plan = greedy(tracker, env_desc2, n_contours=50, gui=True)
plan = greedy(tracker, env_desc2, n_contours=150, gui=True)
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