11 sys.dont_write_bytecode =
True 12 sys.path.append( os.path.abspath(os.path.join(os.path.dirname(__file__),
"../../../../common/imp")) )
18 DR_init.__dsr__id = ROBOT_ID
19 DR_init.__dsr__model = ROBOT_MODEL
20 from DSR_ROBOT
import *
24 srv_gripper_send_data(send_data)
28 ROBOT_ID = id; ROBOT_MODEL= model
31 print "shutdown time!" 32 print "shutdown time!" 33 print "shutdown time!" 35 pub_stop.publish(stop_mode=1)
42 item = Float64MultiArray()
49 if __name__ ==
"__main__":
52 my_robot_model =
"m1013" 55 rospy.init_node(
'pick_and_place_simple_py')
56 rospy.on_shutdown(shutdown)
59 pub_stop = rospy.Publisher(
'/'+ROBOT_ID +ROBOT_MODEL+
'/stop', RobotStop, queue_size=10)
64 srv_robotiq_2f_open = rospy.ServiceProxy(
'/' + ROBOT_ID + ROBOT_MODEL +
'/gripper/serial_send_data', SerialSendData)
66 p0 = posj(0, 0, 0, 0, 0, 0)
67 p1 = posj(0, 0, 90, 0, 90, 0)
68 p2 = posj(180, 0, 90, 0, 90, 0)
70 x1 = posx(0, 0, -200, 0, 0, 0)
71 x2 = posx(0, 0, 200, 0, 0, 0)
75 init_data = bytes(b
'\0x09\0x10\0x03\0xE8\0x00\0x03\0x06\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x73\0x30')
76 activation_data = bytes(b
'0x09\0x10\0x03\0xE8\0x00\0x03\0x06\0x01\0x00\0x00\0x00\0x00\0x00\0x72\0xE1')
77 open_data = bytes(b
'0x09\0x10\0x03\0xE8\0x00\0x03\0x06\0x09\0x00\0x00\0x00\0xFF\0xFF\0x72\0x19')
78 close_data = bytes(b
'0x09\0x10\0x03\0xE8\0x00\0x03\0x06\0x09\0x00\0x00\0xFF\0xFF\0xFF\0x42\0x29')
82 while not rospy.is_shutdown():
def gripper_send_data(send_data)
def _ros_listToFloat64MultiArray(list_src)