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(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00256 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
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 self.goal.cloud.data = str[start:end]
00345 _x = self
00346 start = end
00347 end += 13
00348 (_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])
00349 self.goal.cloud.is_dense = bool(self.goal.cloud.is_dense)
00350 start = end
00351 end += 4
00352 (length,) = _struct_I.unpack(str[start:end])
00353 start = end
00354 end += length
00355 if python3:
00356 self.goal.box_pose.header.frame_id = str[start:end].decode('utf-8')
00357 else:
00358 self.goal.box_pose.header.frame_id = str[start:end]
00359 _x = self
00360 start = end
00361 end += 104
00362 (_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])
00363 return self
00364 except struct.error as e:
00365 raise genpy.DeserializationError(e)
00366
00367
00368 def serialize_numpy(self, buff, numpy):
00369 """
00370 serialize message with numpy array types into buffer
00371 :param buff: buffer, ``StringIO``
00372 :param numpy: numpy python module
00373 """
00374 try:
00375 _x = self
00376 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00377 _x = self.header.frame_id
00378 length = len(_x)
00379 if python3 or type(_x) == unicode:
00380 _x = _x.encode('utf-8')
00381 length = len(_x)
00382 buff.write(struct.pack('<I%ss'%length, length, _x))
00383 _x = self
00384 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs))
00385 _x = self.goal_id.id
00386 length = len(_x)
00387 if python3 or type(_x) == unicode:
00388 _x = _x.encode('utf-8')
00389 length = len(_x)
00390 buff.write(struct.pack('<I%ss'%length, length, _x))
00391 _x = self
00392 buff.write(_struct_3I.pack(_x.goal.cloud.header.seq, _x.goal.cloud.header.stamp.secs, _x.goal.cloud.header.stamp.nsecs))
00393 _x = self.goal.cloud.header.frame_id
00394 length = len(_x)
00395 if python3 or type(_x) == unicode:
00396 _x = _x.encode('utf-8')
00397 length = len(_x)
00398 buff.write(struct.pack('<I%ss'%length, length, _x))
00399 _x = self
00400 buff.write(_struct_2I.pack(_x.goal.cloud.height, _x.goal.cloud.width))
00401 length = len(self.goal.cloud.fields)
00402 buff.write(_struct_I.pack(length))
00403 for val1 in self.goal.cloud.fields:
00404 _x = val1.name
00405 length = len(_x)
00406 if python3 or type(_x) == unicode:
00407 _x = _x.encode('utf-8')
00408 length = len(_x)
00409 buff.write(struct.pack('<I%ss'%length, length, _x))
00410 _x = val1
00411 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00412 _x = self
00413 buff.write(_struct_B2I.pack(_x.goal.cloud.is_bigendian, _x.goal.cloud.point_step, _x.goal.cloud.row_step))
00414 _x = self.goal.cloud.data
00415 length = len(_x)
00416
00417 if type(_x) in [list, tuple]:
00418 buff.write(struct.pack('<I%sB'%length, length, *_x))
00419 else:
00420 buff.write(struct.pack('<I%ss'%length, length, _x))
00421 _x = self
00422 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))
00423 _x = self.goal.box_pose.header.frame_id
00424 length = len(_x)
00425 if python3 or type(_x) == unicode:
00426 _x = _x.encode('utf-8')
00427 length = len(_x)
00428 buff.write(struct.pack('<I%ss'%length, length, _x))
00429 _x = self
00430 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))
00431 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00432 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00433
00434 def deserialize_numpy(self, str, numpy):
00435 """
00436 unpack serialized message in str into this message instance using numpy for array types
00437 :param str: byte array of serialized message, ``str``
00438 :param numpy: numpy python module
00439 """
00440 try:
00441 if self.header is None:
00442 self.header = std_msgs.msg.Header()
00443 if self.goal_id is None:
00444 self.goal_id = actionlib_msgs.msg.GoalID()
00445 if self.goal is None:
00446 self.goal = object_manipulation_msgs.msg.FindContainerGoal()
00447 end = 0
00448 _x = self
00449 start = end
00450 end += 12
00451 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00452 start = end
00453 end += 4
00454 (length,) = _struct_I.unpack(str[start:end])
00455 start = end
00456 end += length
00457 if python3:
00458 self.header.frame_id = str[start:end].decode('utf-8')
00459 else:
00460 self.header.frame_id = str[start:end]
00461 _x = self
00462 start = end
00463 end += 8
00464 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00465 start = end
00466 end += 4
00467 (length,) = _struct_I.unpack(str[start:end])
00468 start = end
00469 end += length
00470 if python3:
00471 self.goal_id.id = str[start:end].decode('utf-8')
00472 else:
00473 self.goal_id.id = str[start:end]
00474 _x = self
00475 start = end
00476 end += 12
00477 (_x.goal.cloud.header.seq, _x.goal.cloud.header.stamp.secs, _x.goal.cloud.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00478 start = end
00479 end += 4
00480 (length,) = _struct_I.unpack(str[start:end])
00481 start = end
00482 end += length
00483 if python3:
00484 self.goal.cloud.header.frame_id = str[start:end].decode('utf-8')
00485 else:
00486 self.goal.cloud.header.frame_id = str[start:end]
00487 _x = self
00488 start = end
00489 end += 8
00490 (_x.goal.cloud.height, _x.goal.cloud.width,) = _struct_2I.unpack(str[start:end])
00491 start = end
00492 end += 4
00493 (length,) = _struct_I.unpack(str[start:end])
00494 self.goal.cloud.fields = []
00495 for i in range(0, length):
00496 val1 = sensor_msgs.msg.PointField()
00497 start = end
00498 end += 4
00499 (length,) = _struct_I.unpack(str[start:end])
00500 start = end
00501 end += length
00502 if python3:
00503 val1.name = str[start:end].decode('utf-8')
00504 else:
00505 val1.name = str[start:end]
00506 _x = val1
00507 start = end
00508 end += 9
00509 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00510 self.goal.cloud.fields.append(val1)
00511 _x = self
00512 start = end
00513 end += 9
00514 (_x.goal.cloud.is_bigendian, _x.goal.cloud.point_step, _x.goal.cloud.row_step,) = _struct_B2I.unpack(str[start:end])
00515 self.goal.cloud.is_bigendian = bool(self.goal.cloud.is_bigendian)
00516 start = end
00517 end += 4
00518 (length,) = _struct_I.unpack(str[start:end])
00519 start = end
00520 end += length
00521 self.goal.cloud.data = str[start:end]
00522 _x = self
00523 start = end
00524 end += 13
00525 (_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])
00526 self.goal.cloud.is_dense = bool(self.goal.cloud.is_dense)
00527 start = end
00528 end += 4
00529 (length,) = _struct_I.unpack(str[start:end])
00530 start = end
00531 end += length
00532 if python3:
00533 self.goal.box_pose.header.frame_id = str[start:end].decode('utf-8')
00534 else:
00535 self.goal.box_pose.header.frame_id = str[start:end]
00536 _x = self
00537 start = end
00538 end += 104
00539 (_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])
00540 return self
00541 except struct.error as e:
00542 raise genpy.DeserializationError(e)
00543
00544 _struct_I = genpy.struct_I
00545 _struct_IBI = struct.Struct("<IBI")
00546 _struct_13d = struct.Struct("<13d")
00547 _struct_3I = struct.Struct("<3I")
00548 _struct_B3I = struct.Struct("<B3I")
00549 _struct_B2I = struct.Struct("<B2I")
00550 _struct_2I = struct.Struct("<2I")