_SetTemplate.py
Go to the documentation of this file.
00001 """autogenerated by genpy from posedetectiondb/SetTemplateRequest.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 geometry_msgs.msg
00008 import std_msgs.msg
00009 import sensor_msgs.msg
00010 
00011 class SetTemplateRequest(genpy.Message):
00012   _md5sum = "116fa80f27cbdfcd76d0b57a30ef79ec"
00013   _type = "posedetectiondb/SetTemplateRequest"
00014   _has_header = False #flag to mark the presence of a Header object
00015   _full_text = """string type
00016 sensor_msgs/Image image
00017 
00018 float32 dimx
00019 float32 dimy
00020 geometry_msgs/Pose relativepose
00021 string savefilename
00022 
00023 ================================================================================
00024 MSG: sensor_msgs/Image
00025 # This message contains an uncompressed image
00026 # (0, 0) is at top-left corner of image
00027 #
00028 
00029 Header header        # Header timestamp should be acquisition time of image
00030                      # Header frame_id should be optical frame of camera
00031                      # origin of frame should be optical center of cameara
00032                      # +x should point to the right in the image
00033                      # +y should point down in the image
00034                      # +z should point into to plane of the image
00035                      # If the frame_id here and the frame_id of the CameraInfo
00036                      # message associated with the image conflict
00037                      # the behavior is undefined
00038 
00039 uint32 height         # image height, that is, number of rows
00040 uint32 width          # image width, that is, number of columns
00041 
00042 # The legal values for encoding are in file src/image_encodings.cpp
00043 # If you want to standardize a new string format, join
00044 # ros-users@lists.sourceforge.net and send an email proposing a new encoding.
00045 
00046 string encoding       # Encoding of pixels -- channel meaning, ordering, size
00047                       # taken from the list of strings in src/image_encodings.cpp
00048 
00049 uint8 is_bigendian    # is this data bigendian?
00050 uint32 step           # Full row length in bytes
00051 uint8[] data          # actual matrix data, size is (step * rows)
00052 
00053 ================================================================================
00054 MSG: std_msgs/Header
00055 # Standard metadata for higher-level stamped data types.
00056 # This is generally used to communicate timestamped data 
00057 # in a particular coordinate frame.
00058 # 
00059 # sequence ID: consecutively increasing ID 
00060 uint32 seq
00061 #Two-integer timestamp that is expressed as:
00062 # * stamp.secs: seconds (stamp_secs) since epoch
00063 # * stamp.nsecs: nanoseconds since stamp_secs
00064 # time-handling sugar is provided by the client library
00065 time stamp
00066 #Frame this data is associated with
00067 # 0: no frame
00068 # 1: global frame
00069 string frame_id
00070 
00071 ================================================================================
00072 MSG: geometry_msgs/Pose
00073 # A representation of pose in free space, composed of postion and orientation. 
00074 Point position
00075 Quaternion orientation
00076 
00077 ================================================================================
00078 MSG: geometry_msgs/Point
00079 # This contains the position of a point in free space
00080 float64 x
00081 float64 y
00082 float64 z
00083 
00084 ================================================================================
00085 MSG: geometry_msgs/Quaternion
00086 # This represents an orientation in free space in quaternion form.
00087 
00088 float64 x
00089 float64 y
00090 float64 z
00091 float64 w
00092 
00093 """
00094   __slots__ = ['type','image','dimx','dimy','relativepose','savefilename']
00095   _slot_types = ['string','sensor_msgs/Image','float32','float32','geometry_msgs/Pose','string']
00096 
00097   def __init__(self, *args, **kwds):
00098     """
00099     Constructor. Any message fields that are implicitly/explicitly
00100     set to None will be assigned a default value. The recommend
00101     use is keyword arguments as this is more robust to future message
00102     changes.  You cannot mix in-order arguments and keyword arguments.
00103 
00104     The available fields are:
00105        type,image,dimx,dimy,relativepose,savefilename
00106 
00107     :param args: complete set of field values, in .msg order
00108     :param kwds: use keyword arguments corresponding to message field names
00109     to set specific fields.
00110     """
00111     if args or kwds:
00112       super(SetTemplateRequest, self).__init__(*args, **kwds)
00113       #message fields cannot be None, assign default values for those that are
00114       if self.type is None:
00115         self.type = ''
00116       if self.image is None:
00117         self.image = sensor_msgs.msg.Image()
00118       if self.dimx is None:
00119         self.dimx = 0.
00120       if self.dimy is None:
00121         self.dimy = 0.
00122       if self.relativepose is None:
00123         self.relativepose = geometry_msgs.msg.Pose()
00124       if self.savefilename is None:
00125         self.savefilename = ''
00126     else:
00127       self.type = ''
00128       self.image = sensor_msgs.msg.Image()
00129       self.dimx = 0.
00130       self.dimy = 0.
00131       self.relativepose = geometry_msgs.msg.Pose()
00132       self.savefilename = ''
00133 
00134   def _get_types(self):
00135     """
00136     internal API method
00137     """
00138     return self._slot_types
00139 
00140   def serialize(self, buff):
00141     """
00142     serialize message into buffer
00143     :param buff: buffer, ``StringIO``
00144     """
00145     try:
00146       _x = self.type
00147       length = len(_x)
00148       if python3 or type(_x) == unicode:
00149         _x = _x.encode('utf-8')
00150         length = len(_x)
00151       buff.write(struct.pack('<I%ss'%length, length, _x))
00152       _x = self
00153       buff.write(_struct_3I.pack(_x.image.header.seq, _x.image.header.stamp.secs, _x.image.header.stamp.nsecs))
00154       _x = self.image.header.frame_id
00155       length = len(_x)
00156       if python3 or type(_x) == unicode:
00157         _x = _x.encode('utf-8')
00158         length = len(_x)
00159       buff.write(struct.pack('<I%ss'%length, length, _x))
00160       _x = self
00161       buff.write(_struct_2I.pack(_x.image.height, _x.image.width))
00162       _x = self.image.encoding
00163       length = len(_x)
00164       if python3 or type(_x) == unicode:
00165         _x = _x.encode('utf-8')
00166         length = len(_x)
00167       buff.write(struct.pack('<I%ss'%length, length, _x))
00168       _x = self
00169       buff.write(_struct_BI.pack(_x.image.is_bigendian, _x.image.step))
00170       _x = self.image.data
00171       length = len(_x)
00172       # - if encoded as a list instead, serialize as bytes instead of string
00173       if type(_x) in [list, tuple]:
00174         buff.write(struct.pack('<I%sB'%length, length, *_x))
00175       else:
00176         buff.write(struct.pack('<I%ss'%length, length, _x))
00177       _x = self
00178       buff.write(_struct_2f7d.pack(_x.dimx, _x.dimy, _x.relativepose.position.x, _x.relativepose.position.y, _x.relativepose.position.z, _x.relativepose.orientation.x, _x.relativepose.orientation.y, _x.relativepose.orientation.z, _x.relativepose.orientation.w))
00179       _x = self.savefilename
00180       length = len(_x)
00181       if python3 or type(_x) == unicode:
00182         _x = _x.encode('utf-8')
00183         length = len(_x)
00184       buff.write(struct.pack('<I%ss'%length, length, _x))
00185     except struct.error as se: self._check_types(se)
00186     except TypeError as te: self._check_types(te)
00187 
00188   def deserialize(self, str):
00189     """
00190     unpack serialized message in str into this message instance
00191     :param str: byte array of serialized message, ``str``
00192     """
00193     try:
00194       if self.image is None:
00195         self.image = sensor_msgs.msg.Image()
00196       if self.relativepose is None:
00197         self.relativepose = geometry_msgs.msg.Pose()
00198       end = 0
00199       start = end
00200       end += 4
00201       (length,) = _struct_I.unpack(str[start:end])
00202       start = end
00203       end += length
00204       if python3:
00205         self.type = str[start:end].decode('utf-8')
00206       else:
00207         self.type = str[start:end]
00208       _x = self
00209       start = end
00210       end += 12
00211       (_x.image.header.seq, _x.image.header.stamp.secs, _x.image.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00212       start = end
00213       end += 4
00214       (length,) = _struct_I.unpack(str[start:end])
00215       start = end
00216       end += length
00217       if python3:
00218         self.image.header.frame_id = str[start:end].decode('utf-8')
00219       else:
00220         self.image.header.frame_id = str[start:end]
00221       _x = self
00222       start = end
00223       end += 8
00224       (_x.image.height, _x.image.width,) = _struct_2I.unpack(str[start:end])
00225       start = end
00226       end += 4
00227       (length,) = _struct_I.unpack(str[start:end])
00228       start = end
00229       end += length
00230       if python3:
00231         self.image.encoding = str[start:end].decode('utf-8')
00232       else:
00233         self.image.encoding = str[start:end]
00234       _x = self
00235       start = end
00236       end += 5
00237       (_x.image.is_bigendian, _x.image.step,) = _struct_BI.unpack(str[start:end])
00238       start = end
00239       end += 4
00240       (length,) = _struct_I.unpack(str[start:end])
00241       start = end
00242       end += length
00243       if python3:
00244         self.image.data = str[start:end].decode('utf-8')
00245       else:
00246         self.image.data = str[start:end]
00247       _x = self
00248       start = end
00249       end += 64
00250       (_x.dimx, _x.dimy, _x.relativepose.position.x, _x.relativepose.position.y, _x.relativepose.position.z, _x.relativepose.orientation.x, _x.relativepose.orientation.y, _x.relativepose.orientation.z, _x.relativepose.orientation.w,) = _struct_2f7d.unpack(str[start:end])
00251       start = end
00252       end += 4
00253       (length,) = _struct_I.unpack(str[start:end])
00254       start = end
00255       end += length
00256       if python3:
00257         self.savefilename = str[start:end].decode('utf-8')
00258       else:
00259         self.savefilename = str[start:end]
00260       return self
00261     except struct.error as e:
00262       raise genpy.DeserializationError(e) #most likely buffer underfill
00263 
00264 
00265   def serialize_numpy(self, buff, numpy):
00266     """
00267     serialize message with numpy array types into buffer
00268     :param buff: buffer, ``StringIO``
00269     :param numpy: numpy python module
00270     """
00271     try:
00272       _x = self.type
00273       length = len(_x)
00274       if python3 or type(_x) == unicode:
00275         _x = _x.encode('utf-8')
00276         length = len(_x)
00277       buff.write(struct.pack('<I%ss'%length, length, _x))
00278       _x = self
00279       buff.write(_struct_3I.pack(_x.image.header.seq, _x.image.header.stamp.secs, _x.image.header.stamp.nsecs))
00280       _x = self.image.header.frame_id
00281       length = len(_x)
00282       if python3 or type(_x) == unicode:
00283         _x = _x.encode('utf-8')
00284         length = len(_x)
00285       buff.write(struct.pack('<I%ss'%length, length, _x))
00286       _x = self
00287       buff.write(_struct_2I.pack(_x.image.height, _x.image.width))
00288       _x = self.image.encoding
00289       length = len(_x)
00290       if python3 or type(_x) == unicode:
00291         _x = _x.encode('utf-8')
00292         length = len(_x)
00293       buff.write(struct.pack('<I%ss'%length, length, _x))
00294       _x = self
00295       buff.write(_struct_BI.pack(_x.image.is_bigendian, _x.image.step))
00296       _x = self.image.data
00297       length = len(_x)
00298       # - if encoded as a list instead, serialize as bytes instead of string
00299       if type(_x) in [list, tuple]:
00300         buff.write(struct.pack('<I%sB'%length, length, *_x))
00301       else:
00302         buff.write(struct.pack('<I%ss'%length, length, _x))
00303       _x = self
00304       buff.write(_struct_2f7d.pack(_x.dimx, _x.dimy, _x.relativepose.position.x, _x.relativepose.position.y, _x.relativepose.position.z, _x.relativepose.orientation.x, _x.relativepose.orientation.y, _x.relativepose.orientation.z, _x.relativepose.orientation.w))
00305       _x = self.savefilename
00306       length = len(_x)
00307       if python3 or type(_x) == unicode:
00308         _x = _x.encode('utf-8')
00309         length = len(_x)
00310       buff.write(struct.pack('<I%ss'%length, length, _x))
00311     except struct.error as se: self._check_types(se)
00312     except TypeError as te: self._check_types(te)
00313 
00314   def deserialize_numpy(self, str, numpy):
00315     """
00316     unpack serialized message in str into this message instance using numpy for array types
00317     :param str: byte array of serialized message, ``str``
00318     :param numpy: numpy python module
00319     """
00320     try:
00321       if self.image is None:
00322         self.image = sensor_msgs.msg.Image()
00323       if self.relativepose is None:
00324         self.relativepose = geometry_msgs.msg.Pose()
00325       end = 0
00326       start = end
00327       end += 4
00328       (length,) = _struct_I.unpack(str[start:end])
00329       start = end
00330       end += length
00331       if python3:
00332         self.type = str[start:end].decode('utf-8')
00333       else:
00334         self.type = str[start:end]
00335       _x = self
00336       start = end
00337       end += 12
00338       (_x.image.header.seq, _x.image.header.stamp.secs, _x.image.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00339       start = end
00340       end += 4
00341       (length,) = _struct_I.unpack(str[start:end])
00342       start = end
00343       end += length
00344       if python3:
00345         self.image.header.frame_id = str[start:end].decode('utf-8')
00346       else:
00347         self.image.header.frame_id = str[start:end]
00348       _x = self
00349       start = end
00350       end += 8
00351       (_x.image.height, _x.image.width,) = _struct_2I.unpack(str[start:end])
00352       start = end
00353       end += 4
00354       (length,) = _struct_I.unpack(str[start:end])
00355       start = end
00356       end += length
00357       if python3:
00358         self.image.encoding = str[start:end].decode('utf-8')
00359       else:
00360         self.image.encoding = str[start:end]
00361       _x = self
00362       start = end
00363       end += 5
00364       (_x.image.is_bigendian, _x.image.step,) = _struct_BI.unpack(str[start:end])
00365       start = end
00366       end += 4
00367       (length,) = _struct_I.unpack(str[start:end])
00368       start = end
00369       end += length
00370       if python3:
00371         self.image.data = str[start:end].decode('utf-8')
00372       else:
00373         self.image.data = str[start:end]
00374       _x = self
00375       start = end
00376       end += 64
00377       (_x.dimx, _x.dimy, _x.relativepose.position.x, _x.relativepose.position.y, _x.relativepose.position.z, _x.relativepose.orientation.x, _x.relativepose.orientation.y, _x.relativepose.orientation.z, _x.relativepose.orientation.w,) = _struct_2f7d.unpack(str[start:end])
00378       start = end
00379       end += 4
00380       (length,) = _struct_I.unpack(str[start:end])
00381       start = end
00382       end += length
00383       if python3:
00384         self.savefilename = str[start:end].decode('utf-8')
00385       else:
00386         self.savefilename = str[start:end]
00387       return self
00388     except struct.error as e:
00389       raise genpy.DeserializationError(e) #most likely buffer underfill
00390 
00391 _struct_I = genpy.struct_I
00392 _struct_2f7d = struct.Struct("<2f7d")
00393 _struct_3I = struct.Struct("<3I")
00394 _struct_2I = struct.Struct("<2I")
00395 _struct_BI = struct.Struct("<BI")
00396 """autogenerated by genpy from posedetectiondb/SetTemplateResponse.msg. Do not edit."""
00397 import sys
00398 python3 = True if sys.hexversion > 0x03000000 else False
00399 import genpy
00400 import struct
00401 
00402 
00403 class SetTemplateResponse(genpy.Message):
00404   _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
00405   _type = "posedetectiondb/SetTemplateResponse"
00406   _has_header = False #flag to mark the presence of a Header object
00407   _full_text = """
00408 
00409 """
00410   __slots__ = []
00411   _slot_types = []
00412 
00413   def __init__(self, *args, **kwds):
00414     """
00415     Constructor. Any message fields that are implicitly/explicitly
00416     set to None will be assigned a default value. The recommend
00417     use is keyword arguments as this is more robust to future message
00418     changes.  You cannot mix in-order arguments and keyword arguments.
00419 
00420     The available fields are:
00421        
00422 
00423     :param args: complete set of field values, in .msg order
00424     :param kwds: use keyword arguments corresponding to message field names
00425     to set specific fields.
00426     """
00427     if args or kwds:
00428       super(SetTemplateResponse, self).__init__(*args, **kwds)
00429 
00430   def _get_types(self):
00431     """
00432     internal API method
00433     """
00434     return self._slot_types
00435 
00436   def serialize(self, buff):
00437     """
00438     serialize message into buffer
00439     :param buff: buffer, ``StringIO``
00440     """
00441     try:
00442       pass
00443     except struct.error as se: self._check_types(se)
00444     except TypeError as te: self._check_types(te)
00445 
00446   def deserialize(self, str):
00447     """
00448     unpack serialized message in str into this message instance
00449     :param str: byte array of serialized message, ``str``
00450     """
00451     try:
00452       end = 0
00453       return self
00454     except struct.error as e:
00455       raise genpy.DeserializationError(e) #most likely buffer underfill
00456 
00457 
00458   def serialize_numpy(self, buff, numpy):
00459     """
00460     serialize message with numpy array types into buffer
00461     :param buff: buffer, ``StringIO``
00462     :param numpy: numpy python module
00463     """
00464     try:
00465       pass
00466     except struct.error as se: self._check_types(se)
00467     except TypeError as te: self._check_types(te)
00468 
00469   def deserialize_numpy(self, str, numpy):
00470     """
00471     unpack serialized message in str into this message instance using numpy for array types
00472     :param str: byte array of serialized message, ``str``
00473     :param numpy: numpy python module
00474     """
00475     try:
00476       end = 0
00477       return self
00478     except struct.error as e:
00479       raise genpy.DeserializationError(e) #most likely buffer underfill
00480 
00481 _struct_I = genpy.struct_I
00482 class SetTemplate(object):
00483   _type          = 'posedetectiondb/SetTemplate'
00484   _md5sum = '116fa80f27cbdfcd76d0b57a30ef79ec'
00485   _request_class  = SetTemplateRequest
00486   _response_class = SetTemplateResponse
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends


posedetectiondb
Author(s): Rosen Diankov (rdiankov@cs.cmu.edu)
autogenerated on Sat Mar 23 2013 16:43:26