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