Update
This commit is contained in:
parent
749e111893
commit
300d3d7734
168
new_main.py
168
new_main.py
@ -25,7 +25,7 @@ brickstuff = tps.brick_directions_notf
|
|||||||
global sumulation
|
global sumulation
|
||||||
|
|
||||||
simulation = True
|
simulation = True
|
||||||
debug = True
|
debug = False
|
||||||
|
|
||||||
class PickAndPlace(object):
|
class PickAndPlace(object):
|
||||||
def __init__(self, limb, hover_distance = 0.10, verbose=True, speed=0.2, accuracy=baxter_interface.settings.JOINT_ANGLE_TOLERANCE):
|
def __init__(self, limb, hover_distance = 0.10, verbose=True, speed=0.2, accuracy=baxter_interface.settings.JOINT_ANGLE_TOLERANCE):
|
||||||
@ -217,8 +217,8 @@ def V_Routine():
|
|||||||
spawn_v_brick()
|
spawn_v_brick()
|
||||||
|
|
||||||
left_pnp.send(ta.V_approach)
|
left_pnp.send(ta.V_approach)
|
||||||
|
if simulation:
|
||||||
x = raw_input('Ready?')
|
x = raw_input('Ready?')
|
||||||
if x == 'n':exit(0)
|
|
||||||
left_pnp.send(ta.V_pickup)
|
left_pnp.send(ta.V_pickup)
|
||||||
|
|
||||||
|
|
||||||
@ -241,6 +241,7 @@ def V_Routine():
|
|||||||
|
|
||||||
def open_and_wait():
|
def open_and_wait():
|
||||||
left_pnp.gripper_open()
|
left_pnp.gripper_open()
|
||||||
|
if simulation:
|
||||||
x = raw_input('Close?')
|
x = raw_input('Close?')
|
||||||
left_pnp.gripper_close()
|
left_pnp.gripper_close()
|
||||||
time.sleep(0.5)
|
time.sleep(0.5)
|
||||||
@ -250,8 +251,8 @@ def H_Routine():
|
|||||||
if simulation:
|
if simulation:
|
||||||
spawn_h_brick()
|
spawn_h_brick()
|
||||||
left_pnp.send(ta.H_approach)
|
left_pnp.send(ta.H_approach)
|
||||||
|
if simulation:
|
||||||
x = raw_input('Ready?')
|
x = raw_input('Ready?')
|
||||||
if x == 'n':exit(0)
|
|
||||||
left_pnp.send(ta.H_pickup)
|
left_pnp.send(ta.H_pickup)
|
||||||
left_pnp.gripper_close()
|
left_pnp.gripper_close()
|
||||||
|
|
||||||
@ -276,92 +277,92 @@ def H_Routine():
|
|||||||
|
|
||||||
left_pnp.gripper_open()
|
left_pnp.gripper_open()
|
||||||
|
|
||||||
# V_Routine()
|
V_Routine()
|
||||||
|
|
||||||
# left_pnp.send(ta.B_1_A)
|
left_pnp.send(ta.B_1_A)
|
||||||
# if debug:
|
if debug:
|
||||||
# x = raw_input('Continue?: ')
|
x = raw_input('Continue?: ')
|
||||||
# left_pnp.send(ta.B_1_P)
|
left_pnp.send(ta.B_1_P)
|
||||||
# if debug:
|
if debug:
|
||||||
# x = raw_input('Continue?: ')
|
x = raw_input('Continue?: ')
|
||||||
# left_pnp.gripper_open()
|
left_pnp.gripper_open()
|
||||||
|
|
||||||
# left_pnp.send(ta.B_1_A)
|
left_pnp.send(ta.B_1_A)
|
||||||
|
|
||||||
# V_Routine()
|
V_Routine()
|
||||||
|
|
||||||
# left_pnp.send(ta.B_2_A)
|
left_pnp.send(ta.B_2_A)
|
||||||
# if debug:
|
if debug:
|
||||||
# x = raw_input('Continue?: ')
|
x = raw_input('Continue?: ')
|
||||||
# left_pnp.send(ta.B_2_P)
|
left_pnp.send(ta.B_2_P)
|
||||||
# if debug:
|
if debug:
|
||||||
# x = raw_input('Continue?: ')
|
x = raw_input('Continue?: ')
|
||||||
# left_pnp.gripper_open()
|
left_pnp.gripper_open()
|
||||||
# left_pnp.send(ta.B_2_A)
|
left_pnp.send(ta.B_2_A)
|
||||||
|
|
||||||
# V_Routine()
|
V_Routine()
|
||||||
|
|
||||||
# left_pnp.send(ta.B_3_A)
|
left_pnp.send(ta.B_3_A)
|
||||||
# if debug:
|
if debug:
|
||||||
# x = raw_input('Continue?: ')
|
x = raw_input('Continue?: ')
|
||||||
# left_pnp.send(ta.B_3_P)
|
left_pnp.send(ta.B_3_P)
|
||||||
# if debug:
|
if debug:
|
||||||
# x = raw_input('Continue?: ')
|
x = raw_input('Continue?: ')
|
||||||
# left_pnp.gripper_open()
|
left_pnp.gripper_open()
|
||||||
# left_pnp.send(ta.B_3_A)
|
left_pnp.send(ta.B_3_A)
|
||||||
|
|
||||||
|
|
||||||
# H_Routine()
|
H_Routine()
|
||||||
# left_pnp.send(ta.B_4_A)
|
left_pnp.send(ta.B_4_A)
|
||||||
# if debug:
|
if debug:
|
||||||
# x = raw_input('Continue?: ')
|
x = raw_input('Continue?: ')
|
||||||
# left_pnp.send(ta.B_4_P)
|
left_pnp.send(ta.B_4_P)
|
||||||
# if debug:
|
if debug:
|
||||||
# x = raw_input('Continue?: ')
|
x = raw_input('Continue?: ')
|
||||||
# left_pnp.gripper_open()
|
left_pnp.gripper_open()
|
||||||
# left_pnp.send(ta.B_4_A)
|
left_pnp.send(ta.B_4_A)
|
||||||
|
|
||||||
# H_Routine()
|
H_Routine()
|
||||||
# left_pnp.send(ta.B_5_A)
|
left_pnp.send(ta.B_5_A)
|
||||||
# if debug:
|
if debug:
|
||||||
# x = raw_input('Continue?: ')
|
x = raw_input('Continue?: ')
|
||||||
# left_pnp.send(ta.B_5_P)
|
left_pnp.send(ta.B_5_P)
|
||||||
# if debug:
|
if debug:
|
||||||
# x = raw_input('Continue?: ')
|
x = raw_input('Continue?: ')
|
||||||
# left_pnp.gripper_open()
|
left_pnp.gripper_open()
|
||||||
# left_pnp.send(ta.B_5_A)
|
left_pnp.send(ta.B_5_A)
|
||||||
|
|
||||||
|
|
||||||
# V_Routine()
|
V_Routine()
|
||||||
# left_pnp.send(ta.B_6_A)
|
left_pnp.send(ta.B_6_A)
|
||||||
# if debug:
|
if debug:
|
||||||
# x = raw_input('Continue?: ')
|
x = raw_input('Continue?: ')
|
||||||
# left_pnp.send(ta.B_6_P)
|
left_pnp.send(ta.B_6_P)
|
||||||
# if debug:
|
if debug:
|
||||||
# x = raw_input('Continue?: ')
|
x = raw_input('Continue?: ')
|
||||||
# left_pnp.gripper_open()
|
left_pnp.gripper_open()
|
||||||
# left_pnp.send(ta.B_6_A)
|
left_pnp.send(ta.B_6_A)
|
||||||
|
|
||||||
# V_Routine()
|
V_Routine()
|
||||||
# left_pnp.send(ta.B_7_A)
|
left_pnp.send(ta.B_7_A)
|
||||||
# if debug:
|
if debug:
|
||||||
# x = raw_input('Continue?: ')
|
x = raw_input('Continue?: ')
|
||||||
# left_pnp.send(ta.B_7_P)
|
left_pnp.send(ta.B_7_P)
|
||||||
# if debug:
|
if debug:
|
||||||
# x = raw_input('Continue?: ')
|
x = raw_input('Continue?: ')
|
||||||
# left_pnp.gripper_open()
|
left_pnp.gripper_open()
|
||||||
# left_pnp.send(ta.B_7_A)
|
left_pnp.send(ta.B_7_A)
|
||||||
|
|
||||||
|
|
||||||
# H_Routine()
|
H_Routine()
|
||||||
# left_pnp.send(ta.B_8_A)
|
left_pnp.send(ta.B_8_A)
|
||||||
# if debug:
|
if debug:
|
||||||
# x = raw_input('Continue?: ')
|
x = raw_input('Continue?: ')
|
||||||
# left_pnp.send(ta.B_8_P)
|
left_pnp.send(ta.B_8_P)
|
||||||
# if debug:
|
if debug:
|
||||||
# x = raw_input('Continue?: ')
|
x = raw_input('Continue?: ')
|
||||||
# left_pnp.gripper_open()
|
left_pnp.gripper_open()
|
||||||
# left_pnp.send(ta.B_8_A)
|
left_pnp.send(ta.B_8_A)
|
||||||
|
|
||||||
|
|
||||||
V_Routine()
|
V_Routine()
|
||||||
@ -379,3 +380,20 @@ left_pnp.send(ta.B_9_zb)
|
|||||||
|
|
||||||
left_pnp.send(ta.H_pickup)
|
left_pnp.send(ta.H_pickup)
|
||||||
|
|
||||||
|
time.sleep(1)
|
||||||
|
|
||||||
|
print("#################################################################################################################")
|
||||||
|
print("#...............................................................................................................#")
|
||||||
|
print("#...............................................................................................................#")
|
||||||
|
print("#...............................................................................................................#")
|
||||||
|
print("#.................. ____ _ _ _ _ ____ _ _ _ _ _.................#")
|
||||||
|
print("#................../ ___| ___ _ __ __| | (_)_ __ | |_| |__ ___ | __ )(_)_ __ __| | | | |................#")
|
||||||
|
print("#..................\\___ \\ / _ \\ '_ \\ / _` | | | '_ \\ | __| '_ \\ / _ \\ | _ \\| | '__/ _` | | | |................#")
|
||||||
|
print("#.................. ___) | __/ | | | (_| | | | | | | | |_| | | | __/ | |_) | | | | (_| |_|_|_|................#")
|
||||||
|
print("#..................|____/ \\___|_| |_|\\__,_| |_|_| |_| \\__|_| |_|\\___| |____/|_|_| \\__,_(_|_|_)................#")
|
||||||
|
print("#...............................................................................................................#")
|
||||||
|
print("#...............................................................................................................#")
|
||||||
|
print("#...............................................................................................................#")
|
||||||
|
print("#################################################################################################################")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user