$search
00001 """autogenerated by genmsg_py from GetPoseRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import std_msgs.msg 00006 import sensor_msgs.msg 00007 00008 class GetPoseRequest(roslib.message.Message): 00009 _md5sum = "d5d036aeaa020e7f5e0ddd6aeae0e7d8" 00010 _type = "table_pose/GetPoseRequest" 00011 _has_header = False #flag to mark the presence of a Header object 00012 _full_text = """sensor_msgs/PointCloud2 data 00013 00014 ================================================================================ 00015 MSG: sensor_msgs/PointCloud2 00016 # This message holds a collection of N-dimensional points, which may 00017 # contain additional information such as normals, intensity, etc. The 00018 # point data is stored as a binary blob, its layout described by the 00019 # contents of the "fields" array. 00020 00021 # The point cloud data may be organized 2d (image-like) or 1d 00022 # (unordered). Point clouds organized as 2d images may be produced by 00023 # camera depth sensors such as stereo or time-of-flight. 00024 00025 # Time of sensor data acquisition, and the coordinate frame ID (for 3d 00026 # points). 00027 Header header 00028 00029 # 2D structure of the point cloud. If the cloud is unordered, height is 00030 # 1 and width is the length of the point cloud. 00031 uint32 height 00032 uint32 width 00033 00034 # Describes the channels and their layout in the binary data blob. 00035 PointField[] fields 00036 00037 bool is_bigendian # Is this data bigendian? 00038 uint32 point_step # Length of a point in bytes 00039 uint32 row_step # Length of a row in bytes 00040 uint8[] data # Actual point data, size is (row_step*height) 00041 00042 bool is_dense # True if there are no invalid points 00043 00044 ================================================================================ 00045 MSG: std_msgs/Header 00046 # Standard metadata for higher-level stamped data types. 00047 # This is generally used to communicate timestamped data 00048 # in a particular coordinate frame. 00049 # 00050 # sequence ID: consecutively increasing ID 00051 uint32 seq 00052 #Two-integer timestamp that is expressed as: 00053 # * stamp.secs: seconds (stamp_secs) since epoch 00054 # * stamp.nsecs: nanoseconds since stamp_secs 00055 # time-handling sugar is provided by the client library 00056 time stamp 00057 #Frame this data is associated with 00058 # 0: no frame 00059 # 1: global frame 00060 string frame_id 00061 00062 ================================================================================ 00063 MSG: sensor_msgs/PointField 00064 # This message holds the description of one point entry in the 00065 # PointCloud2 message format. 00066 uint8 INT8 = 1 00067 uint8 UINT8 = 2 00068 uint8 INT16 = 3 00069 uint8 UINT16 = 4 00070 uint8 INT32 = 5 00071 uint8 UINT32 = 6 00072 uint8 FLOAT32 = 7 00073 uint8 FLOAT64 = 8 00074 00075 string name # Name of field 00076 uint32 offset # Offset from start of point struct 00077 uint8 datatype # Datatype enumeration, see above 00078 uint32 count # How many elements in the field 00079 00080 """ 00081 __slots__ = ['data'] 00082 _slot_types = ['sensor_msgs/PointCloud2'] 00083 00084 def __init__(self, *args, **kwds): 00085 """ 00086 Constructor. Any message fields that are implicitly/explicitly 00087 set to None will be assigned a default value. The recommend 00088 use is keyword arguments as this is more robust to future message 00089 changes. You cannot mix in-order arguments and keyword arguments. 00090 00091 The available fields are: 00092 data 00093 00094 @param args: complete set of field values, in .msg order 00095 @param kwds: use keyword arguments corresponding to message field names 00096 to set specific fields. 00097 """ 00098 if args or kwds: 00099 super(GetPoseRequest, self).__init__(*args, **kwds) 00100 #message fields cannot be None, assign default values for those that are 00101 if self.data is None: 00102 self.data = sensor_msgs.msg.PointCloud2() 00103 else: 00104 self.data = sensor_msgs.msg.PointCloud2() 00105 00106 def _get_types(self): 00107 """ 00108 internal API method 00109 """ 00110 return self._slot_types 00111 00112 def serialize(self, buff): 00113 """ 00114 serialize message into buffer 00115 @param buff: buffer 00116 @type buff: StringIO 00117 """ 00118 try: 00119 _x = self 00120 buff.write(_struct_3I.pack(_x.data.header.seq, _x.data.header.stamp.secs, _x.data.header.stamp.nsecs)) 00121 _x = self.data.header.frame_id 00122 length = len(_x) 00123 buff.write(struct.pack('<I%ss'%length, length, _x)) 00124 _x = self 00125 buff.write(_struct_2I.pack(_x.data.height, _x.data.width)) 00126 length = len(self.data.fields) 00127 buff.write(_struct_I.pack(length)) 00128 for val1 in self.data.fields: 00129 _x = val1.name 00130 length = len(_x) 00131 buff.write(struct.pack('<I%ss'%length, length, _x)) 00132 _x = val1 00133 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count)) 00134 _x = self 00135 buff.write(_struct_B2I.pack(_x.data.is_bigendian, _x.data.point_step, _x.data.row_step)) 00136 _x = self.data.data 00137 length = len(_x) 00138 # - if encoded as a list instead, serialize as bytes instead of string 00139 if type(_x) in [list, tuple]: 00140 buff.write(struct.pack('<I%sB'%length, length, *_x)) 00141 else: 00142 buff.write(struct.pack('<I%ss'%length, length, _x)) 00143 buff.write(_struct_B.pack(self.data.is_dense)) 00144 except struct.error as se: self._check_types(se) 00145 except TypeError as te: self._check_types(te) 00146 00147 def deserialize(self, str): 00148 """ 00149 unpack serialized message in str into this message instance 00150 @param str: byte array of serialized message 00151 @type str: str 00152 """ 00153 try: 00154 if self.data is None: 00155 self.data = sensor_msgs.msg.PointCloud2() 00156 end = 0 00157 _x = self 00158 start = end 00159 end += 12 00160 (_x.data.header.seq, _x.data.header.stamp.secs, _x.data.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00161 start = end 00162 end += 4 00163 (length,) = _struct_I.unpack(str[start:end]) 00164 start = end 00165 end += length 00166 self.data.header.frame_id = str[start:end] 00167 _x = self 00168 start = end 00169 end += 8 00170 (_x.data.height, _x.data.width,) = _struct_2I.unpack(str[start:end]) 00171 start = end 00172 end += 4 00173 (length,) = _struct_I.unpack(str[start:end]) 00174 self.data.fields = [] 00175 for i in range(0, length): 00176 val1 = sensor_msgs.msg.PointField() 00177 start = end 00178 end += 4 00179 (length,) = _struct_I.unpack(str[start:end]) 00180 start = end 00181 end += length 00182 val1.name = str[start:end] 00183 _x = val1 00184 start = end 00185 end += 9 00186 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end]) 00187 self.data.fields.append(val1) 00188 _x = self 00189 start = end 00190 end += 9 00191 (_x.data.is_bigendian, _x.data.point_step, _x.data.row_step,) = _struct_B2I.unpack(str[start:end]) 00192 self.data.is_bigendian = bool(self.data.is_bigendian) 00193 start = end 00194 end += 4 00195 (length,) = _struct_I.unpack(str[start:end]) 00196 start = end 00197 end += length 00198 self.data.data = str[start:end] 00199 start = end 00200 end += 1 00201 (self.data.is_dense,) = _struct_B.unpack(str[start:end]) 00202 self.data.is_dense = bool(self.data.is_dense) 00203 return self 00204 except struct.error as e: 00205 raise roslib.message.DeserializationError(e) #most likely buffer underfill 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_3I.pack(_x.data.header.seq, _x.data.header.stamp.secs, _x.data.header.stamp.nsecs)) 00219 _x = self.data.header.frame_id 00220 length = len(_x) 00221 buff.write(struct.pack('<I%ss'%length, length, _x)) 00222 _x = self 00223 buff.write(_struct_2I.pack(_x.data.height, _x.data.width)) 00224 length = len(self.data.fields) 00225 buff.write(_struct_I.pack(length)) 00226 for val1 in self.data.fields: 00227 _x = val1.name 00228 length = len(_x) 00229 buff.write(struct.pack('<I%ss'%length, length, _x)) 00230 _x = val1 00231 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count)) 00232 _x = self 00233 buff.write(_struct_B2I.pack(_x.data.is_bigendian, _x.data.point_step, _x.data.row_step)) 00234 _x = self.data.data 00235 length = len(_x) 00236 # - if encoded as a list instead, serialize as bytes instead of string 00237 if type(_x) in [list, tuple]: 00238 buff.write(struct.pack('<I%sB'%length, length, *_x)) 00239 else: 00240 buff.write(struct.pack('<I%ss'%length, length, _x)) 00241 buff.write(_struct_B.pack(self.data.is_dense)) 00242 except struct.error as se: self._check_types(se) 00243 except TypeError as te: self._check_types(te) 00244 00245 def deserialize_numpy(self, str, numpy): 00246 """ 00247 unpack serialized message in str into this message instance using numpy for array types 00248 @param str: byte array of serialized message 00249 @type str: str 00250 @param numpy: numpy python module 00251 @type numpy: module 00252 """ 00253 try: 00254 if self.data is None: 00255 self.data = sensor_msgs.msg.PointCloud2() 00256 end = 0 00257 _x = self 00258 start = end 00259 end += 12 00260 (_x.data.header.seq, _x.data.header.stamp.secs, _x.data.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00261 start = end 00262 end += 4 00263 (length,) = _struct_I.unpack(str[start:end]) 00264 start = end 00265 end += length 00266 self.data.header.frame_id = str[start:end] 00267 _x = self 00268 start = end 00269 end += 8 00270 (_x.data.height, _x.data.width,) = _struct_2I.unpack(str[start:end]) 00271 start = end 00272 end += 4 00273 (length,) = _struct_I.unpack(str[start:end]) 00274 self.data.fields = [] 00275 for i in range(0, length): 00276 val1 = sensor_msgs.msg.PointField() 00277 start = end 00278 end += 4 00279 (length,) = _struct_I.unpack(str[start:end]) 00280 start = end 00281 end += length 00282 val1.name = str[start:end] 00283 _x = val1 00284 start = end 00285 end += 9 00286 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end]) 00287 self.data.fields.append(val1) 00288 _x = self 00289 start = end 00290 end += 9 00291 (_x.data.is_bigendian, _x.data.point_step, _x.data.row_step,) = _struct_B2I.unpack(str[start:end]) 00292 self.data.is_bigendian = bool(self.data.is_bigendian) 00293 start = end 00294 end += 4 00295 (length,) = _struct_I.unpack(str[start:end]) 00296 start = end 00297 end += length 00298 self.data.data = str[start:end] 00299 start = end 00300 end += 1 00301 (self.data.is_dense,) = _struct_B.unpack(str[start:end]) 00302 self.data.is_dense = bool(self.data.is_dense) 00303 return self 00304 except struct.error as e: 00305 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00306 00307 _struct_I = roslib.message.struct_I 00308 _struct_IBI = struct.Struct("<IBI") 00309 _struct_3I = struct.Struct("<3I") 00310 _struct_B = struct.Struct("<B") 00311 _struct_2I = struct.Struct("<2I") 00312 _struct_B2I = struct.Struct("<B2I") 00313 """autogenerated by genmsg_py from GetPoseResponse.msg. Do not edit.""" 00314 import roslib.message 00315 import struct 00316 00317 import geometry_msgs.msg 00318 import std_msgs.msg 00319 00320 class GetPoseResponse(roslib.message.Message): 00321 _md5sum = "f78936c7b8a2846339c5342aea067b14" 00322 _type = "table_pose/GetPoseResponse" 00323 _has_header = False #flag to mark the presence of a Header object 00324 _full_text = """geometry_msgs/PoseStamped table_pose 00325 00326 00327 00328 ================================================================================ 00329 MSG: geometry_msgs/PoseStamped 00330 # A Pose with reference coordinate frame and timestamp 00331 Header header 00332 Pose pose 00333 00334 ================================================================================ 00335 MSG: std_msgs/Header 00336 # Standard metadata for higher-level stamped data types. 00337 # This is generally used to communicate timestamped data 00338 # in a particular coordinate frame. 00339 # 00340 # sequence ID: consecutively increasing ID 00341 uint32 seq 00342 #Two-integer timestamp that is expressed as: 00343 # * stamp.secs: seconds (stamp_secs) since epoch 00344 # * stamp.nsecs: nanoseconds since stamp_secs 00345 # time-handling sugar is provided by the client library 00346 time stamp 00347 #Frame this data is associated with 00348 # 0: no frame 00349 # 1: global frame 00350 string frame_id 00351 00352 ================================================================================ 00353 MSG: geometry_msgs/Pose 00354 # A representation of pose in free space, composed of postion and orientation. 00355 Point position 00356 Quaternion orientation 00357 00358 ================================================================================ 00359 MSG: geometry_msgs/Point 00360 # This contains the position of a point in free space 00361 float64 x 00362 float64 y 00363 float64 z 00364 00365 ================================================================================ 00366 MSG: geometry_msgs/Quaternion 00367 # This represents an orientation in free space in quaternion form. 00368 00369 float64 x 00370 float64 y 00371 float64 z 00372 float64 w 00373 00374 """ 00375 __slots__ = ['table_pose'] 00376 _slot_types = ['geometry_msgs/PoseStamped'] 00377 00378 def __init__(self, *args, **kwds): 00379 """ 00380 Constructor. Any message fields that are implicitly/explicitly 00381 set to None will be assigned a default value. The recommend 00382 use is keyword arguments as this is more robust to future message 00383 changes. You cannot mix in-order arguments and keyword arguments. 00384 00385 The available fields are: 00386 table_pose 00387 00388 @param args: complete set of field values, in .msg order 00389 @param kwds: use keyword arguments corresponding to message field names 00390 to set specific fields. 00391 """ 00392 if args or kwds: 00393 super(GetPoseResponse, self).__init__(*args, **kwds) 00394 #message fields cannot be None, assign default values for those that are 00395 if self.table_pose is None: 00396 self.table_pose = geometry_msgs.msg.PoseStamped() 00397 else: 00398 self.table_pose = geometry_msgs.msg.PoseStamped() 00399 00400 def _get_types(self): 00401 """ 00402 internal API method 00403 """ 00404 return self._slot_types 00405 00406 def serialize(self, buff): 00407 """ 00408 serialize message into buffer 00409 @param buff: buffer 00410 @type buff: StringIO 00411 """ 00412 try: 00413 _x = self 00414 buff.write(_struct_3I.pack(_x.table_pose.header.seq, _x.table_pose.header.stamp.secs, _x.table_pose.header.stamp.nsecs)) 00415 _x = self.table_pose.header.frame_id 00416 length = len(_x) 00417 buff.write(struct.pack('<I%ss'%length, length, _x)) 00418 _x = self 00419 buff.write(_struct_7d.pack(_x.table_pose.pose.position.x, _x.table_pose.pose.position.y, _x.table_pose.pose.position.z, _x.table_pose.pose.orientation.x, _x.table_pose.pose.orientation.y, _x.table_pose.pose.orientation.z, _x.table_pose.pose.orientation.w)) 00420 except struct.error as se: self._check_types(se) 00421 except TypeError as te: self._check_types(te) 00422 00423 def deserialize(self, str): 00424 """ 00425 unpack serialized message in str into this message instance 00426 @param str: byte array of serialized message 00427 @type str: str 00428 """ 00429 try: 00430 if self.table_pose is None: 00431 self.table_pose = geometry_msgs.msg.PoseStamped() 00432 end = 0 00433 _x = self 00434 start = end 00435 end += 12 00436 (_x.table_pose.header.seq, _x.table_pose.header.stamp.secs, _x.table_pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00437 start = end 00438 end += 4 00439 (length,) = _struct_I.unpack(str[start:end]) 00440 start = end 00441 end += length 00442 self.table_pose.header.frame_id = str[start:end] 00443 _x = self 00444 start = end 00445 end += 56 00446 (_x.table_pose.pose.position.x, _x.table_pose.pose.position.y, _x.table_pose.pose.position.z, _x.table_pose.pose.orientation.x, _x.table_pose.pose.orientation.y, _x.table_pose.pose.orientation.z, _x.table_pose.pose.orientation.w,) = _struct_7d.unpack(str[start:end]) 00447 return self 00448 except struct.error as e: 00449 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00450 00451 00452 def serialize_numpy(self, buff, numpy): 00453 """ 00454 serialize message with numpy array types into buffer 00455 @param buff: buffer 00456 @type buff: StringIO 00457 @param numpy: numpy python module 00458 @type numpy module 00459 """ 00460 try: 00461 _x = self 00462 buff.write(_struct_3I.pack(_x.table_pose.header.seq, _x.table_pose.header.stamp.secs, _x.table_pose.header.stamp.nsecs)) 00463 _x = self.table_pose.header.frame_id 00464 length = len(_x) 00465 buff.write(struct.pack('<I%ss'%length, length, _x)) 00466 _x = self 00467 buff.write(_struct_7d.pack(_x.table_pose.pose.position.x, _x.table_pose.pose.position.y, _x.table_pose.pose.position.z, _x.table_pose.pose.orientation.x, _x.table_pose.pose.orientation.y, _x.table_pose.pose.orientation.z, _x.table_pose.pose.orientation.w)) 00468 except struct.error as se: self._check_types(se) 00469 except TypeError as te: self._check_types(te) 00470 00471 def deserialize_numpy(self, str, numpy): 00472 """ 00473 unpack serialized message in str into this message instance using numpy for array types 00474 @param str: byte array of serialized message 00475 @type str: str 00476 @param numpy: numpy python module 00477 @type numpy: module 00478 """ 00479 try: 00480 if self.table_pose is None: 00481 self.table_pose = geometry_msgs.msg.PoseStamped() 00482 end = 0 00483 _x = self 00484 start = end 00485 end += 12 00486 (_x.table_pose.header.seq, _x.table_pose.header.stamp.secs, _x.table_pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00487 start = end 00488 end += 4 00489 (length,) = _struct_I.unpack(str[start:end]) 00490 start = end 00491 end += length 00492 self.table_pose.header.frame_id = str[start:end] 00493 _x = self 00494 start = end 00495 end += 56 00496 (_x.table_pose.pose.position.x, _x.table_pose.pose.position.y, _x.table_pose.pose.position.z, _x.table_pose.pose.orientation.x, _x.table_pose.pose.orientation.y, _x.table_pose.pose.orientation.z, _x.table_pose.pose.orientation.w,) = _struct_7d.unpack(str[start:end]) 00497 return self 00498 except struct.error as e: 00499 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00500 00501 _struct_I = roslib.message.struct_I 00502 _struct_3I = struct.Struct("<3I") 00503 _struct_7d = struct.Struct("<7d") 00504 class GetPose(roslib.message.ServiceDefinition): 00505 _type = 'table_pose/GetPose' 00506 _md5sum = '81e9d3aaa4af67d8dbbdf94ddcea579a' 00507 _request_class = GetPoseRequest 00508 _response_class = GetPoseResponse