def op_stack(scene, config, op): (act,obj,dst) = op nop = tm.op_nop(scene,config) g_tf_d = tm.op_tf_abs(nop,dst) d_tf_o = aa.tf2(1, [0,0, place_height(scene,obj) + place_height(scene,dst) + EPSILON]) g_tf_o = aa.mul(g_tf_d, d_tf_o) return place_tf(nop, obj, dst, g_tf_o)
def op_put_down(scene, config, op): (a, obj, dst, i, j) = op nop = tm.op_nop(scene,config) x = i*RESOLUTION y = j*RESOLUTION z = place_height(scene,obj) + place_height(scene,dst) + EPSILON d_tf_o = aa.tf2( 1, [x,y,z] ) g_tf_d = tm.op_tf_abs(nop,dst) g_tf_o = aa.mul(g_tf_d, d_tf_o ); return place_tf(nop, obj, dst, g_tf_o)
def op_stack(scene, config, op): (act,obj,dst) = op nop = tm.op_nop(scene,config) op_pick = pick(nop, obj) return stack( op_pick, obj, dst )
def op_pick_up(scene, config, op): #(a, obj, src, i, j) = op obj = op[1] nop = tm.op_nop(scene,config) mp = motion_plan(nop, FRAME, tm.op_tf_abs(nop,obj)) return tm.op_reparent(mp, FRAME, obj)
def op_transfer(scene, config, op): (act, obj, dst_frame, dst_i, dst_j) = op nop = tm.op_nop(scene,config) op_pick = pick(nop,obj) return place( op_pick, obj, dst_frame, dst_i, dst_j )