_RobotCartPath.py
Go to the documentation of this file.
00001 """autogenerated by genpy from cart_pushing_msgs/RobotCartPath.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 cart_pushing_msgs.msg
00009 import std_msgs.msg
00010 
00011 class RobotCartPath(genpy.Message):
00012   _md5sum = "ab8354991dcdaddeaed1d1d8e653e14c"
00013   _type = "cart_pushing_msgs/RobotCartPath"
00014   _has_header = True #flag to mark the presence of a Header object
00015   _full_text = """Header header
00016 RobotCartConfiguration[] path
00017 ================================================================================
00018 MSG: std_msgs/Header
00019 # Standard metadata for higher-level stamped data types.
00020 # This is generally used to communicate timestamped data 
00021 # in a particular coordinate frame.
00022 # 
00023 # sequence ID: consecutively increasing ID 
00024 uint32 seq
00025 #Two-integer timestamp that is expressed as:
00026 # * stamp.secs: seconds (stamp_secs) since epoch
00027 # * stamp.nsecs: nanoseconds since stamp_secs
00028 # time-handling sugar is provided by the client library
00029 time stamp
00030 #Frame this data is associated with
00031 # 0: no frame
00032 # 1: global frame
00033 string frame_id
00034 
00035 ================================================================================
00036 MSG: cart_pushing_msgs/RobotCartConfiguration
00037 # Robot's pose in reference frame
00038 geometry_msgs/Pose robot_pose
00039 
00040 # Cart's pose in base frame
00041 geometry_msgs/Pose cart_pose
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   __slots__ = ['header','path']
00066   _slot_types = ['std_msgs/Header','cart_pushing_msgs/RobotCartConfiguration[]']
00067 
00068   def __init__(self, *args, **kwds):
00069     """
00070     Constructor. Any message fields that are implicitly/explicitly
00071     set to None will be assigned a default value. The recommend
00072     use is keyword arguments as this is more robust to future message
00073     changes.  You cannot mix in-order arguments and keyword arguments.
00074 
00075     The available fields are:
00076        header,path
00077 
00078     :param args: complete set of field values, in .msg order
00079     :param kwds: use keyword arguments corresponding to message field names
00080     to set specific fields.
00081     """
00082     if args or kwds:
00083       super(RobotCartPath, self).__init__(*args, **kwds)
00084       #message fields cannot be None, assign default values for those that are
00085       if self.header is None:
00086         self.header = std_msgs.msg.Header()
00087       if self.path is None:
00088         self.path = []
00089     else:
00090       self.header = std_msgs.msg.Header()
00091       self.path = []
00092 
00093   def _get_types(self):
00094     """
00095     internal API method
00096     """
00097     return self._slot_types
00098 
00099   def serialize(self, buff):
00100     """
00101     serialize message into buffer
00102     :param buff: buffer, ``StringIO``
00103     """
00104     try:
00105       _x = self
00106       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00107       _x = self.header.frame_id
00108       length = len(_x)
00109       if python3 or type(_x) == unicode:
00110         _x = _x.encode('utf-8')
00111         length = len(_x)
00112       buff.write(struct.pack('<I%ss'%length, length, _x))
00113       length = len(self.path)
00114       buff.write(_struct_I.pack(length))
00115       for val1 in self.path:
00116         _v1 = val1.robot_pose
00117         _v2 = _v1.position
00118         _x = _v2
00119         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00120         _v3 = _v1.orientation
00121         _x = _v3
00122         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00123         _v4 = val1.cart_pose
00124         _v5 = _v4.position
00125         _x = _v5
00126         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00127         _v6 = _v4.orientation
00128         _x = _v6
00129         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00130     except struct.error as se: self._check_types(se)
00131     except TypeError as te: self._check_types(te)
00132 
00133   def deserialize(self, str):
00134     """
00135     unpack serialized message in str into this message instance
00136     :param str: byte array of serialized message, ``str``
00137     """
00138     try:
00139       if self.header is None:
00140         self.header = std_msgs.msg.Header()
00141       if self.path is None:
00142         self.path = None
00143       end = 0
00144       _x = self
00145       start = end
00146       end += 12
00147       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00148       start = end
00149       end += 4
00150       (length,) = _struct_I.unpack(str[start:end])
00151       start = end
00152       end += length
00153       if python3:
00154         self.header.frame_id = str[start:end].decode('utf-8')
00155       else:
00156         self.header.frame_id = str[start:end]
00157       start = end
00158       end += 4
00159       (length,) = _struct_I.unpack(str[start:end])
00160       self.path = []
00161       for i in range(0, length):
00162         val1 = cart_pushing_msgs.msg.RobotCartConfiguration()
00163         _v7 = val1.robot_pose
00164         _v8 = _v7.position
00165         _x = _v8
00166         start = end
00167         end += 24
00168         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00169         _v9 = _v7.orientation
00170         _x = _v9
00171         start = end
00172         end += 32
00173         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00174         _v10 = val1.cart_pose
00175         _v11 = _v10.position
00176         _x = _v11
00177         start = end
00178         end += 24
00179         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00180         _v12 = _v10.orientation
00181         _x = _v12
00182         start = end
00183         end += 32
00184         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00185         self.path.append(val1)
00186       return self
00187     except struct.error as e:
00188       raise genpy.DeserializationError(e) #most likely buffer underfill
00189 
00190 
00191   def serialize_numpy(self, buff, numpy):
00192     """
00193     serialize message with numpy array types into buffer
00194     :param buff: buffer, ``StringIO``
00195     :param numpy: numpy python module
00196     """
00197     try:
00198       _x = self
00199       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00200       _x = self.header.frame_id
00201       length = len(_x)
00202       if python3 or type(_x) == unicode:
00203         _x = _x.encode('utf-8')
00204         length = len(_x)
00205       buff.write(struct.pack('<I%ss'%length, length, _x))
00206       length = len(self.path)
00207       buff.write(_struct_I.pack(length))
00208       for val1 in self.path:
00209         _v13 = val1.robot_pose
00210         _v14 = _v13.position
00211         _x = _v14
00212         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00213         _v15 = _v13.orientation
00214         _x = _v15
00215         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00216         _v16 = val1.cart_pose
00217         _v17 = _v16.position
00218         _x = _v17
00219         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00220         _v18 = _v16.orientation
00221         _x = _v18
00222         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00223     except struct.error as se: self._check_types(se)
00224     except TypeError as te: self._check_types(te)
00225 
00226   def deserialize_numpy(self, str, numpy):
00227     """
00228     unpack serialized message in str into this message instance using numpy for array types
00229     :param str: byte array of serialized message, ``str``
00230     :param numpy: numpy python module
00231     """
00232     try:
00233       if self.header is None:
00234         self.header = std_msgs.msg.Header()
00235       if self.path is None:
00236         self.path = None
00237       end = 0
00238       _x = self
00239       start = end
00240       end += 12
00241       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00242       start = end
00243       end += 4
00244       (length,) = _struct_I.unpack(str[start:end])
00245       start = end
00246       end += length
00247       if python3:
00248         self.header.frame_id = str[start:end].decode('utf-8')
00249       else:
00250         self.header.frame_id = str[start:end]
00251       start = end
00252       end += 4
00253       (length,) = _struct_I.unpack(str[start:end])
00254       self.path = []
00255       for i in range(0, length):
00256         val1 = cart_pushing_msgs.msg.RobotCartConfiguration()
00257         _v19 = val1.robot_pose
00258         _v20 = _v19.position
00259         _x = _v20
00260         start = end
00261         end += 24
00262         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00263         _v21 = _v19.orientation
00264         _x = _v21
00265         start = end
00266         end += 32
00267         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00268         _v22 = val1.cart_pose
00269         _v23 = _v22.position
00270         _x = _v23
00271         start = end
00272         end += 24
00273         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00274         _v24 = _v22.orientation
00275         _x = _v24
00276         start = end
00277         end += 32
00278         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00279         self.path.append(val1)
00280       return self
00281     except struct.error as e:
00282       raise genpy.DeserializationError(e) #most likely buffer underfill
00283 
00284 _struct_I = genpy.struct_I
00285 _struct_3I = struct.Struct("<3I")
00286 _struct_4d = struct.Struct("<4d")
00287 _struct_3d = struct.Struct("<3d")


cart_pushing_msgs
Author(s): Sachin Chitta
autogenerated on Tue Jan 7 2014 11:11:13