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