00001 """autogenerated by genmsg_py from GetPosesRequest.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005
00006 class GetPosesRequest(roslib.message.Message):
00007 _md5sum = "8822a3644f690455b925fa86611b6024"
00008 _type = "graph_mapping_msgs/GetPosesRequest"
00009 _has_header = False
00010 _full_text = """
00011
00012 uint32[] nodes
00013
00014 """
00015 __slots__ = ['nodes']
00016 _slot_types = ['uint32[]']
00017
00018 def __init__(self, *args, **kwds):
00019 """
00020 Constructor. Any message fields that are implicitly/explicitly
00021 set to None will be assigned a default value. The recommend
00022 use is keyword arguments as this is more robust to future message
00023 changes. You cannot mix in-order arguments and keyword arguments.
00024
00025 The available fields are:
00026 nodes
00027
00028 @param args: complete set of field values, in .msg order
00029 @param kwds: use keyword arguments corresponding to message field names
00030 to set specific fields.
00031 """
00032 if args or kwds:
00033 super(GetPosesRequest, self).__init__(*args, **kwds)
00034
00035 if self.nodes is None:
00036 self.nodes = []
00037 else:
00038 self.nodes = []
00039
00040 def _get_types(self):
00041 """
00042 internal API method
00043 """
00044 return self._slot_types
00045
00046 def serialize(self, buff):
00047 """
00048 serialize message into buffer
00049 @param buff: buffer
00050 @type buff: StringIO
00051 """
00052 try:
00053 length = len(self.nodes)
00054 buff.write(_struct_I.pack(length))
00055 pattern = '<%sI'%length
00056 buff.write(struct.pack(pattern, *self.nodes))
00057 except struct.error, se: self._check_types(se)
00058 except TypeError, te: self._check_types(te)
00059
00060 def deserialize(self, str):
00061 """
00062 unpack serialized message in str into this message instance
00063 @param str: byte array of serialized message
00064 @type str: str
00065 """
00066 try:
00067 end = 0
00068 start = end
00069 end += 4
00070 (length,) = _struct_I.unpack(str[start:end])
00071 pattern = '<%sI'%length
00072 start = end
00073 end += struct.calcsize(pattern)
00074 self.nodes = struct.unpack(pattern, str[start:end])
00075 return self
00076 except struct.error, e:
00077 raise roslib.message.DeserializationError(e)
00078
00079
00080 def serialize_numpy(self, buff, numpy):
00081 """
00082 serialize message with numpy array types into buffer
00083 @param buff: buffer
00084 @type buff: StringIO
00085 @param numpy: numpy python module
00086 @type numpy module
00087 """
00088 try:
00089 length = len(self.nodes)
00090 buff.write(_struct_I.pack(length))
00091 pattern = '<%sI'%length
00092 buff.write(self.nodes.tostring())
00093 except struct.error, se: self._check_types(se)
00094 except TypeError, te: self._check_types(te)
00095
00096 def deserialize_numpy(self, str, numpy):
00097 """
00098 unpack serialized message in str into this message instance using numpy for array types
00099 @param str: byte array of serialized message
00100 @type str: str
00101 @param numpy: numpy python module
00102 @type numpy: module
00103 """
00104 try:
00105 end = 0
00106 start = end
00107 end += 4
00108 (length,) = _struct_I.unpack(str[start:end])
00109 pattern = '<%sI'%length
00110 start = end
00111 end += struct.calcsize(pattern)
00112 self.nodes = numpy.frombuffer(str[start:end], dtype=numpy.uint32, count=length)
00113 return self
00114 except struct.error, e:
00115 raise roslib.message.DeserializationError(e)
00116
00117 _struct_I = roslib.message.struct_I
00118 """autogenerated by genmsg_py from GetPosesResponse.msg. Do not edit."""
00119 import roslib.message
00120 import struct
00121
00122 import geometry_msgs.msg
00123
00124 class GetPosesResponse(roslib.message.Message):
00125 _md5sum = "684c39e2d774e03c12c8de35a0b4ecd5"
00126 _type = "graph_mapping_msgs/GetPosesResponse"
00127 _has_header = False
00128 _full_text = """uint8 error_code
00129 string error_msg
00130
00131
00132
00133 geometry_msgs/Pose[] poses
00134
00135
00136 uint8 SUCCESS=0
00137 uint8 DISCONNECTED_NODES=1
00138 uint8 UNKNOWN_NODES=2
00139 uint8 EMPTY_NODE_SET=3
00140
00141 ================================================================================
00142 MSG: geometry_msgs/Pose
00143 # A representation of pose in free space, composed of postion and orientation.
00144 Point position
00145 Quaternion orientation
00146
00147 ================================================================================
00148 MSG: geometry_msgs/Point
00149 # This contains the position of a point in free space
00150 float64 x
00151 float64 y
00152 float64 z
00153
00154 ================================================================================
00155 MSG: geometry_msgs/Quaternion
00156 # This represents an orientation in free space in quaternion form.
00157
00158 float64 x
00159 float64 y
00160 float64 z
00161 float64 w
00162
00163 """
00164
00165 SUCCESS = 0
00166 DISCONNECTED_NODES = 1
00167 UNKNOWN_NODES = 2
00168 EMPTY_NODE_SET = 3
00169
00170 __slots__ = ['error_code','error_msg','poses']
00171 _slot_types = ['uint8','string','geometry_msgs/Pose[]']
00172
00173 def __init__(self, *args, **kwds):
00174 """
00175 Constructor. Any message fields that are implicitly/explicitly
00176 set to None will be assigned a default value. The recommend
00177 use is keyword arguments as this is more robust to future message
00178 changes. You cannot mix in-order arguments and keyword arguments.
00179
00180 The available fields are:
00181 error_code,error_msg,poses
00182
00183 @param args: complete set of field values, in .msg order
00184 @param kwds: use keyword arguments corresponding to message field names
00185 to set specific fields.
00186 """
00187 if args or kwds:
00188 super(GetPosesResponse, self).__init__(*args, **kwds)
00189
00190 if self.error_code is None:
00191 self.error_code = 0
00192 if self.error_msg is None:
00193 self.error_msg = ''
00194 if self.poses is None:
00195 self.poses = []
00196 else:
00197 self.error_code = 0
00198 self.error_msg = ''
00199 self.poses = []
00200
00201 def _get_types(self):
00202 """
00203 internal API method
00204 """
00205 return self._slot_types
00206
00207 def serialize(self, buff):
00208 """
00209 serialize message into buffer
00210 @param buff: buffer
00211 @type buff: StringIO
00212 """
00213 try:
00214 buff.write(_struct_B.pack(self.error_code))
00215 _x = self.error_msg
00216 length = len(_x)
00217 buff.write(struct.pack('<I%ss'%length, length, _x))
00218 length = len(self.poses)
00219 buff.write(_struct_I.pack(length))
00220 for val1 in self.poses:
00221 _v1 = val1.position
00222 _x = _v1
00223 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00224 _v2 = val1.orientation
00225 _x = _v2
00226 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00227 except struct.error, se: self._check_types(se)
00228 except TypeError, te: self._check_types(te)
00229
00230 def deserialize(self, str):
00231 """
00232 unpack serialized message in str into this message instance
00233 @param str: byte array of serialized message
00234 @type str: str
00235 """
00236 try:
00237 end = 0
00238 start = end
00239 end += 1
00240 (self.error_code,) = _struct_B.unpack(str[start:end])
00241 start = end
00242 end += 4
00243 (length,) = _struct_I.unpack(str[start:end])
00244 start = end
00245 end += length
00246 self.error_msg = str[start:end]
00247 start = end
00248 end += 4
00249 (length,) = _struct_I.unpack(str[start:end])
00250 self.poses = []
00251 for i in xrange(0, length):
00252 val1 = geometry_msgs.msg.Pose()
00253 _v3 = val1.position
00254 _x = _v3
00255 start = end
00256 end += 24
00257 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00258 _v4 = val1.orientation
00259 _x = _v4
00260 start = end
00261 end += 32
00262 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00263 self.poses.append(val1)
00264 return self
00265 except struct.error, e:
00266 raise roslib.message.DeserializationError(e)
00267
00268
00269 def serialize_numpy(self, buff, numpy):
00270 """
00271 serialize message with numpy array types into buffer
00272 @param buff: buffer
00273 @type buff: StringIO
00274 @param numpy: numpy python module
00275 @type numpy module
00276 """
00277 try:
00278 buff.write(_struct_B.pack(self.error_code))
00279 _x = self.error_msg
00280 length = len(_x)
00281 buff.write(struct.pack('<I%ss'%length, length, _x))
00282 length = len(self.poses)
00283 buff.write(_struct_I.pack(length))
00284 for val1 in self.poses:
00285 _v5 = val1.position
00286 _x = _v5
00287 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00288 _v6 = val1.orientation
00289 _x = _v6
00290 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00291 except struct.error, se: self._check_types(se)
00292 except TypeError, te: self._check_types(te)
00293
00294 def deserialize_numpy(self, str, numpy):
00295 """
00296 unpack serialized message in str into this message instance using numpy for array types
00297 @param str: byte array of serialized message
00298 @type str: str
00299 @param numpy: numpy python module
00300 @type numpy: module
00301 """
00302 try:
00303 end = 0
00304 start = end
00305 end += 1
00306 (self.error_code,) = _struct_B.unpack(str[start:end])
00307 start = end
00308 end += 4
00309 (length,) = _struct_I.unpack(str[start:end])
00310 start = end
00311 end += length
00312 self.error_msg = str[start:end]
00313 start = end
00314 end += 4
00315 (length,) = _struct_I.unpack(str[start:end])
00316 self.poses = []
00317 for i in xrange(0, length):
00318 val1 = geometry_msgs.msg.Pose()
00319 _v7 = val1.position
00320 _x = _v7
00321 start = end
00322 end += 24
00323 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00324 _v8 = val1.orientation
00325 _x = _v8
00326 start = end
00327 end += 32
00328 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00329 self.poses.append(val1)
00330 return self
00331 except struct.error, e:
00332 raise roslib.message.DeserializationError(e)
00333
00334 _struct_I = roslib.message.struct_I
00335 _struct_4d = struct.Struct("<4d")
00336 _struct_B = struct.Struct("<B")
00337 _struct_3d = struct.Struct("<3d")
00338 class GetPoses(roslib.message.ServiceDefinition):
00339 _type = 'graph_mapping_msgs/GetPoses'
00340 _md5sum = '14eb1b62976c50381cfc89a7266aa1d5'
00341 _request_class = GetPosesRequest
00342 _response_class = GetPosesResponse