_CmdVelService.py
Go to the documentation of this file.
00001 """autogenerated by genpy from nao_msgs/CmdVelServiceRequest.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 CmdVelServiceRequest(genpy.Message):
00010   _md5sum = "a787b2802160dcc7fe02d089e10afe56"
00011   _type = "nao_msgs/CmdVelServiceRequest"
00012   _has_header = False #flag to mark the presence of a Header object
00013   _full_text = """
00014 geometry_msgs/Twist twist
00015 
00016 ================================================================================
00017 MSG: geometry_msgs/Twist
00018 # This expresses velocity in free space broken into it's linear and angular parts. 
00019 Vector3  linear
00020 Vector3  angular
00021 
00022 ================================================================================
00023 MSG: geometry_msgs/Vector3
00024 # This represents a vector in free space. 
00025 
00026 float64 x
00027 float64 y
00028 float64 z
00029 """
00030   __slots__ = ['twist']
00031   _slot_types = ['geometry_msgs/Twist']
00032 
00033   def __init__(self, *args, **kwds):
00034     """
00035     Constructor. Any message fields that are implicitly/explicitly
00036     set to None will be assigned a default value. The recommend
00037     use is keyword arguments as this is more robust to future message
00038     changes.  You cannot mix in-order arguments and keyword arguments.
00039 
00040     The available fields are:
00041        twist
00042 
00043     :param args: complete set of field values, in .msg order
00044     :param kwds: use keyword arguments corresponding to message field names
00045     to set specific fields.
00046     """
00047     if args or kwds:
00048       super(CmdVelServiceRequest, self).__init__(*args, **kwds)
00049       #message fields cannot be None, assign default values for those that are
00050       if self.twist is None:
00051         self.twist = geometry_msgs.msg.Twist()
00052     else:
00053       self.twist = geometry_msgs.msg.Twist()
00054 
00055   def _get_types(self):
00056     """
00057     internal API method
00058     """
00059     return self._slot_types
00060 
00061   def serialize(self, buff):
00062     """
00063     serialize message into buffer
00064     :param buff: buffer, ``StringIO``
00065     """
00066     try:
00067       _x = self
00068       buff.write(_struct_6d.pack(_x.twist.linear.x, _x.twist.linear.y, _x.twist.linear.z, _x.twist.angular.x, _x.twist.angular.y, _x.twist.angular.z))
00069     except struct.error as se: self._check_types(se)
00070     except TypeError as te: self._check_types(te)
00071 
00072   def deserialize(self, str):
00073     """
00074     unpack serialized message in str into this message instance
00075     :param str: byte array of serialized message, ``str``
00076     """
00077     try:
00078       if self.twist is None:
00079         self.twist = geometry_msgs.msg.Twist()
00080       end = 0
00081       _x = self
00082       start = end
00083       end += 48
00084       (_x.twist.linear.x, _x.twist.linear.y, _x.twist.linear.z, _x.twist.angular.x, _x.twist.angular.y, _x.twist.angular.z,) = _struct_6d.unpack(str[start:end])
00085       return self
00086     except struct.error as e:
00087       raise genpy.DeserializationError(e) #most likely buffer underfill
00088 
00089 
00090   def serialize_numpy(self, buff, numpy):
00091     """
00092     serialize message with numpy array types into buffer
00093     :param buff: buffer, ``StringIO``
00094     :param numpy: numpy python module
00095     """
00096     try:
00097       _x = self
00098       buff.write(_struct_6d.pack(_x.twist.linear.x, _x.twist.linear.y, _x.twist.linear.z, _x.twist.angular.x, _x.twist.angular.y, _x.twist.angular.z))
00099     except struct.error as se: self._check_types(se)
00100     except TypeError as te: self._check_types(te)
00101 
00102   def deserialize_numpy(self, str, numpy):
00103     """
00104     unpack serialized message in str into this message instance using numpy for array types
00105     :param str: byte array of serialized message, ``str``
00106     :param numpy: numpy python module
00107     """
00108     try:
00109       if self.twist is None:
00110         self.twist = geometry_msgs.msg.Twist()
00111       end = 0
00112       _x = self
00113       start = end
00114       end += 48
00115       (_x.twist.linear.x, _x.twist.linear.y, _x.twist.linear.z, _x.twist.angular.x, _x.twist.angular.y, _x.twist.angular.z,) = _struct_6d.unpack(str[start:end])
00116       return self
00117     except struct.error as e:
00118       raise genpy.DeserializationError(e) #most likely buffer underfill
00119 
00120 _struct_I = genpy.struct_I
00121 _struct_6d = struct.Struct("<6d")
00122 """autogenerated by genpy from nao_msgs/CmdVelServiceResponse.msg. Do not edit."""
00123 import sys
00124 python3 = True if sys.hexversion > 0x03000000 else False
00125 import genpy
00126 import struct
00127 
00128 
00129 class CmdVelServiceResponse(genpy.Message):
00130   _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
00131   _type = "nao_msgs/CmdVelServiceResponse"
00132   _has_header = False #flag to mark the presence of a Header object
00133   _full_text = """
00134 
00135 """
00136   __slots__ = []
00137   _slot_types = []
00138 
00139   def __init__(self, *args, **kwds):
00140     """
00141     Constructor. Any message fields that are implicitly/explicitly
00142     set to None will be assigned a default value. The recommend
00143     use is keyword arguments as this is more robust to future message
00144     changes.  You cannot mix in-order arguments and keyword arguments.
00145 
00146     The available fields are:
00147        
00148 
00149     :param args: complete set of field values, in .msg order
00150     :param kwds: use keyword arguments corresponding to message field names
00151     to set specific fields.
00152     """
00153     if args or kwds:
00154       super(CmdVelServiceResponse, self).__init__(*args, **kwds)
00155 
00156   def _get_types(self):
00157     """
00158     internal API method
00159     """
00160     return self._slot_types
00161 
00162   def serialize(self, buff):
00163     """
00164     serialize message into buffer
00165     :param buff: buffer, ``StringIO``
00166     """
00167     try:
00168       pass
00169     except struct.error as se: self._check_types(se)
00170     except TypeError as te: self._check_types(te)
00171 
00172   def deserialize(self, str):
00173     """
00174     unpack serialized message in str into this message instance
00175     :param str: byte array of serialized message, ``str``
00176     """
00177     try:
00178       end = 0
00179       return self
00180     except struct.error as e:
00181       raise genpy.DeserializationError(e) #most likely buffer underfill
00182 
00183 
00184   def serialize_numpy(self, buff, numpy):
00185     """
00186     serialize message with numpy array types into buffer
00187     :param buff: buffer, ``StringIO``
00188     :param numpy: numpy python module
00189     """
00190     try:
00191       pass
00192     except struct.error as se: self._check_types(se)
00193     except TypeError as te: self._check_types(te)
00194 
00195   def deserialize_numpy(self, str, numpy):
00196     """
00197     unpack serialized message in str into this message instance using numpy for array types
00198     :param str: byte array of serialized message, ``str``
00199     :param numpy: numpy python module
00200     """
00201     try:
00202       end = 0
00203       return self
00204     except struct.error as e:
00205       raise genpy.DeserializationError(e) #most likely buffer underfill
00206 
00207 _struct_I = genpy.struct_I
00208 class CmdVelService(object):
00209   _type          = 'nao_msgs/CmdVelService'
00210   _md5sum = 'a787b2802160dcc7fe02d089e10afe56'
00211   _request_class  = CmdVelServiceRequest
00212   _response_class = CmdVelServiceResponse
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends


nao_msgs
Author(s): Armin Hornung, Stefan Osswald, Daniel Maier
autogenerated on Tue Oct 15 2013 10:05:22