$search
00001 """autogenerated by genmsg_py from CalibrationPattern.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import geometry_msgs.msg 00006 import cob_calibration_msgs.msg 00007 import std_msgs.msg 00008 00009 class CalibrationPattern(roslib.message.Message): 00010 _md5sum = "dcc8f54c34016e656521a94b56a70dc3" 00011 _type = "cob_calibration_msgs/CalibrationPattern" 00012 _has_header = True #flag to mark the presence of a Header object 00013 _full_text = """Header header 00014 geometry_msgs/Point32[] object_points 00015 ImagePoint[] image_points 00016 uint8 success 00017 00018 ================================================================================ 00019 MSG: std_msgs/Header 00020 # Standard metadata for higher-level stamped data types. 00021 # This is generally used to communicate timestamped data 00022 # in a particular coordinate frame. 00023 # 00024 # sequence ID: consecutively increasing ID 00025 uint32 seq 00026 #Two-integer timestamp that is expressed as: 00027 # * stamp.secs: seconds (stamp_secs) since epoch 00028 # * stamp.nsecs: nanoseconds since stamp_secs 00029 # time-handling sugar is provided by the client library 00030 time stamp 00031 #Frame this data is associated with 00032 # 0: no frame 00033 # 1: global frame 00034 string frame_id 00035 00036 ================================================================================ 00037 MSG: geometry_msgs/Point32 00038 # This contains the position of a point in free space(with 32 bits of precision). 00039 # It is recommeded to use Point wherever possible instead of Point32. 00040 # 00041 # This recommendation is to promote interoperability. 00042 # 00043 # This message is designed to take up less space when sending 00044 # lots of points at once, as in the case of a PointCloud. 00045 00046 float32 x 00047 float32 y 00048 float32 z 00049 ================================================================================ 00050 MSG: cob_calibration_msgs/ImagePoint 00051 float32 x 00052 float32 y 00053 00054 """ 00055 __slots__ = ['header','object_points','image_points','success'] 00056 _slot_types = ['Header','geometry_msgs/Point32[]','cob_calibration_msgs/ImagePoint[]','uint8'] 00057 00058 def __init__(self, *args, **kwds): 00059 """ 00060 Constructor. Any message fields that are implicitly/explicitly 00061 set to None will be assigned a default value. The recommend 00062 use is keyword arguments as this is more robust to future message 00063 changes. You cannot mix in-order arguments and keyword arguments. 00064 00065 The available fields are: 00066 header,object_points,image_points,success 00067 00068 @param args: complete set of field values, in .msg order 00069 @param kwds: use keyword arguments corresponding to message field names 00070 to set specific fields. 00071 """ 00072 if args or kwds: 00073 super(CalibrationPattern, self).__init__(*args, **kwds) 00074 #message fields cannot be None, assign default values for those that are 00075 if self.header is None: 00076 self.header = std_msgs.msg._Header.Header() 00077 if self.object_points is None: 00078 self.object_points = [] 00079 if self.image_points is None: 00080 self.image_points = [] 00081 if self.success is None: 00082 self.success = 0 00083 else: 00084 self.header = std_msgs.msg._Header.Header() 00085 self.object_points = [] 00086 self.image_points = [] 00087 self.success = 0 00088 00089 def _get_types(self): 00090 """ 00091 internal API method 00092 """ 00093 return self._slot_types 00094 00095 def serialize(self, buff): 00096 """ 00097 serialize message into buffer 00098 @param buff: buffer 00099 @type buff: StringIO 00100 """ 00101 try: 00102 _x = self 00103 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00104 _x = self.header.frame_id 00105 length = len(_x) 00106 buff.write(struct.pack('<I%ss'%length, length, _x)) 00107 length = len(self.object_points) 00108 buff.write(_struct_I.pack(length)) 00109 for val1 in self.object_points: 00110 _x = val1 00111 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 00112 length = len(self.image_points) 00113 buff.write(_struct_I.pack(length)) 00114 for val1 in self.image_points: 00115 _x = val1 00116 buff.write(_struct_2f.pack(_x.x, _x.y)) 00117 buff.write(_struct_B.pack(self.success)) 00118 except struct.error as se: self._check_types(se) 00119 except TypeError as te: self._check_types(te) 00120 00121 def deserialize(self, str): 00122 """ 00123 unpack serialized message in str into this message instance 00124 @param str: byte array of serialized message 00125 @type str: str 00126 """ 00127 try: 00128 if self.header is None: 00129 self.header = std_msgs.msg._Header.Header() 00130 end = 0 00131 _x = self 00132 start = end 00133 end += 12 00134 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00135 start = end 00136 end += 4 00137 (length,) = _struct_I.unpack(str[start:end]) 00138 start = end 00139 end += length 00140 self.header.frame_id = str[start:end] 00141 start = end 00142 end += 4 00143 (length,) = _struct_I.unpack(str[start:end]) 00144 self.object_points = [] 00145 for i in range(0, length): 00146 val1 = geometry_msgs.msg.Point32() 00147 _x = val1 00148 start = end 00149 end += 12 00150 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 00151 self.object_points.append(val1) 00152 start = end 00153 end += 4 00154 (length,) = _struct_I.unpack(str[start:end]) 00155 self.image_points = [] 00156 for i in range(0, length): 00157 val1 = cob_calibration_msgs.msg.ImagePoint() 00158 _x = val1 00159 start = end 00160 end += 8 00161 (_x.x, _x.y,) = _struct_2f.unpack(str[start:end]) 00162 self.image_points.append(val1) 00163 start = end 00164 end += 1 00165 (self.success,) = _struct_B.unpack(str[start:end]) 00166 return self 00167 except struct.error as e: 00168 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00169 00170 00171 def serialize_numpy(self, buff, numpy): 00172 """ 00173 serialize message with numpy array types into buffer 00174 @param buff: buffer 00175 @type buff: StringIO 00176 @param numpy: numpy python module 00177 @type numpy module 00178 """ 00179 try: 00180 _x = self 00181 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00182 _x = self.header.frame_id 00183 length = len(_x) 00184 buff.write(struct.pack('<I%ss'%length, length, _x)) 00185 length = len(self.object_points) 00186 buff.write(_struct_I.pack(length)) 00187 for val1 in self.object_points: 00188 _x = val1 00189 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z)) 00190 length = len(self.image_points) 00191 buff.write(_struct_I.pack(length)) 00192 for val1 in self.image_points: 00193 _x = val1 00194 buff.write(_struct_2f.pack(_x.x, _x.y)) 00195 buff.write(_struct_B.pack(self.success)) 00196 except struct.error as se: self._check_types(se) 00197 except TypeError as te: self._check_types(te) 00198 00199 def deserialize_numpy(self, str, numpy): 00200 """ 00201 unpack serialized message in str into this message instance using numpy for array types 00202 @param str: byte array of serialized message 00203 @type str: str 00204 @param numpy: numpy python module 00205 @type numpy: module 00206 """ 00207 try: 00208 if self.header is None: 00209 self.header = std_msgs.msg._Header.Header() 00210 end = 0 00211 _x = self 00212 start = end 00213 end += 12 00214 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00215 start = end 00216 end += 4 00217 (length,) = _struct_I.unpack(str[start:end]) 00218 start = end 00219 end += length 00220 self.header.frame_id = str[start:end] 00221 start = end 00222 end += 4 00223 (length,) = _struct_I.unpack(str[start:end]) 00224 self.object_points = [] 00225 for i in range(0, length): 00226 val1 = geometry_msgs.msg.Point32() 00227 _x = val1 00228 start = end 00229 end += 12 00230 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end]) 00231 self.object_points.append(val1) 00232 start = end 00233 end += 4 00234 (length,) = _struct_I.unpack(str[start:end]) 00235 self.image_points = [] 00236 for i in range(0, length): 00237 val1 = cob_calibration_msgs.msg.ImagePoint() 00238 _x = val1 00239 start = end 00240 end += 8 00241 (_x.x, _x.y,) = _struct_2f.unpack(str[start:end]) 00242 self.image_points.append(val1) 00243 start = end 00244 end += 1 00245 (self.success,) = _struct_B.unpack(str[start:end]) 00246 return self 00247 except struct.error as e: 00248 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00249 00250 _struct_I = roslib.message.struct_I 00251 _struct_3I = struct.Struct("<3I") 00252 _struct_B = struct.Struct("<B") 00253 _struct_3f = struct.Struct("<3f") 00254 _struct_2f = struct.Struct("<2f")