_SetGraspParameters.py
Go to the documentation of this file.
00001 """autogenerated by genpy from orrosplanning/SetGraspParametersRequest.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 SetGraspParametersRequest(genpy.Message):
00009   _md5sum = "12a8cace076309fe7eca8a537ec0380b"
00010   _type = "orrosplanning/SetGraspParametersRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """
00013 float64[] approachrays
00014 float64[] standoffs
00015 float64[] rolls
00016 
00017 float64[] preshapes
00018 
00019 """
00020   __slots__ = ['approachrays','standoffs','rolls','preshapes']
00021   _slot_types = ['float64[]','float64[]','float64[]','float64[]']
00022 
00023   def __init__(self, *args, **kwds):
00024     """
00025     Constructor. Any message fields that are implicitly/explicitly
00026     set to None will be assigned a default value. The recommend
00027     use is keyword arguments as this is more robust to future message
00028     changes.  You cannot mix in-order arguments and keyword arguments.
00029 
00030     The available fields are:
00031        approachrays,standoffs,rolls,preshapes
00032 
00033     :param args: complete set of field values, in .msg order
00034     :param kwds: use keyword arguments corresponding to message field names
00035     to set specific fields.
00036     """
00037     if args or kwds:
00038       super(SetGraspParametersRequest, self).__init__(*args, **kwds)
00039       #message fields cannot be None, assign default values for those that are
00040       if self.approachrays is None:
00041         self.approachrays = []
00042       if self.standoffs is None:
00043         self.standoffs = []
00044       if self.rolls is None:
00045         self.rolls = []
00046       if self.preshapes is None:
00047         self.preshapes = []
00048     else:
00049       self.approachrays = []
00050       self.standoffs = []
00051       self.rolls = []
00052       self.preshapes = []
00053 
00054   def _get_types(self):
00055     """
00056     internal API method
00057     """
00058     return self._slot_types
00059 
00060   def serialize(self, buff):
00061     """
00062     serialize message into buffer
00063     :param buff: buffer, ``StringIO``
00064     """
00065     try:
00066       length = len(self.approachrays)
00067       buff.write(_struct_I.pack(length))
00068       pattern = '<%sd'%length
00069       buff.write(struct.pack(pattern, *self.approachrays))
00070       length = len(self.standoffs)
00071       buff.write(_struct_I.pack(length))
00072       pattern = '<%sd'%length
00073       buff.write(struct.pack(pattern, *self.standoffs))
00074       length = len(self.rolls)
00075       buff.write(_struct_I.pack(length))
00076       pattern = '<%sd'%length
00077       buff.write(struct.pack(pattern, *self.rolls))
00078       length = len(self.preshapes)
00079       buff.write(_struct_I.pack(length))
00080       pattern = '<%sd'%length
00081       buff.write(struct.pack(pattern, *self.preshapes))
00082     except struct.error as se: self._check_types(se)
00083     except TypeError as te: self._check_types(te)
00084 
00085   def deserialize(self, str):
00086     """
00087     unpack serialized message in str into this message instance
00088     :param str: byte array of serialized message, ``str``
00089     """
00090     try:
00091       end = 0
00092       start = end
00093       end += 4
00094       (length,) = _struct_I.unpack(str[start:end])
00095       pattern = '<%sd'%length
00096       start = end
00097       end += struct.calcsize(pattern)
00098       self.approachrays = struct.unpack(pattern, str[start:end])
00099       start = end
00100       end += 4
00101       (length,) = _struct_I.unpack(str[start:end])
00102       pattern = '<%sd'%length
00103       start = end
00104       end += struct.calcsize(pattern)
00105       self.standoffs = struct.unpack(pattern, str[start:end])
00106       start = end
00107       end += 4
00108       (length,) = _struct_I.unpack(str[start:end])
00109       pattern = '<%sd'%length
00110       start = end
00111       end += struct.calcsize(pattern)
00112       self.rolls = struct.unpack(pattern, str[start:end])
00113       start = end
00114       end += 4
00115       (length,) = _struct_I.unpack(str[start:end])
00116       pattern = '<%sd'%length
00117       start = end
00118       end += struct.calcsize(pattern)
00119       self.preshapes = struct.unpack(pattern, str[start:end])
00120       return self
00121     except struct.error as e:
00122       raise genpy.DeserializationError(e) #most likely buffer underfill
00123 
00124 
00125   def serialize_numpy(self, buff, numpy):
00126     """
00127     serialize message with numpy array types into buffer
00128     :param buff: buffer, ``StringIO``
00129     :param numpy: numpy python module
00130     """
00131     try:
00132       length = len(self.approachrays)
00133       buff.write(_struct_I.pack(length))
00134       pattern = '<%sd'%length
00135       buff.write(self.approachrays.tostring())
00136       length = len(self.standoffs)
00137       buff.write(_struct_I.pack(length))
00138       pattern = '<%sd'%length
00139       buff.write(self.standoffs.tostring())
00140       length = len(self.rolls)
00141       buff.write(_struct_I.pack(length))
00142       pattern = '<%sd'%length
00143       buff.write(self.rolls.tostring())
00144       length = len(self.preshapes)
00145       buff.write(_struct_I.pack(length))
00146       pattern = '<%sd'%length
00147       buff.write(self.preshapes.tostring())
00148     except struct.error as se: self._check_types(se)
00149     except TypeError as te: self._check_types(te)
00150 
00151   def deserialize_numpy(self, str, numpy):
00152     """
00153     unpack serialized message in str into this message instance using numpy for array types
00154     :param str: byte array of serialized message, ``str``
00155     :param numpy: numpy python module
00156     """
00157     try:
00158       end = 0
00159       start = end
00160       end += 4
00161       (length,) = _struct_I.unpack(str[start:end])
00162       pattern = '<%sd'%length
00163       start = end
00164       end += struct.calcsize(pattern)
00165       self.approachrays = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00166       start = end
00167       end += 4
00168       (length,) = _struct_I.unpack(str[start:end])
00169       pattern = '<%sd'%length
00170       start = end
00171       end += struct.calcsize(pattern)
00172       self.standoffs = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00173       start = end
00174       end += 4
00175       (length,) = _struct_I.unpack(str[start:end])
00176       pattern = '<%sd'%length
00177       start = end
00178       end += struct.calcsize(pattern)
00179       self.rolls = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00180       start = end
00181       end += 4
00182       (length,) = _struct_I.unpack(str[start:end])
00183       pattern = '<%sd'%length
00184       start = end
00185       end += struct.calcsize(pattern)
00186       self.preshapes = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00187       return self
00188     except struct.error as e:
00189       raise genpy.DeserializationError(e) #most likely buffer underfill
00190 
00191 _struct_I = genpy.struct_I
00192 """autogenerated by genpy from orrosplanning/SetGraspParametersResponse.msg. Do not edit."""
00193 import sys
00194 python3 = True if sys.hexversion > 0x03000000 else False
00195 import genpy
00196 import struct
00197 
00198 
00199 class SetGraspParametersResponse(genpy.Message):
00200   _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
00201   _type = "orrosplanning/SetGraspParametersResponse"
00202   _has_header = False #flag to mark the presence of a Header object
00203   _full_text = """
00204 
00205 """
00206   __slots__ = []
00207   _slot_types = []
00208 
00209   def __init__(self, *args, **kwds):
00210     """
00211     Constructor. Any message fields that are implicitly/explicitly
00212     set to None will be assigned a default value. The recommend
00213     use is keyword arguments as this is more robust to future message
00214     changes.  You cannot mix in-order arguments and keyword arguments.
00215 
00216     The available fields are:
00217        
00218 
00219     :param args: complete set of field values, in .msg order
00220     :param kwds: use keyword arguments corresponding to message field names
00221     to set specific fields.
00222     """
00223     if args or kwds:
00224       super(SetGraspParametersResponse, self).__init__(*args, **kwds)
00225 
00226   def _get_types(self):
00227     """
00228     internal API method
00229     """
00230     return self._slot_types
00231 
00232   def serialize(self, buff):
00233     """
00234     serialize message into buffer
00235     :param buff: buffer, ``StringIO``
00236     """
00237     try:
00238       pass
00239     except struct.error as se: self._check_types(se)
00240     except TypeError as te: self._check_types(te)
00241 
00242   def deserialize(self, str):
00243     """
00244     unpack serialized message in str into this message instance
00245     :param str: byte array of serialized message, ``str``
00246     """
00247     try:
00248       end = 0
00249       return self
00250     except struct.error as e:
00251       raise genpy.DeserializationError(e) #most likely buffer underfill
00252 
00253 
00254   def serialize_numpy(self, buff, numpy):
00255     """
00256     serialize message with numpy array types into buffer
00257     :param buff: buffer, ``StringIO``
00258     :param numpy: numpy python module
00259     """
00260     try:
00261       pass
00262     except struct.error as se: self._check_types(se)
00263     except TypeError as te: self._check_types(te)
00264 
00265   def deserialize_numpy(self, str, numpy):
00266     """
00267     unpack serialized message in str into this message instance using numpy for array types
00268     :param str: byte array of serialized message, ``str``
00269     :param numpy: numpy python module
00270     """
00271     try:
00272       end = 0
00273       return self
00274     except struct.error as e:
00275       raise genpy.DeserializationError(e) #most likely buffer underfill
00276 
00277 _struct_I = genpy.struct_I
00278 class SetGraspParameters(object):
00279   _type          = 'orrosplanning/SetGraspParameters'
00280   _md5sum = '12a8cace076309fe7eca8a537ec0380b'
00281   _request_class  = SetGraspParametersRequest
00282   _response_class = SetGraspParametersResponse
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


orrosplanning
Author(s): Rosen Diankov (rosen.diankov@gmail.com)
autogenerated on Sat Mar 23 2013 22:32:56