00001 """autogenerated by genmsg_py from GetGraphRequest.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005
00006 class GetGraphRequest(roslib.message.Message):
00007 _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
00008 _type = "graph_mapping_msgs/GetGraphRequest"
00009 _has_header = False
00010 _full_text = """
00011 """
00012 __slots__ = []
00013 _slot_types = []
00014
00015 def __init__(self, *args, **kwds):
00016 """
00017 Constructor. Any message fields that are implicitly/explicitly
00018 set to None will be assigned a default value. The recommend
00019 use is keyword arguments as this is more robust to future message
00020 changes. You cannot mix in-order arguments and keyword arguments.
00021
00022 The available fields are:
00023
00024
00025 @param args: complete set of field values, in .msg order
00026 @param kwds: use keyword arguments corresponding to message field names
00027 to set specific fields.
00028 """
00029 if args or kwds:
00030 super(GetGraphRequest, self).__init__(*args, **kwds)
00031
00032 def _get_types(self):
00033 """
00034 internal API method
00035 """
00036 return self._slot_types
00037
00038 def serialize(self, buff):
00039 """
00040 serialize message into buffer
00041 @param buff: buffer
00042 @type buff: StringIO
00043 """
00044 try:
00045 pass
00046 except struct.error, se: self._check_types(se)
00047 except TypeError, te: self._check_types(te)
00048
00049 def deserialize(self, str):
00050 """
00051 unpack serialized message in str into this message instance
00052 @param str: byte array of serialized message
00053 @type str: str
00054 """
00055 try:
00056 end = 0
00057 return self
00058 except struct.error, e:
00059 raise roslib.message.DeserializationError(e)
00060
00061
00062 def serialize_numpy(self, buff, numpy):
00063 """
00064 serialize message with numpy array types into buffer
00065 @param buff: buffer
00066 @type buff: StringIO
00067 @param numpy: numpy python module
00068 @type numpy module
00069 """
00070 try:
00071 pass
00072 except struct.error, se: self._check_types(se)
00073 except TypeError, te: self._check_types(te)
00074
00075 def deserialize_numpy(self, str, numpy):
00076 """
00077 unpack serialized message in str into this message instance using numpy for array types
00078 @param str: byte array of serialized message
00079 @type str: str
00080 @param numpy: numpy python module
00081 @type numpy: module
00082 """
00083 try:
00084 end = 0
00085 return self
00086 except struct.error, e:
00087 raise roslib.message.DeserializationError(e)
00088
00089 _struct_I = roslib.message.struct_I
00090 """autogenerated by genmsg_py from GetGraphResponse.msg. Do not edit."""
00091 import roslib.message
00092 import struct
00093
00094 import geometry_msgs.msg
00095 import graph_mapping_msgs.msg
00096
00097 class GetGraphResponse(roslib.message.Message):
00098 _md5sum = "c3a2353751dfa5e5bf388734f8e93ee1"
00099 _type = "graph_mapping_msgs/GetGraphResponse"
00100 _has_header = False
00101 _full_text = """uint64 id
00102 graph_mapping_msgs/ConstraintGraphMessage graph
00103
00104 ================================================================================
00105 MSG: graph_mapping_msgs/ConstraintGraphMessage
00106 Node[] nodes
00107 Edge[] edges
00108 ================================================================================
00109 MSG: graph_mapping_msgs/Node
00110 uint32 id
00111
00112 # This array has length 1 if the node has an optimized pose; 0 otherwise
00113 geometry_msgs/Pose[] optimized_pose
00114
00115
00116 ================================================================================
00117 MSG: geometry_msgs/Pose
00118 # A representation of pose in free space, composed of postion and orientation.
00119 Point position
00120 Quaternion orientation
00121
00122 ================================================================================
00123 MSG: geometry_msgs/Point
00124 # This contains the position of a point in free space
00125 float64 x
00126 float64 y
00127 float64 z
00128
00129 ================================================================================
00130 MSG: geometry_msgs/Quaternion
00131 # This represents an orientation in free space in quaternion form.
00132
00133 float64 x
00134 float64 y
00135 float64 z
00136 float64 w
00137
00138 ================================================================================
00139 MSG: graph_mapping_msgs/Edge
00140 uint32 id
00141 GraphConstraint constraint
00142
00143 ================================================================================
00144 MSG: graph_mapping_msgs/GraphConstraint
00145 uint32 src
00146 uint32 dest
00147 PoseWithPrecision constraint
00148 ================================================================================
00149 MSG: graph_mapping_msgs/PoseWithPrecision
00150 geometry_msgs/Pose pose
00151 float64[36] precision
00152 """
00153 __slots__ = ['id','graph']
00154 _slot_types = ['uint64','graph_mapping_msgs/ConstraintGraphMessage']
00155
00156 def __init__(self, *args, **kwds):
00157 """
00158 Constructor. Any message fields that are implicitly/explicitly
00159 set to None will be assigned a default value. The recommend
00160 use is keyword arguments as this is more robust to future message
00161 changes. You cannot mix in-order arguments and keyword arguments.
00162
00163 The available fields are:
00164 id,graph
00165
00166 @param args: complete set of field values, in .msg order
00167 @param kwds: use keyword arguments corresponding to message field names
00168 to set specific fields.
00169 """
00170 if args or kwds:
00171 super(GetGraphResponse, self).__init__(*args, **kwds)
00172
00173 if self.id is None:
00174 self.id = 0
00175 if self.graph is None:
00176 self.graph = graph_mapping_msgs.msg.ConstraintGraphMessage()
00177 else:
00178 self.id = 0
00179 self.graph = graph_mapping_msgs.msg.ConstraintGraphMessage()
00180
00181 def _get_types(self):
00182 """
00183 internal API method
00184 """
00185 return self._slot_types
00186
00187 def serialize(self, buff):
00188 """
00189 serialize message into buffer
00190 @param buff: buffer
00191 @type buff: StringIO
00192 """
00193 try:
00194 buff.write(_struct_Q.pack(self.id))
00195 length = len(self.graph.nodes)
00196 buff.write(_struct_I.pack(length))
00197 for val1 in self.graph.nodes:
00198 buff.write(_struct_I.pack(val1.id))
00199 length = len(val1.optimized_pose)
00200 buff.write(_struct_I.pack(length))
00201 for val2 in val1.optimized_pose:
00202 _v1 = val2.position
00203 _x = _v1
00204 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00205 _v2 = val2.orientation
00206 _x = _v2
00207 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00208 length = len(self.graph.edges)
00209 buff.write(_struct_I.pack(length))
00210 for val1 in self.graph.edges:
00211 buff.write(_struct_I.pack(val1.id))
00212 _v3 = val1.constraint
00213 _x = _v3
00214 buff.write(_struct_2I.pack(_x.src, _x.dest))
00215 _v4 = _v3.constraint
00216 _v5 = _v4.pose
00217 _v6 = _v5.position
00218 _x = _v6
00219 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00220 _v7 = _v5.orientation
00221 _x = _v7
00222 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00223 buff.write(_struct_36d.pack(*_v4.precision))
00224 except struct.error, se: self._check_types(se)
00225 except TypeError, te: self._check_types(te)
00226
00227 def deserialize(self, str):
00228 """
00229 unpack serialized message in str into this message instance
00230 @param str: byte array of serialized message
00231 @type str: str
00232 """
00233 try:
00234 if self.graph is None:
00235 self.graph = graph_mapping_msgs.msg.ConstraintGraphMessage()
00236 end = 0
00237 start = end
00238 end += 8
00239 (self.id,) = _struct_Q.unpack(str[start:end])
00240 start = end
00241 end += 4
00242 (length,) = _struct_I.unpack(str[start:end])
00243 self.graph.nodes = []
00244 for i in xrange(0, length):
00245 val1 = graph_mapping_msgs.msg.Node()
00246 start = end
00247 end += 4
00248 (val1.id,) = _struct_I.unpack(str[start:end])
00249 start = end
00250 end += 4
00251 (length,) = _struct_I.unpack(str[start:end])
00252 val1.optimized_pose = []
00253 for i in xrange(0, length):
00254 val2 = geometry_msgs.msg.Pose()
00255 _v8 = val2.position
00256 _x = _v8
00257 start = end
00258 end += 24
00259 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00260 _v9 = val2.orientation
00261 _x = _v9
00262 start = end
00263 end += 32
00264 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00265 val1.optimized_pose.append(val2)
00266 self.graph.nodes.append(val1)
00267 start = end
00268 end += 4
00269 (length,) = _struct_I.unpack(str[start:end])
00270 self.graph.edges = []
00271 for i in xrange(0, length):
00272 val1 = graph_mapping_msgs.msg.Edge()
00273 start = end
00274 end += 4
00275 (val1.id,) = _struct_I.unpack(str[start:end])
00276 _v10 = val1.constraint
00277 _x = _v10
00278 start = end
00279 end += 8
00280 (_x.src, _x.dest,) = _struct_2I.unpack(str[start:end])
00281 _v11 = _v10.constraint
00282 _v12 = _v11.pose
00283 _v13 = _v12.position
00284 _x = _v13
00285 start = end
00286 end += 24
00287 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00288 _v14 = _v12.orientation
00289 _x = _v14
00290 start = end
00291 end += 32
00292 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00293 start = end
00294 end += 288
00295 _v11.precision = _struct_36d.unpack(str[start:end])
00296 self.graph.edges.append(val1)
00297 return self
00298 except struct.error, e:
00299 raise roslib.message.DeserializationError(e)
00300
00301
00302 def serialize_numpy(self, buff, numpy):
00303 """
00304 serialize message with numpy array types into buffer
00305 @param buff: buffer
00306 @type buff: StringIO
00307 @param numpy: numpy python module
00308 @type numpy module
00309 """
00310 try:
00311 buff.write(_struct_Q.pack(self.id))
00312 length = len(self.graph.nodes)
00313 buff.write(_struct_I.pack(length))
00314 for val1 in self.graph.nodes:
00315 buff.write(_struct_I.pack(val1.id))
00316 length = len(val1.optimized_pose)
00317 buff.write(_struct_I.pack(length))
00318 for val2 in val1.optimized_pose:
00319 _v15 = val2.position
00320 _x = _v15
00321 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00322 _v16 = val2.orientation
00323 _x = _v16
00324 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00325 length = len(self.graph.edges)
00326 buff.write(_struct_I.pack(length))
00327 for val1 in self.graph.edges:
00328 buff.write(_struct_I.pack(val1.id))
00329 _v17 = val1.constraint
00330 _x = _v17
00331 buff.write(_struct_2I.pack(_x.src, _x.dest))
00332 _v18 = _v17.constraint
00333 _v19 = _v18.pose
00334 _v20 = _v19.position
00335 _x = _v20
00336 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00337 _v21 = _v19.orientation
00338 _x = _v21
00339 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00340 buff.write(_v18.precision.tostring())
00341 except struct.error, se: self._check_types(se)
00342 except TypeError, te: self._check_types(te)
00343
00344 def deserialize_numpy(self, str, numpy):
00345 """
00346 unpack serialized message in str into this message instance using numpy for array types
00347 @param str: byte array of serialized message
00348 @type str: str
00349 @param numpy: numpy python module
00350 @type numpy: module
00351 """
00352 try:
00353 if self.graph is None:
00354 self.graph = graph_mapping_msgs.msg.ConstraintGraphMessage()
00355 end = 0
00356 start = end
00357 end += 8
00358 (self.id,) = _struct_Q.unpack(str[start:end])
00359 start = end
00360 end += 4
00361 (length,) = _struct_I.unpack(str[start:end])
00362 self.graph.nodes = []
00363 for i in xrange(0, length):
00364 val1 = graph_mapping_msgs.msg.Node()
00365 start = end
00366 end += 4
00367 (val1.id,) = _struct_I.unpack(str[start:end])
00368 start = end
00369 end += 4
00370 (length,) = _struct_I.unpack(str[start:end])
00371 val1.optimized_pose = []
00372 for i in xrange(0, length):
00373 val2 = geometry_msgs.msg.Pose()
00374 _v22 = val2.position
00375 _x = _v22
00376 start = end
00377 end += 24
00378 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00379 _v23 = val2.orientation
00380 _x = _v23
00381 start = end
00382 end += 32
00383 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00384 val1.optimized_pose.append(val2)
00385 self.graph.nodes.append(val1)
00386 start = end
00387 end += 4
00388 (length,) = _struct_I.unpack(str[start:end])
00389 self.graph.edges = []
00390 for i in xrange(0, length):
00391 val1 = graph_mapping_msgs.msg.Edge()
00392 start = end
00393 end += 4
00394 (val1.id,) = _struct_I.unpack(str[start:end])
00395 _v24 = val1.constraint
00396 _x = _v24
00397 start = end
00398 end += 8
00399 (_x.src, _x.dest,) = _struct_2I.unpack(str[start:end])
00400 _v25 = _v24.constraint
00401 _v26 = _v25.pose
00402 _v27 = _v26.position
00403 _x = _v27
00404 start = end
00405 end += 24
00406 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00407 _v28 = _v26.orientation
00408 _x = _v28
00409 start = end
00410 end += 32
00411 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00412 start = end
00413 end += 288
00414 _v25.precision = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=36)
00415 self.graph.edges.append(val1)
00416 return self
00417 except struct.error, e:
00418 raise roslib.message.DeserializationError(e)
00419
00420 _struct_I = roslib.message.struct_I
00421 _struct_36d = struct.Struct("<36d")
00422 _struct_Q = struct.Struct("<Q")
00423 _struct_4d = struct.Struct("<4d")
00424 _struct_2I = struct.Struct("<2I")
00425 _struct_3d = struct.Struct("<3d")
00426 class GetGraph(roslib.message.ServiceDefinition):
00427 _type = 'graph_mapping_msgs/GetGraph'
00428 _md5sum = 'c3a2353751dfa5e5bf388734f8e93ee1'
00429 _request_class = GetGraphRequest
00430 _response_class = GetGraphResponse