_GetTrajectoryValidity.py
Go to the documentation of this file.
00001 """autogenerated by genpy from simple_arm_server/GetTrajectoryValidityRequest.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 simple_arm_server.msg
00009 import genpy
00010 import std_msgs.msg
00011 
00012 class GetTrajectoryValidityRequest(genpy.Message):
00013   _md5sum = "ac68653317d50968c1043cdf98e3aea9"
00014   _type = "simple_arm_server/GetTrajectoryValidityRequest"
00015   _has_header = True #flag to mark the presence of a Header object
00016   _full_text = """std_msgs/Header header
00017 ArmAction[] motions
00018 
00019 ================================================================================
00020 MSG: std_msgs/Header
00021 # Standard metadata for higher-level stamped data types.
00022 # This is generally used to communicate timestamped data 
00023 # in a particular coordinate frame.
00024 # 
00025 # sequence ID: consecutively increasing ID 
00026 uint32 seq
00027 #Two-integer timestamp that is expressed as:
00028 # * stamp.secs: seconds (stamp_secs) since epoch
00029 # * stamp.nsecs: nanoseconds since stamp_secs
00030 # time-handling sugar is provided by the client library
00031 time stamp
00032 #Frame this data is associated with
00033 # 0: no frame
00034 # 1: global frame
00035 string frame_id
00036 
00037 ================================================================================
00038 MSG: simple_arm_server/ArmAction
00039 #
00040 # Move arm or adjust gripper
00041 #
00042 
00043 byte MOVE_ARM=0
00044 byte MOVE_GRIPPER=1
00045 
00046 byte type                   # move the arm or the gripper?
00047 
00048 geometry_msgs/Pose goal     # goal for arm
00049 float64 command    # width to open gripper
00050 
00051 duration move_time
00052 
00053 ================================================================================
00054 MSG: geometry_msgs/Pose
00055 # A representation of pose in free space, composed of postion and orientation. 
00056 Point position
00057 Quaternion orientation
00058 
00059 ================================================================================
00060 MSG: geometry_msgs/Point
00061 # This contains the position of a point in free space
00062 float64 x
00063 float64 y
00064 float64 z
00065 
00066 ================================================================================
00067 MSG: geometry_msgs/Quaternion
00068 # This represents an orientation in free space in quaternion form.
00069 
00070 float64 x
00071 float64 y
00072 float64 z
00073 float64 w
00074 
00075 """
00076   __slots__ = ['header','motions']
00077   _slot_types = ['std_msgs/Header','simple_arm_server/ArmAction[]']
00078 
00079   def __init__(self, *args, **kwds):
00080     """
00081     Constructor. Any message fields that are implicitly/explicitly
00082     set to None will be assigned a default value. The recommend
00083     use is keyword arguments as this is more robust to future message
00084     changes.  You cannot mix in-order arguments and keyword arguments.
00085 
00086     The available fields are:
00087        header,motions
00088 
00089     :param args: complete set of field values, in .msg order
00090     :param kwds: use keyword arguments corresponding to message field names
00091     to set specific fields.
00092     """
00093     if args or kwds:
00094       super(GetTrajectoryValidityRequest, self).__init__(*args, **kwds)
00095       #message fields cannot be None, assign default values for those that are
00096       if self.header is None:
00097         self.header = std_msgs.msg.Header()
00098       if self.motions is None:
00099         self.motions = []
00100     else:
00101       self.header = std_msgs.msg.Header()
00102       self.motions = []
00103 
00104   def _get_types(self):
00105     """
00106     internal API method
00107     """
00108     return self._slot_types
00109 
00110   def serialize(self, buff):
00111     """
00112     serialize message into buffer
00113     :param buff: buffer, ``StringIO``
00114     """
00115     try:
00116       _x = self
00117       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00118       _x = self.header.frame_id
00119       length = len(_x)
00120       if python3 or type(_x) == unicode:
00121         _x = _x.encode('utf-8')
00122         length = len(_x)
00123       buff.write(struct.pack('<I%ss'%length, length, _x))
00124       length = len(self.motions)
00125       buff.write(_struct_I.pack(length))
00126       for val1 in self.motions:
00127         buff.write(_struct_b.pack(val1.type))
00128         _v1 = val1.goal
00129         _v2 = _v1.position
00130         _x = _v2
00131         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00132         _v3 = _v1.orientation
00133         _x = _v3
00134         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00135         buff.write(_struct_d.pack(val1.command))
00136         _v4 = val1.move_time
00137         _x = _v4
00138         buff.write(_struct_2i.pack(_x.secs, _x.nsecs))
00139     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00140     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00141 
00142   def deserialize(self, str):
00143     """
00144     unpack serialized message in str into this message instance
00145     :param str: byte array of serialized message, ``str``
00146     """
00147     try:
00148       if self.header is None:
00149         self.header = std_msgs.msg.Header()
00150       if self.motions is None:
00151         self.motions = None
00152       end = 0
00153       _x = self
00154       start = end
00155       end += 12
00156       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00157       start = end
00158       end += 4
00159       (length,) = _struct_I.unpack(str[start:end])
00160       start = end
00161       end += length
00162       if python3:
00163         self.header.frame_id = str[start:end].decode('utf-8')
00164       else:
00165         self.header.frame_id = str[start:end]
00166       start = end
00167       end += 4
00168       (length,) = _struct_I.unpack(str[start:end])
00169       self.motions = []
00170       for i in range(0, length):
00171         val1 = simple_arm_server.msg.ArmAction()
00172         start = end
00173         end += 1
00174         (val1.type,) = _struct_b.unpack(str[start:end])
00175         _v5 = val1.goal
00176         _v6 = _v5.position
00177         _x = _v6
00178         start = end
00179         end += 24
00180         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00181         _v7 = _v5.orientation
00182         _x = _v7
00183         start = end
00184         end += 32
00185         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00186         start = end
00187         end += 8
00188         (val1.command,) = _struct_d.unpack(str[start:end])
00189         _v8 = val1.move_time
00190         _x = _v8
00191         start = end
00192         end += 8
00193         (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end])
00194         self.motions.append(val1)
00195       return self
00196     except struct.error as e:
00197       raise genpy.DeserializationError(e) #most likely buffer underfill
00198 
00199 
00200   def serialize_numpy(self, buff, numpy):
00201     """
00202     serialize message with numpy array types into buffer
00203     :param buff: buffer, ``StringIO``
00204     :param numpy: numpy python module
00205     """
00206     try:
00207       _x = self
00208       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00209       _x = self.header.frame_id
00210       length = len(_x)
00211       if python3 or type(_x) == unicode:
00212         _x = _x.encode('utf-8')
00213         length = len(_x)
00214       buff.write(struct.pack('<I%ss'%length, length, _x))
00215       length = len(self.motions)
00216       buff.write(_struct_I.pack(length))
00217       for val1 in self.motions:
00218         buff.write(_struct_b.pack(val1.type))
00219         _v9 = val1.goal
00220         _v10 = _v9.position
00221         _x = _v10
00222         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00223         _v11 = _v9.orientation
00224         _x = _v11
00225         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00226         buff.write(_struct_d.pack(val1.command))
00227         _v12 = val1.move_time
00228         _x = _v12
00229         buff.write(_struct_2i.pack(_x.secs, _x.nsecs))
00230     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00231     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00232 
00233   def deserialize_numpy(self, str, numpy):
00234     """
00235     unpack serialized message in str into this message instance using numpy for array types
00236     :param str: byte array of serialized message, ``str``
00237     :param numpy: numpy python module
00238     """
00239     try:
00240       if self.header is None:
00241         self.header = std_msgs.msg.Header()
00242       if self.motions is None:
00243         self.motions = None
00244       end = 0
00245       _x = self
00246       start = end
00247       end += 12
00248       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00249       start = end
00250       end += 4
00251       (length,) = _struct_I.unpack(str[start:end])
00252       start = end
00253       end += length
00254       if python3:
00255         self.header.frame_id = str[start:end].decode('utf-8')
00256       else:
00257         self.header.frame_id = str[start:end]
00258       start = end
00259       end += 4
00260       (length,) = _struct_I.unpack(str[start:end])
00261       self.motions = []
00262       for i in range(0, length):
00263         val1 = simple_arm_server.msg.ArmAction()
00264         start = end
00265         end += 1
00266         (val1.type,) = _struct_b.unpack(str[start:end])
00267         _v13 = val1.goal
00268         _v14 = _v13.position
00269         _x = _v14
00270         start = end
00271         end += 24
00272         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00273         _v15 = _v13.orientation
00274         _x = _v15
00275         start = end
00276         end += 32
00277         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00278         start = end
00279         end += 8
00280         (val1.command,) = _struct_d.unpack(str[start:end])
00281         _v16 = val1.move_time
00282         _x = _v16
00283         start = end
00284         end += 8
00285         (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end])
00286         self.motions.append(val1)
00287       return self
00288     except struct.error as e:
00289       raise genpy.DeserializationError(e) #most likely buffer underfill
00290 
00291 _struct_I = genpy.struct_I
00292 _struct_b = struct.Struct("<b")
00293 _struct_d = struct.Struct("<d")
00294 _struct_3I = struct.Struct("<3I")
00295 _struct_4d = struct.Struct("<4d")
00296 _struct_2i = struct.Struct("<2i")
00297 _struct_3d = struct.Struct("<3d")
00298 """autogenerated by genpy from simple_arm_server/GetTrajectoryValidityResponse.msg. Do not edit."""
00299 import sys
00300 python3 = True if sys.hexversion > 0x03000000 else False
00301 import genpy
00302 import struct
00303 
00304 
00305 class GetTrajectoryValidityResponse(genpy.Message):
00306   _md5sum = "358e233cde0c8a8bcfea4ce193f8fc15"
00307   _type = "simple_arm_server/GetTrajectoryValidityResponse"
00308   _has_header = False #flag to mark the presence of a Header object
00309   _full_text = """bool success
00310 
00311 
00312 """
00313   __slots__ = ['success']
00314   _slot_types = ['bool']
00315 
00316   def __init__(self, *args, **kwds):
00317     """
00318     Constructor. Any message fields that are implicitly/explicitly
00319     set to None will be assigned a default value. The recommend
00320     use is keyword arguments as this is more robust to future message
00321     changes.  You cannot mix in-order arguments and keyword arguments.
00322 
00323     The available fields are:
00324        success
00325 
00326     :param args: complete set of field values, in .msg order
00327     :param kwds: use keyword arguments corresponding to message field names
00328     to set specific fields.
00329     """
00330     if args or kwds:
00331       super(GetTrajectoryValidityResponse, self).__init__(*args, **kwds)
00332       #message fields cannot be None, assign default values for those that are
00333       if self.success is None:
00334         self.success = False
00335     else:
00336       self.success = False
00337 
00338   def _get_types(self):
00339     """
00340     internal API method
00341     """
00342     return self._slot_types
00343 
00344   def serialize(self, buff):
00345     """
00346     serialize message into buffer
00347     :param buff: buffer, ``StringIO``
00348     """
00349     try:
00350       buff.write(_struct_B.pack(self.success))
00351     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00352     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00353 
00354   def deserialize(self, str):
00355     """
00356     unpack serialized message in str into this message instance
00357     :param str: byte array of serialized message, ``str``
00358     """
00359     try:
00360       end = 0
00361       start = end
00362       end += 1
00363       (self.success,) = _struct_B.unpack(str[start:end])
00364       self.success = bool(self.success)
00365       return self
00366     except struct.error as e:
00367       raise genpy.DeserializationError(e) #most likely buffer underfill
00368 
00369 
00370   def serialize_numpy(self, buff, numpy):
00371     """
00372     serialize message with numpy array types into buffer
00373     :param buff: buffer, ``StringIO``
00374     :param numpy: numpy python module
00375     """
00376     try:
00377       buff.write(_struct_B.pack(self.success))
00378     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00379     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00380 
00381   def deserialize_numpy(self, str, numpy):
00382     """
00383     unpack serialized message in str into this message instance using numpy for array types
00384     :param str: byte array of serialized message, ``str``
00385     :param numpy: numpy python module
00386     """
00387     try:
00388       end = 0
00389       start = end
00390       end += 1
00391       (self.success,) = _struct_B.unpack(str[start:end])
00392       self.success = bool(self.success)
00393       return self
00394     except struct.error as e:
00395       raise genpy.DeserializationError(e) #most likely buffer underfill
00396 
00397 _struct_I = genpy.struct_I
00398 _struct_B = struct.Struct("<B")
00399 class GetTrajectoryValidity(object):
00400   _type          = 'simple_arm_server/GetTrajectoryValidity'
00401   _md5sum = '12941ae14efdf67a2accd5922da026b4'
00402   _request_class  = GetTrajectoryValidityRequest
00403   _response_class = GetTrajectoryValidityResponse


simple_arm_server
Author(s): Michael Ferguson
autogenerated on Mon Oct 6 2014 07:42:06