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