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 add_modbus_signal = rospy.ServiceProxy(
'/' + ROBOT_ID + ROBOT_MODEL +
'/modbus/create_config_modbus', ConfigCreateModbus)
60 set_modbus_output = rospy.ServiceProxy(
'/' + ROBOT_ID + ROBOT_MODEL +
'/modbus/set_modbus_output', SetModbusOutput)
61 get_modbus_input = rospy.ServiceProxy(
'/' + ROBOT_ID + ROBOT_MODEL +
'/modbus/get_modbus_input', GetModbusInput)
64 while not rospy.is_shutdown():
def _ros_listToFloat64MultiArray(list_src)