00001 """autogenerated by genpy from tf_trajectory_visualization/VisualizeTFTrajectoryRequest.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 genpy
00008
00009 class VisualizeTFTrajectoryRequest(genpy.Message):
00010 _md5sum = "16b36f15aeb3dc7a80d54d835f28b5a8"
00011 _type = "tf_trajectory_visualization/VisualizeTFTrajectoryRequest"
00012 _has_header = False
00013 _full_text = """
00014 time start_time
00015 time end_time
00016 string tf_frame
00017 bool publish
00018
00019 """
00020 __slots__ = ['start_time','end_time','tf_frame','publish']
00021 _slot_types = ['time','time','string','bool']
00022
00023 def __init__(self, *args, **kwds):
00024 """
00025 Constructor. Any message fields that are implicitly/explicitly
00026 set to None will be assigned a default value. The recommend
00027 use is keyword arguments as this is more robust to future message
00028 changes. You cannot mix in-order arguments and keyword arguments.
00029
00030 The available fields are:
00031 start_time,end_time,tf_frame,publish
00032
00033 :param args: complete set of field values, in .msg order
00034 :param kwds: use keyword arguments corresponding to message field names
00035 to set specific fields.
00036 """
00037 if args or kwds:
00038 super(VisualizeTFTrajectoryRequest, self).__init__(*args, **kwds)
00039
00040 if self.start_time is None:
00041 self.start_time = genpy.Time()
00042 if self.end_time is None:
00043 self.end_time = genpy.Time()
00044 if self.tf_frame is None:
00045 self.tf_frame = ''
00046 if self.publish is None:
00047 self.publish = False
00048 else:
00049 self.start_time = genpy.Time()
00050 self.end_time = genpy.Time()
00051 self.tf_frame = ''
00052 self.publish = False
00053
00054 def _get_types(self):
00055 """
00056 internal API method
00057 """
00058 return self._slot_types
00059
00060 def serialize(self, buff):
00061 """
00062 serialize message into buffer
00063 :param buff: buffer, ``StringIO``
00064 """
00065 try:
00066 _x = self
00067 buff.write(_struct_4I.pack(_x.start_time.secs, _x.start_time.nsecs, _x.end_time.secs, _x.end_time.nsecs))
00068 _x = self.tf_frame
00069 length = len(_x)
00070 if python3 or type(_x) == unicode:
00071 _x = _x.encode('utf-8')
00072 length = len(_x)
00073 buff.write(struct.pack('<I%ss'%length, length, _x))
00074 buff.write(_struct_B.pack(self.publish))
00075 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00076 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00077
00078 def deserialize(self, str):
00079 """
00080 unpack serialized message in str into this message instance
00081 :param str: byte array of serialized message, ``str``
00082 """
00083 try:
00084 if self.start_time is None:
00085 self.start_time = genpy.Time()
00086 if self.end_time is None:
00087 self.end_time = genpy.Time()
00088 end = 0
00089 _x = self
00090 start = end
00091 end += 16
00092 (_x.start_time.secs, _x.start_time.nsecs, _x.end_time.secs, _x.end_time.nsecs,) = _struct_4I.unpack(str[start:end])
00093 start = end
00094 end += 4
00095 (length,) = _struct_I.unpack(str[start:end])
00096 start = end
00097 end += length
00098 if python3:
00099 self.tf_frame = str[start:end].decode('utf-8')
00100 else:
00101 self.tf_frame = str[start:end]
00102 start = end
00103 end += 1
00104 (self.publish,) = _struct_B.unpack(str[start:end])
00105 self.publish = bool(self.publish)
00106 self.start_time.canon()
00107 self.end_time.canon()
00108 return self
00109 except struct.error as e:
00110 raise genpy.DeserializationError(e)
00111
00112
00113 def serialize_numpy(self, buff, numpy):
00114 """
00115 serialize message with numpy array types into buffer
00116 :param buff: buffer, ``StringIO``
00117 :param numpy: numpy python module
00118 """
00119 try:
00120 _x = self
00121 buff.write(_struct_4I.pack(_x.start_time.secs, _x.start_time.nsecs, _x.end_time.secs, _x.end_time.nsecs))
00122 _x = self.tf_frame
00123 length = len(_x)
00124 if python3 or type(_x) == unicode:
00125 _x = _x.encode('utf-8')
00126 length = len(_x)
00127 buff.write(struct.pack('<I%ss'%length, length, _x))
00128 buff.write(_struct_B.pack(self.publish))
00129 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00130 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00131
00132 def deserialize_numpy(self, str, numpy):
00133 """
00134 unpack serialized message in str into this message instance using numpy for array types
00135 :param str: byte array of serialized message, ``str``
00136 :param numpy: numpy python module
00137 """
00138 try:
00139 if self.start_time is None:
00140 self.start_time = genpy.Time()
00141 if self.end_time is None:
00142 self.end_time = genpy.Time()
00143 end = 0
00144 _x = self
00145 start = end
00146 end += 16
00147 (_x.start_time.secs, _x.start_time.nsecs, _x.end_time.secs, _x.end_time.nsecs,) = _struct_4I.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.tf_frame = str[start:end].decode('utf-8')
00155 else:
00156 self.tf_frame = str[start:end]
00157 start = end
00158 end += 1
00159 (self.publish,) = _struct_B.unpack(str[start:end])
00160 self.publish = bool(self.publish)
00161 self.start_time.canon()
00162 self.end_time.canon()
00163 return self
00164 except struct.error as e:
00165 raise genpy.DeserializationError(e)
00166
00167 _struct_I = genpy.struct_I
00168 _struct_B = struct.Struct("<B")
00169 _struct_4I = struct.Struct("<4I")
00170 """autogenerated by genpy from tf_trajectory_visualization/VisualizeTFTrajectoryResponse.msg. Do not edit."""
00171 import sys
00172 python3 = True if sys.hexversion > 0x03000000 else False
00173 import genpy
00174 import struct
00175
00176 import geometry_msgs.msg
00177
00178 class VisualizeTFTrajectoryResponse(genpy.Message):
00179 _md5sum = "3fb3f9dacc279b964c4c8341122c34df"
00180 _type = "tf_trajectory_visualization/VisualizeTFTrajectoryResponse"
00181 _has_header = False
00182 _full_text = """geometry_msgs/Point[] points
00183
00184
00185 ================================================================================
00186 MSG: geometry_msgs/Point
00187 # This contains the position of a point in free space
00188 float64 x
00189 float64 y
00190 float64 z
00191
00192 """
00193 __slots__ = ['points']
00194 _slot_types = ['geometry_msgs/Point[]']
00195
00196 def __init__(self, *args, **kwds):
00197 """
00198 Constructor. Any message fields that are implicitly/explicitly
00199 set to None will be assigned a default value. The recommend
00200 use is keyword arguments as this is more robust to future message
00201 changes. You cannot mix in-order arguments and keyword arguments.
00202
00203 The available fields are:
00204 points
00205
00206 :param args: complete set of field values, in .msg order
00207 :param kwds: use keyword arguments corresponding to message field names
00208 to set specific fields.
00209 """
00210 if args or kwds:
00211 super(VisualizeTFTrajectoryResponse, self).__init__(*args, **kwds)
00212
00213 if self.points is None:
00214 self.points = []
00215 else:
00216 self.points = []
00217
00218 def _get_types(self):
00219 """
00220 internal API method
00221 """
00222 return self._slot_types
00223
00224 def serialize(self, buff):
00225 """
00226 serialize message into buffer
00227 :param buff: buffer, ``StringIO``
00228 """
00229 try:
00230 length = len(self.points)
00231 buff.write(_struct_I.pack(length))
00232 for val1 in self.points:
00233 _x = val1
00234 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00235 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00236 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00237
00238 def deserialize(self, str):
00239 """
00240 unpack serialized message in str into this message instance
00241 :param str: byte array of serialized message, ``str``
00242 """
00243 try:
00244 if self.points is None:
00245 self.points = None
00246 end = 0
00247 start = end
00248 end += 4
00249 (length,) = _struct_I.unpack(str[start:end])
00250 self.points = []
00251 for i in range(0, length):
00252 val1 = geometry_msgs.msg.Point()
00253 _x = val1
00254 start = end
00255 end += 24
00256 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00257 self.points.append(val1)
00258 return self
00259 except struct.error as e:
00260 raise genpy.DeserializationError(e)
00261
00262
00263 def serialize_numpy(self, buff, numpy):
00264 """
00265 serialize message with numpy array types into buffer
00266 :param buff: buffer, ``StringIO``
00267 :param numpy: numpy python module
00268 """
00269 try:
00270 length = len(self.points)
00271 buff.write(_struct_I.pack(length))
00272 for val1 in self.points:
00273 _x = val1
00274 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00275 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00276 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00277
00278 def deserialize_numpy(self, str, numpy):
00279 """
00280 unpack serialized message in str into this message instance using numpy for array types
00281 :param str: byte array of serialized message, ``str``
00282 :param numpy: numpy python module
00283 """
00284 try:
00285 if self.points is None:
00286 self.points = None
00287 end = 0
00288 start = end
00289 end += 4
00290 (length,) = _struct_I.unpack(str[start:end])
00291 self.points = []
00292 for i in range(0, length):
00293 val1 = geometry_msgs.msg.Point()
00294 _x = val1
00295 start = end
00296 end += 24
00297 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00298 self.points.append(val1)
00299 return self
00300 except struct.error as e:
00301 raise genpy.DeserializationError(e)
00302
00303 _struct_I = genpy.struct_I
00304 _struct_3d = struct.Struct("<3d")
00305 class VisualizeTFTrajectory(object):
00306 _type = 'tf_trajectory_visualization/VisualizeTFTrajectory'
00307 _md5sum = 'b792b08a8485aef0c6937c00861e6de9'
00308 _request_class = VisualizeTFTrajectoryRequest
00309 _response_class = VisualizeTFTrajectoryResponse