$search
00001 """autogenerated by genmsg_py from CarveSegmentsFeedback.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class CarveSegmentsFeedback(roslib.message.Message): 00007 _md5sum = "d342375c60a5a58d3bc32664070a1368" 00008 _type = "pr2_dremel_server/CarveSegmentsFeedback" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00011 # Define a feedback message 00012 float32 percent_complete 00013 00014 00015 """ 00016 __slots__ = ['percent_complete'] 00017 _slot_types = ['float32'] 00018 00019 def __init__(self, *args, **kwds): 00020 """ 00021 Constructor. Any message fields that are implicitly/explicitly 00022 set to None will be assigned a default value. The recommend 00023 use is keyword arguments as this is more robust to future message 00024 changes. You cannot mix in-order arguments and keyword arguments. 00025 00026 The available fields are: 00027 percent_complete 00028 00029 @param args: complete set of field values, in .msg order 00030 @param kwds: use keyword arguments corresponding to message field names 00031 to set specific fields. 00032 """ 00033 if args or kwds: 00034 super(CarveSegmentsFeedback, self).__init__(*args, **kwds) 00035 #message fields cannot be None, assign default values for those that are 00036 if self.percent_complete is None: 00037 self.percent_complete = 0. 00038 else: 00039 self.percent_complete = 0. 00040 00041 def _get_types(self): 00042 """ 00043 internal API method 00044 """ 00045 return self._slot_types 00046 00047 def serialize(self, buff): 00048 """ 00049 serialize message into buffer 00050 @param buff: buffer 00051 @type buff: StringIO 00052 """ 00053 try: 00054 buff.write(_struct_f.pack(self.percent_complete)) 00055 except struct.error as se: self._check_types(se) 00056 except TypeError as te: self._check_types(te) 00057 00058 def deserialize(self, str): 00059 """ 00060 unpack serialized message in str into this message instance 00061 @param str: byte array of serialized message 00062 @type str: str 00063 """ 00064 try: 00065 end = 0 00066 start = end 00067 end += 4 00068 (self.percent_complete,) = _struct_f.unpack(str[start:end]) 00069 return self 00070 except struct.error as e: 00071 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00072 00073 00074 def serialize_numpy(self, buff, numpy): 00075 """ 00076 serialize message with numpy array types into buffer 00077 @param buff: buffer 00078 @type buff: StringIO 00079 @param numpy: numpy python module 00080 @type numpy module 00081 """ 00082 try: 00083 buff.write(_struct_f.pack(self.percent_complete)) 00084 except struct.error as se: self._check_types(se) 00085 except TypeError as te: self._check_types(te) 00086 00087 def deserialize_numpy(self, str, numpy): 00088 """ 00089 unpack serialized message in str into this message instance using numpy for array types 00090 @param str: byte array of serialized message 00091 @type str: str 00092 @param numpy: numpy python module 00093 @type numpy: module 00094 """ 00095 try: 00096 end = 0 00097 start = end 00098 end += 4 00099 (self.percent_complete,) = _struct_f.unpack(str[start:end]) 00100 return self 00101 except struct.error as e: 00102 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00103 00104 _struct_I = roslib.message.struct_I 00105 _struct_f = struct.Struct("<f")