10 from std_msgs.msg
import String,Int32,Int32MultiArray,Float64,Float64MultiArray,MultiArrayLayout,MultiArrayDimension
12 sys.dont_write_bytecode =
True 22 ROBOT_SYSTEM_VIRTUAL = 1
26 ROBOT_ID = id; ROBOT_MODEL= model
29 print "shutdown time!" 30 print "shutdown time!" 31 print "shutdown time!" 33 pub_stop.publish(stop_mode=1)
40 item = Float64MultiArray()
47 if __name__ ==
"__main__":
50 my_robot_model =
"m1013" 53 rospy.init_node(
'dsr_service_drl_basic_py')
54 rospy.on_shutdown(shutdown)
57 pub_stop = rospy.Publisher(
'/'+ROBOT_ID +ROBOT_MODEL+
'/stop', RobotStop, queue_size=10)
60 rospy.wait_for_service(
'/'+ROBOT_ID +ROBOT_MODEL+
'/drl/drl_start')
62 drl_start = rospy.ServiceProxy(
'/'+ROBOT_ID + ROBOT_MODEL +
'/drl/drl_start', DrlStart)
63 drl_stop = rospy.ServiceProxy(
'/'+ROBOT_ID + ROBOT_MODEL +
'/drl/drl_stop', DrlStop)
64 drl_resume = rospy.ServiceProxy(
'/'+ROBOT_ID + ROBOT_MODEL +
'/drl/drl_resume', DrlResume)
65 drl_pause = rospy.ServiceProxy(
'/'+ROBOT_ID + ROBOT_MODEL +
'/drl/drl_pause', DrlPause)
67 move_joint = rospy.ServiceProxy(
'/'+ROBOT_ID +ROBOT_MODEL+
'/motion/move_joint', MoveJoint)
69 drlCodeMove =
"set_velj(50)\nset_accj(50)\nmovej([0,0,90,0,90,0])\n" 70 drlCodeHome =
"movej([0,0,0,0,0,0])\n" 71 drl_start(ROBOT_SYSTEM_REAL, drlCodeMove + drlCodeHome)
def _ros_listToFloat64MultiArray(list_src)