_CalibrationEstimate.py
Go to the documentation of this file.
00001 """autogenerated by genpy from camera_pose_calibration/CalibrationEstimate.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006 
00007 import camera_pose_calibration.msg
00008 import geometry_msgs.msg
00009 import std_msgs.msg
00010 
00011 class CalibrationEstimate(genpy.Message):
00012   _md5sum = "35dff6bdb713fbc8b83861a1960b45f5"
00013   _type = "camera_pose_calibration/CalibrationEstimate"
00014   _has_header = True #flag to mark the presence of a Header object
00015   _full_text = """Header header
00016 CameraPose[] cameras
00017 geometry_msgs/Pose[] targets
00018 
00019 ================================================================================
00020 MSG: std_msgs/Header
00021 # Standard metadata for higher-level stamped data types.
00022 # This is generally used to communicate timestamped data 
00023 # in a particular coordinate frame.
00024 # 
00025 # sequence ID: consecutively increasing ID 
00026 uint32 seq
00027 #Two-integer timestamp that is expressed as:
00028 # * stamp.secs: seconds (stamp_secs) since epoch
00029 # * stamp.nsecs: nanoseconds since stamp_secs
00030 # time-handling sugar is provided by the client library
00031 time stamp
00032 #Frame this data is associated with
00033 # 0: no frame
00034 # 1: global frame
00035 string frame_id
00036 
00037 ================================================================================
00038 MSG: camera_pose_calibration/CameraPose
00039 string camera_id
00040 geometry_msgs/Pose pose
00041 
00042 ================================================================================
00043 MSG: geometry_msgs/Pose
00044 # A representation of pose in free space, composed of postion and orientation. 
00045 Point position
00046 Quaternion orientation
00047 
00048 ================================================================================
00049 MSG: geometry_msgs/Point
00050 # This contains the position of a point in free space
00051 float64 x
00052 float64 y
00053 float64 z
00054 
00055 ================================================================================
00056 MSG: geometry_msgs/Quaternion
00057 # This represents an orientation in free space in quaternion form.
00058 
00059 float64 x
00060 float64 y
00061 float64 z
00062 float64 w
00063 
00064 """
00065   __slots__ = ['header','cameras','targets']
00066   _slot_types = ['std_msgs/Header','camera_pose_calibration/CameraPose[]','geometry_msgs/Pose[]']
00067 
00068   def __init__(self, *args, **kwds):
00069     """
00070     Constructor. Any message fields that are implicitly/explicitly
00071     set to None will be assigned a default value. The recommend
00072     use is keyword arguments as this is more robust to future message
00073     changes.  You cannot mix in-order arguments and keyword arguments.
00074 
00075     The available fields are:
00076        header,cameras,targets
00077 
00078     :param args: complete set of field values, in .msg order
00079     :param kwds: use keyword arguments corresponding to message field names
00080     to set specific fields.
00081     """
00082     if args or kwds:
00083       super(CalibrationEstimate, self).__init__(*args, **kwds)
00084       #message fields cannot be None, assign default values for those that are
00085       if self.header is None:
00086         self.header = std_msgs.msg.Header()
00087       if self.cameras is None:
00088         self.cameras = []
00089       if self.targets is None:
00090         self.targets = []
00091     else:
00092       self.header = std_msgs.msg.Header()
00093       self.cameras = []
00094       self.targets = []
00095 
00096   def _get_types(self):
00097     """
00098     internal API method
00099     """
00100     return self._slot_types
00101 
00102   def serialize(self, buff):
00103     """
00104     serialize message into buffer
00105     :param buff: buffer, ``StringIO``
00106     """
00107     try:
00108       _x = self
00109       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00110       _x = self.header.frame_id
00111       length = len(_x)
00112       if python3 or type(_x) == unicode:
00113         _x = _x.encode('utf-8')
00114         length = len(_x)
00115       buff.write(struct.pack('<I%ss'%length, length, _x))
00116       length = len(self.cameras)
00117       buff.write(_struct_I.pack(length))
00118       for val1 in self.cameras:
00119         _x = val1.camera_id
00120         length = len(_x)
00121         if python3 or type(_x) == unicode:
00122           _x = _x.encode('utf-8')
00123           length = len(_x)
00124         buff.write(struct.pack('<I%ss'%length, length, _x))
00125         _v1 = val1.pose
00126         _v2 = _v1.position
00127         _x = _v2
00128         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00129         _v3 = _v1.orientation
00130         _x = _v3
00131         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00132       length = len(self.targets)
00133       buff.write(_struct_I.pack(length))
00134       for val1 in self.targets:
00135         _v4 = val1.position
00136         _x = _v4
00137         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00138         _v5 = val1.orientation
00139         _x = _v5
00140         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00141     except struct.error as se: self._check_types(se)
00142     except TypeError as te: self._check_types(te)
00143 
00144   def deserialize(self, str):
00145     """
00146     unpack serialized message in str into this message instance
00147     :param str: byte array of serialized message, ``str``
00148     """
00149     try:
00150       if self.header is None:
00151         self.header = std_msgs.msg.Header()
00152       if self.cameras is None:
00153         self.cameras = None
00154       if self.targets is None:
00155         self.targets = None
00156       end = 0
00157       _x = self
00158       start = end
00159       end += 12
00160       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00161       start = end
00162       end += 4
00163       (length,) = _struct_I.unpack(str[start:end])
00164       start = end
00165       end += length
00166       if python3:
00167         self.header.frame_id = str[start:end].decode('utf-8')
00168       else:
00169         self.header.frame_id = str[start:end]
00170       start = end
00171       end += 4
00172       (length,) = _struct_I.unpack(str[start:end])
00173       self.cameras = []
00174       for i in range(0, length):
00175         val1 = camera_pose_calibration.msg.CameraPose()
00176         start = end
00177         end += 4
00178         (length,) = _struct_I.unpack(str[start:end])
00179         start = end
00180         end += length
00181         if python3:
00182           val1.camera_id = str[start:end].decode('utf-8')
00183         else:
00184           val1.camera_id = str[start:end]
00185         _v6 = val1.pose
00186         _v7 = _v6.position
00187         _x = _v7
00188         start = end
00189         end += 24
00190         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00191         _v8 = _v6.orientation
00192         _x = _v8
00193         start = end
00194         end += 32
00195         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00196         self.cameras.append(val1)
00197       start = end
00198       end += 4
00199       (length,) = _struct_I.unpack(str[start:end])
00200       self.targets = []
00201       for i in range(0, length):
00202         val1 = geometry_msgs.msg.Pose()
00203         _v9 = val1.position
00204         _x = _v9
00205         start = end
00206         end += 24
00207         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00208         _v10 = val1.orientation
00209         _x = _v10
00210         start = end
00211         end += 32
00212         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00213         self.targets.append(val1)
00214       return self
00215     except struct.error as e:
00216       raise genpy.DeserializationError(e) #most likely buffer underfill
00217 
00218 
00219   def serialize_numpy(self, buff, numpy):
00220     """
00221     serialize message with numpy array types into buffer
00222     :param buff: buffer, ``StringIO``
00223     :param numpy: numpy python module
00224     """
00225     try:
00226       _x = self
00227       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00228       _x = self.header.frame_id
00229       length = len(_x)
00230       if python3 or type(_x) == unicode:
00231         _x = _x.encode('utf-8')
00232         length = len(_x)
00233       buff.write(struct.pack('<I%ss'%length, length, _x))
00234       length = len(self.cameras)
00235       buff.write(_struct_I.pack(length))
00236       for val1 in self.cameras:
00237         _x = val1.camera_id
00238         length = len(_x)
00239         if python3 or type(_x) == unicode:
00240           _x = _x.encode('utf-8')
00241           length = len(_x)
00242         buff.write(struct.pack('<I%ss'%length, length, _x))
00243         _v11 = val1.pose
00244         _v12 = _v11.position
00245         _x = _v12
00246         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00247         _v13 = _v11.orientation
00248         _x = _v13
00249         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00250       length = len(self.targets)
00251       buff.write(_struct_I.pack(length))
00252       for val1 in self.targets:
00253         _v14 = val1.position
00254         _x = _v14
00255         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00256         _v15 = val1.orientation
00257         _x = _v15
00258         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00259     except struct.error as se: self._check_types(se)
00260     except TypeError as te: self._check_types(te)
00261 
00262   def deserialize_numpy(self, str, numpy):
00263     """
00264     unpack serialized message in str into this message instance using numpy for array types
00265     :param str: byte array of serialized message, ``str``
00266     :param numpy: numpy python module
00267     """
00268     try:
00269       if self.header is None:
00270         self.header = std_msgs.msg.Header()
00271       if self.cameras is None:
00272         self.cameras = None
00273       if self.targets is None:
00274         self.targets = None
00275       end = 0
00276       _x = self
00277       start = end
00278       end += 12
00279       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00280       start = end
00281       end += 4
00282       (length,) = _struct_I.unpack(str[start:end])
00283       start = end
00284       end += length
00285       if python3:
00286         self.header.frame_id = str[start:end].decode('utf-8')
00287       else:
00288         self.header.frame_id = str[start:end]
00289       start = end
00290       end += 4
00291       (length,) = _struct_I.unpack(str[start:end])
00292       self.cameras = []
00293       for i in range(0, length):
00294         val1 = camera_pose_calibration.msg.CameraPose()
00295         start = end
00296         end += 4
00297         (length,) = _struct_I.unpack(str[start:end])
00298         start = end
00299         end += length
00300         if python3:
00301           val1.camera_id = str[start:end].decode('utf-8')
00302         else:
00303           val1.camera_id = str[start:end]
00304         _v16 = val1.pose
00305         _v17 = _v16.position
00306         _x = _v17
00307         start = end
00308         end += 24
00309         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00310         _v18 = _v16.orientation
00311         _x = _v18
00312         start = end
00313         end += 32
00314         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00315         self.cameras.append(val1)
00316       start = end
00317       end += 4
00318       (length,) = _struct_I.unpack(str[start:end])
00319       self.targets = []
00320       for i in range(0, length):
00321         val1 = geometry_msgs.msg.Pose()
00322         _v19 = val1.position
00323         _x = _v19
00324         start = end
00325         end += 24
00326         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00327         _v20 = val1.orientation
00328         _x = _v20
00329         start = end
00330         end += 32
00331         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00332         self.targets.append(val1)
00333       return self
00334     except struct.error as e:
00335       raise genpy.DeserializationError(e) #most likely buffer underfill
00336 
00337 _struct_I = genpy.struct_I
00338 _struct_3I = struct.Struct("<3I")
00339 _struct_4d = struct.Struct("<4d")
00340 _struct_3d = struct.Struct("<3d")
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends


camera_pose_calibration
Author(s): Vijay Pradeep, Wim Meeussen
autogenerated on Thu Aug 15 2013 12:02:24