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