$search
00001 """autogenerated by genmsg_py from MakeStaticCollisionMapGoal.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class MakeStaticCollisionMapGoal(roslib.message.Message): 00007 _md5sum = "43564281ea7e3c1ca0f01095edc909f7" 00008 _type = "arm_navigation_msgs/MakeStaticCollisionMapGoal" 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 #The source to use to make the stable map 00012 string cloud_source 00013 00014 #The number of clouds to compose the stable map 00015 int32 number_of_clouds 00016 00017 """ 00018 __slots__ = ['cloud_source','number_of_clouds'] 00019 _slot_types = ['string','int32'] 00020 00021 def __init__(self, *args, **kwds): 00022 """ 00023 Constructor. Any message fields that are implicitly/explicitly 00024 set to None will be assigned a default value. The recommend 00025 use is keyword arguments as this is more robust to future message 00026 changes. You cannot mix in-order arguments and keyword arguments. 00027 00028 The available fields are: 00029 cloud_source,number_of_clouds 00030 00031 @param args: complete set of field values, in .msg order 00032 @param kwds: use keyword arguments corresponding to message field names 00033 to set specific fields. 00034 """ 00035 if args or kwds: 00036 super(MakeStaticCollisionMapGoal, self).__init__(*args, **kwds) 00037 #message fields cannot be None, assign default values for those that are 00038 if self.cloud_source is None: 00039 self.cloud_source = '' 00040 if self.number_of_clouds is None: 00041 self.number_of_clouds = 0 00042 else: 00043 self.cloud_source = '' 00044 self.number_of_clouds = 0 00045 00046 def _get_types(self): 00047 """ 00048 internal API method 00049 """ 00050 return self._slot_types 00051 00052 def serialize(self, buff): 00053 """ 00054 serialize message into buffer 00055 @param buff: buffer 00056 @type buff: StringIO 00057 """ 00058 try: 00059 _x = self.cloud_source 00060 length = len(_x) 00061 buff.write(struct.pack('<I%ss'%length, length, _x)) 00062 buff.write(_struct_i.pack(self.number_of_clouds)) 00063 except struct.error as se: self._check_types(se) 00064 except TypeError as te: self._check_types(te) 00065 00066 def deserialize(self, str): 00067 """ 00068 unpack serialized message in str into this message instance 00069 @param str: byte array of serialized message 00070 @type str: str 00071 """ 00072 try: 00073 end = 0 00074 start = end 00075 end += 4 00076 (length,) = _struct_I.unpack(str[start:end]) 00077 start = end 00078 end += length 00079 self.cloud_source = str[start:end] 00080 start = end 00081 end += 4 00082 (self.number_of_clouds,) = _struct_i.unpack(str[start:end]) 00083 return self 00084 except struct.error as e: 00085 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00086 00087 00088 def serialize_numpy(self, buff, numpy): 00089 """ 00090 serialize message with numpy array types into buffer 00091 @param buff: buffer 00092 @type buff: StringIO 00093 @param numpy: numpy python module 00094 @type numpy module 00095 """ 00096 try: 00097 _x = self.cloud_source 00098 length = len(_x) 00099 buff.write(struct.pack('<I%ss'%length, length, _x)) 00100 buff.write(_struct_i.pack(self.number_of_clouds)) 00101 except struct.error as se: self._check_types(se) 00102 except TypeError as te: self._check_types(te) 00103 00104 def deserialize_numpy(self, str, numpy): 00105 """ 00106 unpack serialized message in str into this message instance using numpy for array types 00107 @param str: byte array of serialized message 00108 @type str: str 00109 @param numpy: numpy python module 00110 @type numpy: module 00111 """ 00112 try: 00113 end = 0 00114 start = end 00115 end += 4 00116 (length,) = _struct_I.unpack(str[start:end]) 00117 start = end 00118 end += length 00119 self.cloud_source = str[start:end] 00120 start = end 00121 end += 4 00122 (self.number_of_clouds,) = _struct_i.unpack(str[start:end]) 00123 return self 00124 except struct.error as e: 00125 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00126 00127 _struct_I = roslib.message.struct_I 00128 _struct_i = struct.Struct("<i")