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