_WorkspaceCheckSrv.py
Go to the documentation of this file.
00001 """autogenerated by genpy from coverage_3d_tools/WorkspaceCheckSrvRequest.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 std_msgs.msg
00009 
00010 class WorkspaceCheckSrvRequest(genpy.Message):
00011   _md5sum = "462af741544666c81200e93f6bed6fde"
00012   _type = "coverage_3d_tools/WorkspaceCheckSrvRequest"
00013   _has_header = False #flag to mark the presence of a Header object
00014   _full_text = """geometry_msgs/PoseStamped robot_pose
00015 string arm
00016 geometry_msgs/PoseArray poses
00017 
00018 ================================================================================
00019 MSG: geometry_msgs/PoseStamped
00020 # A Pose with reference coordinate frame and timestamp
00021 Header header
00022 Pose pose
00023 
00024 ================================================================================
00025 MSG: std_msgs/Header
00026 # Standard metadata for higher-level stamped data types.
00027 # This is generally used to communicate timestamped data 
00028 # in a particular coordinate frame.
00029 # 
00030 # sequence ID: consecutively increasing ID 
00031 uint32 seq
00032 #Two-integer timestamp that is expressed as:
00033 # * stamp.secs: seconds (stamp_secs) since epoch
00034 # * stamp.nsecs: nanoseconds since stamp_secs
00035 # time-handling sugar is provided by the client library
00036 time stamp
00037 #Frame this data is associated with
00038 # 0: no frame
00039 # 1: global frame
00040 string frame_id
00041 
00042 ================================================================================
00043 MSG: geometry_msgs/Pose
00044 # A representation of pose in free space, composed of postion and orientation. 
00045 Point position
00046 Quaternion orientation
00047 
00048 ================================================================================
00049 MSG: geometry_msgs/Point
00050 # This contains the position of a point in free space
00051 float64 x
00052 float64 y
00053 float64 z
00054 
00055 ================================================================================
00056 MSG: geometry_msgs/Quaternion
00057 # This represents an orientation in free space in quaternion form.
00058 
00059 float64 x
00060 float64 y
00061 float64 z
00062 float64 w
00063 
00064 ================================================================================
00065 MSG: geometry_msgs/PoseArray
00066 # An array of poses with a header for global reference.
00067 
00068 Header header
00069 
00070 Pose[] poses
00071 
00072 """
00073   __slots__ = ['robot_pose','arm','poses']
00074   _slot_types = ['geometry_msgs/PoseStamped','string','geometry_msgs/PoseArray']
00075 
00076   def __init__(self, *args, **kwds):
00077     """
00078     Constructor. Any message fields that are implicitly/explicitly
00079     set to None will be assigned a default value. The recommend
00080     use is keyword arguments as this is more robust to future message
00081     changes.  You cannot mix in-order arguments and keyword arguments.
00082 
00083     The available fields are:
00084        robot_pose,arm,poses
00085 
00086     :param args: complete set of field values, in .msg order
00087     :param kwds: use keyword arguments corresponding to message field names
00088     to set specific fields.
00089     """
00090     if args or kwds:
00091       super(WorkspaceCheckSrvRequest, self).__init__(*args, **kwds)
00092       #message fields cannot be None, assign default values for those that are
00093       if self.robot_pose is None:
00094         self.robot_pose = geometry_msgs.msg.PoseStamped()
00095       if self.arm is None:
00096         self.arm = ''
00097       if self.poses is None:
00098         self.poses = geometry_msgs.msg.PoseArray()
00099     else:
00100       self.robot_pose = geometry_msgs.msg.PoseStamped()
00101       self.arm = ''
00102       self.poses = geometry_msgs.msg.PoseArray()
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.robot_pose.header.seq, _x.robot_pose.header.stamp.secs, _x.robot_pose.header.stamp.nsecs))
00118       _x = self.robot_pose.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       _x = self
00125       buff.write(_struct_7d.pack(_x.robot_pose.pose.position.x, _x.robot_pose.pose.position.y, _x.robot_pose.pose.position.z, _x.robot_pose.pose.orientation.x, _x.robot_pose.pose.orientation.y, _x.robot_pose.pose.orientation.z, _x.robot_pose.pose.orientation.w))
00126       _x = self.arm
00127       length = len(_x)
00128       if python3 or type(_x) == unicode:
00129         _x = _x.encode('utf-8')
00130         length = len(_x)
00131       buff.write(struct.pack('<I%ss'%length, length, _x))
00132       _x = self
00133       buff.write(_struct_3I.pack(_x.poses.header.seq, _x.poses.header.stamp.secs, _x.poses.header.stamp.nsecs))
00134       _x = self.poses.header.frame_id
00135       length = len(_x)
00136       if python3 or type(_x) == unicode:
00137         _x = _x.encode('utf-8')
00138         length = len(_x)
00139       buff.write(struct.pack('<I%ss'%length, length, _x))
00140       length = len(self.poses.poses)
00141       buff.write(_struct_I.pack(length))
00142       for val1 in self.poses.poses:
00143         _v1 = val1.position
00144         _x = _v1
00145         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00146         _v2 = val1.orientation
00147         _x = _v2
00148         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00149     except struct.error as se: self._check_types(se)
00150     except TypeError as te: self._check_types(te)
00151 
00152   def deserialize(self, str):
00153     """
00154     unpack serialized message in str into this message instance
00155     :param str: byte array of serialized message, ``str``
00156     """
00157     try:
00158       if self.robot_pose is None:
00159         self.robot_pose = geometry_msgs.msg.PoseStamped()
00160       if self.poses is None:
00161         self.poses = geometry_msgs.msg.PoseArray()
00162       end = 0
00163       _x = self
00164       start = end
00165       end += 12
00166       (_x.robot_pose.header.seq, _x.robot_pose.header.stamp.secs, _x.robot_pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00167       start = end
00168       end += 4
00169       (length,) = _struct_I.unpack(str[start:end])
00170       start = end
00171       end += length
00172       if python3:
00173         self.robot_pose.header.frame_id = str[start:end].decode('utf-8')
00174       else:
00175         self.robot_pose.header.frame_id = str[start:end]
00176       _x = self
00177       start = end
00178       end += 56
00179       (_x.robot_pose.pose.position.x, _x.robot_pose.pose.position.y, _x.robot_pose.pose.position.z, _x.robot_pose.pose.orientation.x, _x.robot_pose.pose.orientation.y, _x.robot_pose.pose.orientation.z, _x.robot_pose.pose.orientation.w,) = _struct_7d.unpack(str[start:end])
00180       start = end
00181       end += 4
00182       (length,) = _struct_I.unpack(str[start:end])
00183       start = end
00184       end += length
00185       if python3:
00186         self.arm = str[start:end].decode('utf-8')
00187       else:
00188         self.arm = str[start:end]
00189       _x = self
00190       start = end
00191       end += 12
00192       (_x.poses.header.seq, _x.poses.header.stamp.secs, _x.poses.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00193       start = end
00194       end += 4
00195       (length,) = _struct_I.unpack(str[start:end])
00196       start = end
00197       end += length
00198       if python3:
00199         self.poses.header.frame_id = str[start:end].decode('utf-8')
00200       else:
00201         self.poses.header.frame_id = str[start:end]
00202       start = end
00203       end += 4
00204       (length,) = _struct_I.unpack(str[start:end])
00205       self.poses.poses = []
00206       for i in range(0, length):
00207         val1 = geometry_msgs.msg.Pose()
00208         _v3 = val1.position
00209         _x = _v3
00210         start = end
00211         end += 24
00212         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00213         _v4 = val1.orientation
00214         _x = _v4
00215         start = end
00216         end += 32
00217         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00218         self.poses.poses.append(val1)
00219       return self
00220     except struct.error as e:
00221       raise genpy.DeserializationError(e) #most likely buffer underfill
00222 
00223 
00224   def serialize_numpy(self, buff, numpy):
00225     """
00226     serialize message with numpy array types into buffer
00227     :param buff: buffer, ``StringIO``
00228     :param numpy: numpy python module
00229     """
00230     try:
00231       _x = self
00232       buff.write(_struct_3I.pack(_x.robot_pose.header.seq, _x.robot_pose.header.stamp.secs, _x.robot_pose.header.stamp.nsecs))
00233       _x = self.robot_pose.header.frame_id
00234       length = len(_x)
00235       if python3 or type(_x) == unicode:
00236         _x = _x.encode('utf-8')
00237         length = len(_x)
00238       buff.write(struct.pack('<I%ss'%length, length, _x))
00239       _x = self
00240       buff.write(_struct_7d.pack(_x.robot_pose.pose.position.x, _x.robot_pose.pose.position.y, _x.robot_pose.pose.position.z, _x.robot_pose.pose.orientation.x, _x.robot_pose.pose.orientation.y, _x.robot_pose.pose.orientation.z, _x.robot_pose.pose.orientation.w))
00241       _x = self.arm
00242       length = len(_x)
00243       if python3 or type(_x) == unicode:
00244         _x = _x.encode('utf-8')
00245         length = len(_x)
00246       buff.write(struct.pack('<I%ss'%length, length, _x))
00247       _x = self
00248       buff.write(_struct_3I.pack(_x.poses.header.seq, _x.poses.header.stamp.secs, _x.poses.header.stamp.nsecs))
00249       _x = self.poses.header.frame_id
00250       length = len(_x)
00251       if python3 or type(_x) == unicode:
00252         _x = _x.encode('utf-8')
00253         length = len(_x)
00254       buff.write(struct.pack('<I%ss'%length, length, _x))
00255       length = len(self.poses.poses)
00256       buff.write(_struct_I.pack(length))
00257       for val1 in self.poses.poses:
00258         _v5 = val1.position
00259         _x = _v5
00260         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00261         _v6 = val1.orientation
00262         _x = _v6
00263         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00264     except struct.error as se: self._check_types(se)
00265     except TypeError as te: self._check_types(te)
00266 
00267   def deserialize_numpy(self, str, numpy):
00268     """
00269     unpack serialized message in str into this message instance using numpy for array types
00270     :param str: byte array of serialized message, ``str``
00271     :param numpy: numpy python module
00272     """
00273     try:
00274       if self.robot_pose is None:
00275         self.robot_pose = geometry_msgs.msg.PoseStamped()
00276       if self.poses is None:
00277         self.poses = geometry_msgs.msg.PoseArray()
00278       end = 0
00279       _x = self
00280       start = end
00281       end += 12
00282       (_x.robot_pose.header.seq, _x.robot_pose.header.stamp.secs, _x.robot_pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00283       start = end
00284       end += 4
00285       (length,) = _struct_I.unpack(str[start:end])
00286       start = end
00287       end += length
00288       if python3:
00289         self.robot_pose.header.frame_id = str[start:end].decode('utf-8')
00290       else:
00291         self.robot_pose.header.frame_id = str[start:end]
00292       _x = self
00293       start = end
00294       end += 56
00295       (_x.robot_pose.pose.position.x, _x.robot_pose.pose.position.y, _x.robot_pose.pose.position.z, _x.robot_pose.pose.orientation.x, _x.robot_pose.pose.orientation.y, _x.robot_pose.pose.orientation.z, _x.robot_pose.pose.orientation.w,) = _struct_7d.unpack(str[start:end])
00296       start = end
00297       end += 4
00298       (length,) = _struct_I.unpack(str[start:end])
00299       start = end
00300       end += length
00301       if python3:
00302         self.arm = str[start:end].decode('utf-8')
00303       else:
00304         self.arm = str[start:end]
00305       _x = self
00306       start = end
00307       end += 12
00308       (_x.poses.header.seq, _x.poses.header.stamp.secs, _x.poses.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00309       start = end
00310       end += 4
00311       (length,) = _struct_I.unpack(str[start:end])
00312       start = end
00313       end += length
00314       if python3:
00315         self.poses.header.frame_id = str[start:end].decode('utf-8')
00316       else:
00317         self.poses.header.frame_id = str[start:end]
00318       start = end
00319       end += 4
00320       (length,) = _struct_I.unpack(str[start:end])
00321       self.poses.poses = []
00322       for i in range(0, length):
00323         val1 = geometry_msgs.msg.Pose()
00324         _v7 = val1.position
00325         _x = _v7
00326         start = end
00327         end += 24
00328         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00329         _v8 = val1.orientation
00330         _x = _v8
00331         start = end
00332         end += 32
00333         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00334         self.poses.poses.append(val1)
00335       return self
00336     except struct.error as e:
00337       raise genpy.DeserializationError(e) #most likely buffer underfill
00338 
00339 _struct_I = genpy.struct_I
00340 _struct_3I = struct.Struct("<3I")
00341 _struct_7d = struct.Struct("<7d")
00342 _struct_4d = struct.Struct("<4d")
00343 _struct_3d = struct.Struct("<3d")
00344 """autogenerated by genpy from coverage_3d_tools/WorkspaceCheckSrvResponse.msg. Do not edit."""
00345 import sys
00346 python3 = True if sys.hexversion > 0x03000000 else False
00347 import genpy
00348 import struct
00349 
00350 
00351 class WorkspaceCheckSrvResponse(genpy.Message):
00352   _md5sum = "84e7fefbe4b18df1d3f5ac2d256c9978"
00353   _type = "coverage_3d_tools/WorkspaceCheckSrvResponse"
00354   _has_header = False #flag to mark the presence of a Header object
00355   _full_text = """uint32[] reachable
00356 
00357 
00358 """
00359   __slots__ = ['reachable']
00360   _slot_types = ['uint32[]']
00361 
00362   def __init__(self, *args, **kwds):
00363     """
00364     Constructor. Any message fields that are implicitly/explicitly
00365     set to None will be assigned a default value. The recommend
00366     use is keyword arguments as this is more robust to future message
00367     changes.  You cannot mix in-order arguments and keyword arguments.
00368 
00369     The available fields are:
00370        reachable
00371 
00372     :param args: complete set of field values, in .msg order
00373     :param kwds: use keyword arguments corresponding to message field names
00374     to set specific fields.
00375     """
00376     if args or kwds:
00377       super(WorkspaceCheckSrvResponse, self).__init__(*args, **kwds)
00378       #message fields cannot be None, assign default values for those that are
00379       if self.reachable is None:
00380         self.reachable = []
00381     else:
00382       self.reachable = []
00383 
00384   def _get_types(self):
00385     """
00386     internal API method
00387     """
00388     return self._slot_types
00389 
00390   def serialize(self, buff):
00391     """
00392     serialize message into buffer
00393     :param buff: buffer, ``StringIO``
00394     """
00395     try:
00396       length = len(self.reachable)
00397       buff.write(_struct_I.pack(length))
00398       pattern = '<%sI'%length
00399       buff.write(struct.pack(pattern, *self.reachable))
00400     except struct.error as se: self._check_types(se)
00401     except TypeError as te: self._check_types(te)
00402 
00403   def deserialize(self, str):
00404     """
00405     unpack serialized message in str into this message instance
00406     :param str: byte array of serialized message, ``str``
00407     """
00408     try:
00409       end = 0
00410       start = end
00411       end += 4
00412       (length,) = _struct_I.unpack(str[start:end])
00413       pattern = '<%sI'%length
00414       start = end
00415       end += struct.calcsize(pattern)
00416       self.reachable = struct.unpack(pattern, str[start:end])
00417       return self
00418     except struct.error as e:
00419       raise genpy.DeserializationError(e) #most likely buffer underfill
00420 
00421 
00422   def serialize_numpy(self, buff, numpy):
00423     """
00424     serialize message with numpy array types into buffer
00425     :param buff: buffer, ``StringIO``
00426     :param numpy: numpy python module
00427     """
00428     try:
00429       length = len(self.reachable)
00430       buff.write(_struct_I.pack(length))
00431       pattern = '<%sI'%length
00432       buff.write(self.reachable.tostring())
00433     except struct.error as se: self._check_types(se)
00434     except TypeError as te: self._check_types(te)
00435 
00436   def deserialize_numpy(self, str, numpy):
00437     """
00438     unpack serialized message in str into this message instance using numpy for array types
00439     :param str: byte array of serialized message, ``str``
00440     :param numpy: numpy python module
00441     """
00442     try:
00443       end = 0
00444       start = end
00445       end += 4
00446       (length,) = _struct_I.unpack(str[start:end])
00447       pattern = '<%sI'%length
00448       start = end
00449       end += struct.calcsize(pattern)
00450       self.reachable = numpy.frombuffer(str[start:end], dtype=numpy.uint32, count=length)
00451       return self
00452     except struct.error as e:
00453       raise genpy.DeserializationError(e) #most likely buffer underfill
00454 
00455 _struct_I = genpy.struct_I
00456 class WorkspaceCheckSrv(object):
00457   _type          = 'coverage_3d_tools/WorkspaceCheckSrv'
00458   _md5sum = '198e813015e726b896ab91ef015a079a'
00459   _request_class  = WorkspaceCheckSrvRequest
00460   _response_class = WorkspaceCheckSrvResponse
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends


coverage_3d_tools
Author(s): Juergen Hess
autogenerated on Wed Dec 26 2012 15:25:37