_ArmNavMovePalmLinkRel.py
Go to the documentation of this file.
00001 """autogenerated by genpy from srs_assisted_arm_navigation_msgs/ArmNavMovePalmLinkRelRequest.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 
00009 class ArmNavMovePalmLinkRelRequest(genpy.Message):
00010   _md5sum = "8748b3b787ed772f72ebf392fe564ece"
00011   _type = "srs_assisted_arm_navigation_msgs/ArmNavMovePalmLinkRelRequest"
00012   _has_header = False #flag to mark the presence of a Header object
00013   _full_text = """
00014 
00015 geometry_msgs/Pose relative_movement
00016 
00017 ================================================================================
00018 MSG: geometry_msgs/Pose
00019 # A representation of pose in free space, composed of postion and orientation. 
00020 Point position
00021 Quaternion orientation
00022 
00023 ================================================================================
00024 MSG: geometry_msgs/Point
00025 # This contains the position of a point in free space
00026 float64 x
00027 float64 y
00028 float64 z
00029 
00030 ================================================================================
00031 MSG: geometry_msgs/Quaternion
00032 # This represents an orientation in free space in quaternion form.
00033 
00034 float64 x
00035 float64 y
00036 float64 z
00037 float64 w
00038 
00039 """
00040   __slots__ = ['relative_movement']
00041   _slot_types = ['geometry_msgs/Pose']
00042 
00043   def __init__(self, *args, **kwds):
00044     """
00045     Constructor. Any message fields that are implicitly/explicitly
00046     set to None will be assigned a default value. The recommend
00047     use is keyword arguments as this is more robust to future message
00048     changes.  You cannot mix in-order arguments and keyword arguments.
00049 
00050     The available fields are:
00051        relative_movement
00052 
00053     :param args: complete set of field values, in .msg order
00054     :param kwds: use keyword arguments corresponding to message field names
00055     to set specific fields.
00056     """
00057     if args or kwds:
00058       super(ArmNavMovePalmLinkRelRequest, self).__init__(*args, **kwds)
00059       #message fields cannot be None, assign default values for those that are
00060       if self.relative_movement is None:
00061         self.relative_movement = geometry_msgs.msg.Pose()
00062     else:
00063       self.relative_movement = geometry_msgs.msg.Pose()
00064 
00065   def _get_types(self):
00066     """
00067     internal API method
00068     """
00069     return self._slot_types
00070 
00071   def serialize(self, buff):
00072     """
00073     serialize message into buffer
00074     :param buff: buffer, ``StringIO``
00075     """
00076     try:
00077       _x = self
00078       buff.write(_struct_7d.pack(_x.relative_movement.position.x, _x.relative_movement.position.y, _x.relative_movement.position.z, _x.relative_movement.orientation.x, _x.relative_movement.orientation.y, _x.relative_movement.orientation.z, _x.relative_movement.orientation.w))
00079     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00080     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00081 
00082   def deserialize(self, str):
00083     """
00084     unpack serialized message in str into this message instance
00085     :param str: byte array of serialized message, ``str``
00086     """
00087     try:
00088       if self.relative_movement is None:
00089         self.relative_movement = geometry_msgs.msg.Pose()
00090       end = 0
00091       _x = self
00092       start = end
00093       end += 56
00094       (_x.relative_movement.position.x, _x.relative_movement.position.y, _x.relative_movement.position.z, _x.relative_movement.orientation.x, _x.relative_movement.orientation.y, _x.relative_movement.orientation.z, _x.relative_movement.orientation.w,) = _struct_7d.unpack(str[start:end])
00095       return self
00096     except struct.error as e:
00097       raise genpy.DeserializationError(e) #most likely buffer underfill
00098 
00099 
00100   def serialize_numpy(self, buff, numpy):
00101     """
00102     serialize message with numpy array types into buffer
00103     :param buff: buffer, ``StringIO``
00104     :param numpy: numpy python module
00105     """
00106     try:
00107       _x = self
00108       buff.write(_struct_7d.pack(_x.relative_movement.position.x, _x.relative_movement.position.y, _x.relative_movement.position.z, _x.relative_movement.orientation.x, _x.relative_movement.orientation.y, _x.relative_movement.orientation.z, _x.relative_movement.orientation.w))
00109     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00110     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00111 
00112   def deserialize_numpy(self, str, numpy):
00113     """
00114     unpack serialized message in str into this message instance using numpy for array types
00115     :param str: byte array of serialized message, ``str``
00116     :param numpy: numpy python module
00117     """
00118     try:
00119       if self.relative_movement is None:
00120         self.relative_movement = geometry_msgs.msg.Pose()
00121       end = 0
00122       _x = self
00123       start = end
00124       end += 56
00125       (_x.relative_movement.position.x, _x.relative_movement.position.y, _x.relative_movement.position.z, _x.relative_movement.orientation.x, _x.relative_movement.orientation.y, _x.relative_movement.orientation.z, _x.relative_movement.orientation.w,) = _struct_7d.unpack(str[start:end])
00126       return self
00127     except struct.error as e:
00128       raise genpy.DeserializationError(e) #most likely buffer underfill
00129 
00130 _struct_I = genpy.struct_I
00131 _struct_7d = struct.Struct("<7d")
00132 """autogenerated by genpy from srs_assisted_arm_navigation_msgs/ArmNavMovePalmLinkRelResponse.msg. Do not edit."""
00133 import sys
00134 python3 = True if sys.hexversion > 0x03000000 else False
00135 import genpy
00136 import struct
00137 
00138 
00139 class ArmNavMovePalmLinkRelResponse(genpy.Message):
00140   _md5sum = "7de7f4695a268566c2ce9ae9e3a34e73"
00141   _type = "srs_assisted_arm_navigation_msgs/ArmNavMovePalmLinkRelResponse"
00142   _has_header = False #flag to mark the presence of a Header object
00143   _full_text = """bool completed
00144 string msg
00145 
00146 """
00147   __slots__ = ['completed','msg']
00148   _slot_types = ['bool','string']
00149 
00150   def __init__(self, *args, **kwds):
00151     """
00152     Constructor. Any message fields that are implicitly/explicitly
00153     set to None will be assigned a default value. The recommend
00154     use is keyword arguments as this is more robust to future message
00155     changes.  You cannot mix in-order arguments and keyword arguments.
00156 
00157     The available fields are:
00158        completed,msg
00159 
00160     :param args: complete set of field values, in .msg order
00161     :param kwds: use keyword arguments corresponding to message field names
00162     to set specific fields.
00163     """
00164     if args or kwds:
00165       super(ArmNavMovePalmLinkRelResponse, self).__init__(*args, **kwds)
00166       #message fields cannot be None, assign default values for those that are
00167       if self.completed is None:
00168         self.completed = False
00169       if self.msg is None:
00170         self.msg = ''
00171     else:
00172       self.completed = False
00173       self.msg = ''
00174 
00175   def _get_types(self):
00176     """
00177     internal API method
00178     """
00179     return self._slot_types
00180 
00181   def serialize(self, buff):
00182     """
00183     serialize message into buffer
00184     :param buff: buffer, ``StringIO``
00185     """
00186     try:
00187       buff.write(_struct_B.pack(self.completed))
00188       _x = self.msg
00189       length = len(_x)
00190       if python3 or type(_x) == unicode:
00191         _x = _x.encode('utf-8')
00192         length = len(_x)
00193       buff.write(struct.pack('<I%ss'%length, length, _x))
00194     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00195     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00196 
00197   def deserialize(self, str):
00198     """
00199     unpack serialized message in str into this message instance
00200     :param str: byte array of serialized message, ``str``
00201     """
00202     try:
00203       end = 0
00204       start = end
00205       end += 1
00206       (self.completed,) = _struct_B.unpack(str[start:end])
00207       self.completed = bool(self.completed)
00208       start = end
00209       end += 4
00210       (length,) = _struct_I.unpack(str[start:end])
00211       start = end
00212       end += length
00213       if python3:
00214         self.msg = str[start:end].decode('utf-8')
00215       else:
00216         self.msg = str[start:end]
00217       return self
00218     except struct.error as e:
00219       raise genpy.DeserializationError(e) #most likely buffer underfill
00220 
00221 
00222   def serialize_numpy(self, buff, numpy):
00223     """
00224     serialize message with numpy array types into buffer
00225     :param buff: buffer, ``StringIO``
00226     :param numpy: numpy python module
00227     """
00228     try:
00229       buff.write(_struct_B.pack(self.completed))
00230       _x = self.msg
00231       length = len(_x)
00232       if python3 or type(_x) == unicode:
00233         _x = _x.encode('utf-8')
00234         length = len(_x)
00235       buff.write(struct.pack('<I%ss'%length, length, _x))
00236     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00237     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00238 
00239   def deserialize_numpy(self, str, numpy):
00240     """
00241     unpack serialized message in str into this message instance using numpy for array types
00242     :param str: byte array of serialized message, ``str``
00243     :param numpy: numpy python module
00244     """
00245     try:
00246       end = 0
00247       start = end
00248       end += 1
00249       (self.completed,) = _struct_B.unpack(str[start:end])
00250       self.completed = bool(self.completed)
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.msg = str[start:end].decode('utf-8')
00258       else:
00259         self.msg = str[start:end]
00260       return self
00261     except struct.error as e:
00262       raise genpy.DeserializationError(e) #most likely buffer underfill
00263 
00264 _struct_I = genpy.struct_I
00265 _struct_B = struct.Struct("<B")
00266 class ArmNavMovePalmLinkRel(object):
00267   _type          = 'srs_assisted_arm_navigation_msgs/ArmNavMovePalmLinkRel'
00268   _md5sum = '42e1f7fe26283c48c822d04ed149dd7e'
00269   _request_class  = ArmNavMovePalmLinkRelRequest
00270   _response_class = ArmNavMovePalmLinkRelResponse


srs_assisted_arm_navigation_msgs
Author(s): Zdenek Materna
autogenerated on Mon Oct 6 2014 08:09:35