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


re_srvs
Author(s): Alexander Perzylo
autogenerated on Sun Jan 5 2014 11:28:42