_HeadRegistration.py
Go to the documentation of this file.
00001 """autogenerated by genpy from hrl_head_registration/HeadRegistrationRequest.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 HeadRegistrationRequest(genpy.Message):
00009   _md5sum = "187c392235727ec43339108b21286363"
00010   _type = "hrl_head_registration/HeadRegistrationRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """uint32 u
00013 uint32 v
00014 
00015 """
00016   __slots__ = ['u','v']
00017   _slot_types = ['uint32','uint32']
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        u,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(HeadRegistrationRequest, self).__init__(*args, **kwds)
00035       #message fields cannot be None, assign default values for those that are
00036       if self.u is None:
00037         self.u = 0
00038       if self.v is None:
00039         self.v = 0
00040     else:
00041       self.u = 0
00042       self.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.u, _x.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.u, _x.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.u, _x.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.u, _x.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 hrl_head_registration/HeadRegistrationResponse.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 HeadRegistrationResponse(genpy.Message):
00117   _md5sum = "da7ab12656712843967163c58620c063"
00118   _type = "hrl_head_registration/HeadRegistrationResponse"
00119   _has_header = False #flag to mark the presence of a Header object
00120   _full_text = """geometry_msgs/PoseStamped tf_reg
00121 
00122 
00123 ================================================================================
00124 MSG: geometry_msgs/PoseStamped
00125 # A Pose with reference coordinate frame and timestamp
00126 Header header
00127 Pose pose
00128 
00129 ================================================================================
00130 MSG: std_msgs/Header
00131 # Standard metadata for higher-level stamped data types.
00132 # This is generally used to communicate timestamped data 
00133 # in a particular coordinate frame.
00134 # 
00135 # sequence ID: consecutively increasing ID 
00136 uint32 seq
00137 #Two-integer timestamp that is expressed as:
00138 # * stamp.secs: seconds (stamp_secs) since epoch
00139 # * stamp.nsecs: nanoseconds since stamp_secs
00140 # time-handling sugar is provided by the client library
00141 time stamp
00142 #Frame this data is associated with
00143 # 0: no frame
00144 # 1: global frame
00145 string frame_id
00146 
00147 ================================================================================
00148 MSG: geometry_msgs/Pose
00149 # A representation of pose in free space, composed of postion and orientation. 
00150 Point position
00151 Quaternion orientation
00152 
00153 ================================================================================
00154 MSG: geometry_msgs/Point
00155 # This contains the position of a point in free space
00156 float64 x
00157 float64 y
00158 float64 z
00159 
00160 ================================================================================
00161 MSG: geometry_msgs/Quaternion
00162 # This represents an orientation in free space in quaternion form.
00163 
00164 float64 x
00165 float64 y
00166 float64 z
00167 float64 w
00168 
00169 """
00170   __slots__ = ['tf_reg']
00171   _slot_types = ['geometry_msgs/PoseStamped']
00172 
00173   def __init__(self, *args, **kwds):
00174     """
00175     Constructor. Any message fields that are implicitly/explicitly
00176     set to None will be assigned a default value. The recommend
00177     use is keyword arguments as this is more robust to future message
00178     changes.  You cannot mix in-order arguments and keyword arguments.
00179 
00180     The available fields are:
00181        tf_reg
00182 
00183     :param args: complete set of field values, in .msg order
00184     :param kwds: use keyword arguments corresponding to message field names
00185     to set specific fields.
00186     """
00187     if args or kwds:
00188       super(HeadRegistrationResponse, self).__init__(*args, **kwds)
00189       #message fields cannot be None, assign default values for those that are
00190       if self.tf_reg is None:
00191         self.tf_reg = geometry_msgs.msg.PoseStamped()
00192     else:
00193       self.tf_reg = geometry_msgs.msg.PoseStamped()
00194 
00195   def _get_types(self):
00196     """
00197     internal API method
00198     """
00199     return self._slot_types
00200 
00201   def serialize(self, buff):
00202     """
00203     serialize message into buffer
00204     :param buff: buffer, ``StringIO``
00205     """
00206     try:
00207       _x = self
00208       buff.write(_struct_3I.pack(_x.tf_reg.header.seq, _x.tf_reg.header.stamp.secs, _x.tf_reg.header.stamp.nsecs))
00209       _x = self.tf_reg.header.frame_id
00210       length = len(_x)
00211       if python3 or type(_x) == unicode:
00212         _x = _x.encode('utf-8')
00213         length = len(_x)
00214       buff.write(struct.pack('<I%ss'%length, length, _x))
00215       _x = self
00216       buff.write(_struct_7d.pack(_x.tf_reg.pose.position.x, _x.tf_reg.pose.position.y, _x.tf_reg.pose.position.z, _x.tf_reg.pose.orientation.x, _x.tf_reg.pose.orientation.y, _x.tf_reg.pose.orientation.z, _x.tf_reg.pose.orientation.w))
00217     except struct.error as se: self._check_types(se)
00218     except TypeError as te: self._check_types(te)
00219 
00220   def deserialize(self, str):
00221     """
00222     unpack serialized message in str into this message instance
00223     :param str: byte array of serialized message, ``str``
00224     """
00225     try:
00226       if self.tf_reg is None:
00227         self.tf_reg = geometry_msgs.msg.PoseStamped()
00228       end = 0
00229       _x = self
00230       start = end
00231       end += 12
00232       (_x.tf_reg.header.seq, _x.tf_reg.header.stamp.secs, _x.tf_reg.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00233       start = end
00234       end += 4
00235       (length,) = _struct_I.unpack(str[start:end])
00236       start = end
00237       end += length
00238       if python3:
00239         self.tf_reg.header.frame_id = str[start:end].decode('utf-8')
00240       else:
00241         self.tf_reg.header.frame_id = str[start:end]
00242       _x = self
00243       start = end
00244       end += 56
00245       (_x.tf_reg.pose.position.x, _x.tf_reg.pose.position.y, _x.tf_reg.pose.position.z, _x.tf_reg.pose.orientation.x, _x.tf_reg.pose.orientation.y, _x.tf_reg.pose.orientation.z, _x.tf_reg.pose.orientation.w,) = _struct_7d.unpack(str[start:end])
00246       return self
00247     except struct.error as e:
00248       raise genpy.DeserializationError(e) #most likely buffer underfill
00249 
00250 
00251   def serialize_numpy(self, buff, numpy):
00252     """
00253     serialize message with numpy array types into buffer
00254     :param buff: buffer, ``StringIO``
00255     :param numpy: numpy python module
00256     """
00257     try:
00258       _x = self
00259       buff.write(_struct_3I.pack(_x.tf_reg.header.seq, _x.tf_reg.header.stamp.secs, _x.tf_reg.header.stamp.nsecs))
00260       _x = self.tf_reg.header.frame_id
00261       length = len(_x)
00262       if python3 or type(_x) == unicode:
00263         _x = _x.encode('utf-8')
00264         length = len(_x)
00265       buff.write(struct.pack('<I%ss'%length, length, _x))
00266       _x = self
00267       buff.write(_struct_7d.pack(_x.tf_reg.pose.position.x, _x.tf_reg.pose.position.y, _x.tf_reg.pose.position.z, _x.tf_reg.pose.orientation.x, _x.tf_reg.pose.orientation.y, _x.tf_reg.pose.orientation.z, _x.tf_reg.pose.orientation.w))
00268     except struct.error as se: self._check_types(se)
00269     except TypeError as te: self._check_types(te)
00270 
00271   def deserialize_numpy(self, str, numpy):
00272     """
00273     unpack serialized message in str into this message instance using numpy for array types
00274     :param str: byte array of serialized message, ``str``
00275     :param numpy: numpy python module
00276     """
00277     try:
00278       if self.tf_reg is None:
00279         self.tf_reg = geometry_msgs.msg.PoseStamped()
00280       end = 0
00281       _x = self
00282       start = end
00283       end += 12
00284       (_x.tf_reg.header.seq, _x.tf_reg.header.stamp.secs, _x.tf_reg.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00285       start = end
00286       end += 4
00287       (length,) = _struct_I.unpack(str[start:end])
00288       start = end
00289       end += length
00290       if python3:
00291         self.tf_reg.header.frame_id = str[start:end].decode('utf-8')
00292       else:
00293         self.tf_reg.header.frame_id = str[start:end]
00294       _x = self
00295       start = end
00296       end += 56
00297       (_x.tf_reg.pose.position.x, _x.tf_reg.pose.position.y, _x.tf_reg.pose.position.z, _x.tf_reg.pose.orientation.x, _x.tf_reg.pose.orientation.y, _x.tf_reg.pose.orientation.z, _x.tf_reg.pose.orientation.w,) = _struct_7d.unpack(str[start:end])
00298       return self
00299     except struct.error as e:
00300       raise genpy.DeserializationError(e) #most likely buffer underfill
00301 
00302 _struct_I = genpy.struct_I
00303 _struct_3I = struct.Struct("<3I")
00304 _struct_7d = struct.Struct("<7d")
00305 class HeadRegistration(object):
00306   _type          = 'hrl_head_registration/HeadRegistration'
00307   _md5sum = 'ba42643e9245f01a2e491184b8087234'
00308   _request_class  = HeadRegistrationRequest
00309   _response_class = HeadRegistrationResponse


hrl_head_registration
Author(s): Kelsey Hawkins
autogenerated on Wed Nov 27 2013 11:45:27