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


pixel_2_3d
Author(s): Kelsey Hawkins / kphawkins@gatech.edu, Advisor: Prof. Charlie Kemp (Healthcare Robotics Lab at Georgia Tech)
autogenerated on Wed Nov 27 2013 11:35:21