10 from std_msgs.msg
import String,Int32,Int32MultiArray,Float64,Float64MultiArray,MultiArrayLayout,MultiArrayDimension
12 sys.dont_write_bytecode =
True 23 ROBOT_ID = id; ROBOT_MODEL= model
26 print "shutdown time!" 27 print "shutdown time!" 28 print "shutdown time!" 30 pub_stop.publish(stop_mode=1)
37 item = Float64MultiArray()
44 if __name__ ==
"__main__":
47 my_robot_model =
"m1013" 50 rospy.init_node(
'dsr_service_io_basic_py')
51 rospy.on_shutdown(shutdown)
54 pub_stop = rospy.Publisher(
'/'+ROBOT_ID +ROBOT_MODEL+
'/stop', RobotStop, queue_size=10)
59 set_digital_output = rospy.ServiceProxy(
'/' + ROBOT_ID + ROBOT_MODEL +
'/io/set_digital_output', SetCtrlBoxDigitalOutput)
60 get_digital_input = rospy.ServiceProxy(
'/' + ROBOT_ID + ROBOT_MODEL +
'/io/get_digital_input', GetCtrlBoxDigitalInput)
67 while not rospy.is_shutdown():
def _ros_listToFloat64MultiArray(list_src)