_MoveArm.py
Go to the documentation of this file.
00001 """autogenerated by genpy from corobot_srvs/MoveArmRequest.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 MoveArmRequest(genpy.Message):
00009   _md5sum = "129ba62374704bb8be45a6700f90308f"
00010   _type = "corobot_srvs/MoveArmRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """
00013 
00014 uint8 GRIPPER_OPEN = 0
00015 uint8 GRIPPER_CLOSED = 1
00016 
00017 
00018 uint8 gripper
00019 
00020 
00021 float32 shoulderOrientation
00022 
00023 
00024 float32 elbowOrientation
00025 
00026 
00027 float32 wristOrientation
00028 
00029 """
00030   # Pseudo-constants
00031   GRIPPER_OPEN = 0
00032   GRIPPER_CLOSED = 1
00033 
00034   __slots__ = ['gripper','shoulderOrientation','elbowOrientation','wristOrientation']
00035   _slot_types = ['uint8','float32','float32','float32']
00036 
00037   def __init__(self, *args, **kwds):
00038     """
00039     Constructor. Any message fields that are implicitly/explicitly
00040     set to None will be assigned a default value. The recommend
00041     use is keyword arguments as this is more robust to future message
00042     changes.  You cannot mix in-order arguments and keyword arguments.
00043 
00044     The available fields are:
00045        gripper,shoulderOrientation,elbowOrientation,wristOrientation
00046 
00047     :param args: complete set of field values, in .msg order
00048     :param kwds: use keyword arguments corresponding to message field names
00049     to set specific fields.
00050     """
00051     if args or kwds:
00052       super(MoveArmRequest, self).__init__(*args, **kwds)
00053       #message fields cannot be None, assign default values for those that are
00054       if self.gripper is None:
00055         self.gripper = 0
00056       if self.shoulderOrientation is None:
00057         self.shoulderOrientation = 0.
00058       if self.elbowOrientation is None:
00059         self.elbowOrientation = 0.
00060       if self.wristOrientation is None:
00061         self.wristOrientation = 0.
00062     else:
00063       self.gripper = 0
00064       self.shoulderOrientation = 0.
00065       self.elbowOrientation = 0.
00066       self.wristOrientation = 0.
00067 
00068   def _get_types(self):
00069     """
00070     internal API method
00071     """
00072     return self._slot_types
00073 
00074   def serialize(self, buff):
00075     """
00076     serialize message into buffer
00077     :param buff: buffer, ``StringIO``
00078     """
00079     try:
00080       _x = self
00081       buff.write(_struct_B3f.pack(_x.gripper, _x.shoulderOrientation, _x.elbowOrientation, _x.wristOrientation))
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       _x = self
00093       start = end
00094       end += 13
00095       (_x.gripper, _x.shoulderOrientation, _x.elbowOrientation, _x.wristOrientation,) = _struct_B3f.unpack(str[start:end])
00096       return self
00097     except struct.error as e:
00098       raise genpy.DeserializationError(e) #most likely buffer underfill
00099 
00100 
00101   def serialize_numpy(self, buff, numpy):
00102     """
00103     serialize message with numpy array types into buffer
00104     :param buff: buffer, ``StringIO``
00105     :param numpy: numpy python module
00106     """
00107     try:
00108       _x = self
00109       buff.write(_struct_B3f.pack(_x.gripper, _x.shoulderOrientation, _x.elbowOrientation, _x.wristOrientation))
00110     except struct.error as se: self._check_types(se)
00111     except TypeError as te: self._check_types(te)
00112 
00113   def deserialize_numpy(self, str, numpy):
00114     """
00115     unpack serialized message in str into this message instance using numpy for array types
00116     :param str: byte array of serialized message, ``str``
00117     :param numpy: numpy python module
00118     """
00119     try:
00120       end = 0
00121       _x = self
00122       start = end
00123       end += 13
00124       (_x.gripper, _x.shoulderOrientation, _x.elbowOrientation, _x.wristOrientation,) = _struct_B3f.unpack(str[start:end])
00125       return self
00126     except struct.error as e:
00127       raise genpy.DeserializationError(e) #most likely buffer underfill
00128 
00129 _struct_I = genpy.struct_I
00130 _struct_B3f = struct.Struct("<B3f")
00131 """autogenerated by genpy from corobot_srvs/MoveArmResponse.msg. Do not edit."""
00132 import sys
00133 python3 = True if sys.hexversion > 0x03000000 else False
00134 import genpy
00135 import struct
00136 
00137 
00138 class MoveArmResponse(genpy.Message):
00139   _md5sum = "3cd2452a26f7d8a04682f2fead8013cf"
00140   _type = "corobot_srvs/MoveArmResponse"
00141   _has_header = False #flag to mark the presence of a Header object
00142   _full_text = """int8 err
00143 
00144 
00145 """
00146   __slots__ = ['err']
00147   _slot_types = ['int8']
00148 
00149   def __init__(self, *args, **kwds):
00150     """
00151     Constructor. Any message fields that are implicitly/explicitly
00152     set to None will be assigned a default value. The recommend
00153     use is keyword arguments as this is more robust to future message
00154     changes.  You cannot mix in-order arguments and keyword arguments.
00155 
00156     The available fields are:
00157        err
00158 
00159     :param args: complete set of field values, in .msg order
00160     :param kwds: use keyword arguments corresponding to message field names
00161     to set specific fields.
00162     """
00163     if args or kwds:
00164       super(MoveArmResponse, self).__init__(*args, **kwds)
00165       #message fields cannot be None, assign default values for those that are
00166       if self.err is None:
00167         self.err = 0
00168     else:
00169       self.err = 0
00170 
00171   def _get_types(self):
00172     """
00173     internal API method
00174     """
00175     return self._slot_types
00176 
00177   def serialize(self, buff):
00178     """
00179     serialize message into buffer
00180     :param buff: buffer, ``StringIO``
00181     """
00182     try:
00183       buff.write(_struct_b.pack(self.err))
00184     except struct.error as se: self._check_types(se)
00185     except TypeError as te: self._check_types(te)
00186 
00187   def deserialize(self, str):
00188     """
00189     unpack serialized message in str into this message instance
00190     :param str: byte array of serialized message, ``str``
00191     """
00192     try:
00193       end = 0
00194       start = end
00195       end += 1
00196       (self.err,) = _struct_b.unpack(str[start:end])
00197       return self
00198     except struct.error as e:
00199       raise genpy.DeserializationError(e) #most likely buffer underfill
00200 
00201 
00202   def serialize_numpy(self, buff, numpy):
00203     """
00204     serialize message with numpy array types into buffer
00205     :param buff: buffer, ``StringIO``
00206     :param numpy: numpy python module
00207     """
00208     try:
00209       buff.write(_struct_b.pack(self.err))
00210     except struct.error as se: self._check_types(se)
00211     except TypeError as te: self._check_types(te)
00212 
00213   def deserialize_numpy(self, str, numpy):
00214     """
00215     unpack serialized message in str into this message instance using numpy for array types
00216     :param str: byte array of serialized message, ``str``
00217     :param numpy: numpy python module
00218     """
00219     try:
00220       end = 0
00221       start = end
00222       end += 1
00223       (self.err,) = _struct_b.unpack(str[start:end])
00224       return self
00225     except struct.error as e:
00226       raise genpy.DeserializationError(e) #most likely buffer underfill
00227 
00228 _struct_I = genpy.struct_I
00229 _struct_b = struct.Struct("<b")
00230 class MoveArm(object):
00231   _type          = 'corobot_srvs/MoveArm'
00232   _md5sum = 'a1be394c2aee43a6bffa73f110d3b5de'
00233   _request_class  = MoveArmRequest
00234   _response_class = MoveArmResponse


corobot_srvs
Author(s): Morgan Cormier/mcormier@coroware.com
autogenerated on Tue Jan 7 2014 11:38:11