00001 """autogenerated by genpy from pr2_grasp_adjust/GraspAdjustActionGoal.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 actionlib_msgs.msg
00008 import geometry_msgs.msg
00009 import sensor_msgs.msg
00010 import pr2_grasp_adjust.msg
00011 import genpy
00012 import std_msgs.msg
00013
00014 class GraspAdjustActionGoal(genpy.Message):
00015 _md5sum = "dcec75de1b67ec577ef7d0e121194cb5"
00016 _type = "pr2_grasp_adjust/GraspAdjustActionGoal"
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 GraspAdjustGoal 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: pr2_grasp_adjust/GraspAdjustGoal
00057 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00058 #goal definition
00059
00060 sensor_msgs/PointCloud2 cloud
00061 geometry_msgs/PoseStamped pose_stamped
00062 bool use_orientation
00063 int32 seed_index
00064 uint8 search_mode
00065
00066 int32 GLOBAL_SEARCH = 0
00067 int32 LOCAL_SEARCH = 1
00068 int32 SINGLE_POSE = 2
00069
00070
00071 ================================================================================
00072 MSG: sensor_msgs/PointCloud2
00073 # This message holds a collection of N-dimensional points, which may
00074 # contain additional information such as normals, intensity, etc. The
00075 # point data is stored as a binary blob, its layout described by the
00076 # contents of the "fields" array.
00077
00078 # The point cloud data may be organized 2d (image-like) or 1d
00079 # (unordered). Point clouds organized as 2d images may be produced by
00080 # camera depth sensors such as stereo or time-of-flight.
00081
00082 # Time of sensor data acquisition, and the coordinate frame ID (for 3d
00083 # points).
00084 Header header
00085
00086 # 2D structure of the point cloud. If the cloud is unordered, height is
00087 # 1 and width is the length of the point cloud.
00088 uint32 height
00089 uint32 width
00090
00091 # Describes the channels and their layout in the binary data blob.
00092 PointField[] fields
00093
00094 bool is_bigendian # Is this data bigendian?
00095 uint32 point_step # Length of a point in bytes
00096 uint32 row_step # Length of a row in bytes
00097 uint8[] data # Actual point data, size is (row_step*height)
00098
00099 bool is_dense # True if there are no invalid points
00100
00101 ================================================================================
00102 MSG: sensor_msgs/PointField
00103 # This message holds the description of one point entry in the
00104 # PointCloud2 message format.
00105 uint8 INT8 = 1
00106 uint8 UINT8 = 2
00107 uint8 INT16 = 3
00108 uint8 UINT16 = 4
00109 uint8 INT32 = 5
00110 uint8 UINT32 = 6
00111 uint8 FLOAT32 = 7
00112 uint8 FLOAT64 = 8
00113
00114 string name # Name of field
00115 uint32 offset # Offset from start of point struct
00116 uint8 datatype # Datatype enumeration, see above
00117 uint32 count # How many elements in the field
00118
00119 ================================================================================
00120 MSG: geometry_msgs/PoseStamped
00121 # A Pose with reference coordinate frame and timestamp
00122 Header header
00123 Pose pose
00124
00125 ================================================================================
00126 MSG: geometry_msgs/Pose
00127 # A representation of pose in free space, composed of postion and orientation.
00128 Point position
00129 Quaternion orientation
00130
00131 ================================================================================
00132 MSG: geometry_msgs/Point
00133 # This contains the position of a point in free space
00134 float64 x
00135 float64 y
00136 float64 z
00137
00138 ================================================================================
00139 MSG: geometry_msgs/Quaternion
00140 # This represents an orientation in free space in quaternion form.
00141
00142 float64 x
00143 float64 y
00144 float64 z
00145 float64 w
00146
00147 """
00148 __slots__ = ['header','goal_id','goal']
00149 _slot_types = ['std_msgs/Header','actionlib_msgs/GoalID','pr2_grasp_adjust/GraspAdjustGoal']
00150
00151 def __init__(self, *args, **kwds):
00152 """
00153 Constructor. Any message fields that are implicitly/explicitly
00154 set to None will be assigned a default value. The recommend
00155 use is keyword arguments as this is more robust to future message
00156 changes. You cannot mix in-order arguments and keyword arguments.
00157
00158 The available fields are:
00159 header,goal_id,goal
00160
00161 :param args: complete set of field values, in .msg order
00162 :param kwds: use keyword arguments corresponding to message field names
00163 to set specific fields.
00164 """
00165 if args or kwds:
00166 super(GraspAdjustActionGoal, self).__init__(*args, **kwds)
00167
00168 if self.header is None:
00169 self.header = std_msgs.msg.Header()
00170 if self.goal_id is None:
00171 self.goal_id = actionlib_msgs.msg.GoalID()
00172 if self.goal is None:
00173 self.goal = pr2_grasp_adjust.msg.GraspAdjustGoal()
00174 else:
00175 self.header = std_msgs.msg.Header()
00176 self.goal_id = actionlib_msgs.msg.GoalID()
00177 self.goal = pr2_grasp_adjust.msg.GraspAdjustGoal()
00178
00179 def _get_types(self):
00180 """
00181 internal API method
00182 """
00183 return self._slot_types
00184
00185 def serialize(self, buff):
00186 """
00187 serialize message into buffer
00188 :param buff: buffer, ``StringIO``
00189 """
00190 try:
00191 _x = self
00192 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00193 _x = self.header.frame_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 _x = self
00200 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs))
00201 _x = self.goal_id.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_3I.pack(_x.goal.cloud.header.seq, _x.goal.cloud.header.stamp.secs, _x.goal.cloud.header.stamp.nsecs))
00209 _x = self.goal.cloud.header.frame_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_2I.pack(_x.goal.cloud.height, _x.goal.cloud.width))
00217 length = len(self.goal.cloud.fields)
00218 buff.write(_struct_I.pack(length))
00219 for val1 in self.goal.cloud.fields:
00220 _x = val1.name
00221 length = len(_x)
00222 if python3 or type(_x) == unicode:
00223 _x = _x.encode('utf-8')
00224 length = len(_x)
00225 buff.write(struct.pack('<I%ss'%length, length, _x))
00226 _x = val1
00227 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00228 _x = self
00229 buff.write(_struct_B2I.pack(_x.goal.cloud.is_bigendian, _x.goal.cloud.point_step, _x.goal.cloud.row_step))
00230 _x = self.goal.cloud.data
00231 length = len(_x)
00232
00233 if type(_x) in [list, tuple]:
00234 buff.write(struct.pack('<I%sB'%length, length, *_x))
00235 else:
00236 buff.write(struct.pack('<I%ss'%length, length, _x))
00237 _x = self
00238 buff.write(_struct_B3I.pack(_x.goal.cloud.is_dense, _x.goal.pose_stamped.header.seq, _x.goal.pose_stamped.header.stamp.secs, _x.goal.pose_stamped.header.stamp.nsecs))
00239 _x = self.goal.pose_stamped.header.frame_id
00240 length = len(_x)
00241 if python3 or type(_x) == unicode:
00242 _x = _x.encode('utf-8')
00243 length = len(_x)
00244 buff.write(struct.pack('<I%ss'%length, length, _x))
00245 _x = self
00246 buff.write(_struct_7dBiB.pack(_x.goal.pose_stamped.pose.position.x, _x.goal.pose_stamped.pose.position.y, _x.goal.pose_stamped.pose.position.z, _x.goal.pose_stamped.pose.orientation.x, _x.goal.pose_stamped.pose.orientation.y, _x.goal.pose_stamped.pose.orientation.z, _x.goal.pose_stamped.pose.orientation.w, _x.goal.use_orientation, _x.goal.seed_index, _x.goal.search_mode))
00247 except struct.error as se: self._check_types(se)
00248 except TypeError as te: self._check_types(te)
00249
00250 def deserialize(self, str):
00251 """
00252 unpack serialized message in str into this message instance
00253 :param str: byte array of serialized message, ``str``
00254 """
00255 try:
00256 if self.header is None:
00257 self.header = std_msgs.msg.Header()
00258 if self.goal_id is None:
00259 self.goal_id = actionlib_msgs.msg.GoalID()
00260 if self.goal is None:
00261 self.goal = pr2_grasp_adjust.msg.GraspAdjustGoal()
00262 end = 0
00263 _x = self
00264 start = end
00265 end += 12
00266 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00267 start = end
00268 end += 4
00269 (length,) = _struct_I.unpack(str[start:end])
00270 start = end
00271 end += length
00272 if python3:
00273 self.header.frame_id = str[start:end].decode('utf-8')
00274 else:
00275 self.header.frame_id = str[start:end]
00276 _x = self
00277 start = end
00278 end += 8
00279 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00280 start = end
00281 end += 4
00282 (length,) = _struct_I.unpack(str[start:end])
00283 start = end
00284 end += length
00285 if python3:
00286 self.goal_id.id = str[start:end].decode('utf-8')
00287 else:
00288 self.goal_id.id = str[start:end]
00289 _x = self
00290 start = end
00291 end += 12
00292 (_x.goal.cloud.header.seq, _x.goal.cloud.header.stamp.secs, _x.goal.cloud.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00293 start = end
00294 end += 4
00295 (length,) = _struct_I.unpack(str[start:end])
00296 start = end
00297 end += length
00298 if python3:
00299 self.goal.cloud.header.frame_id = str[start:end].decode('utf-8')
00300 else:
00301 self.goal.cloud.header.frame_id = str[start:end]
00302 _x = self
00303 start = end
00304 end += 8
00305 (_x.goal.cloud.height, _x.goal.cloud.width,) = _struct_2I.unpack(str[start:end])
00306 start = end
00307 end += 4
00308 (length,) = _struct_I.unpack(str[start:end])
00309 self.goal.cloud.fields = []
00310 for i in range(0, length):
00311 val1 = sensor_msgs.msg.PointField()
00312 start = end
00313 end += 4
00314 (length,) = _struct_I.unpack(str[start:end])
00315 start = end
00316 end += length
00317 if python3:
00318 val1.name = str[start:end].decode('utf-8')
00319 else:
00320 val1.name = str[start:end]
00321 _x = val1
00322 start = end
00323 end += 9
00324 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00325 self.goal.cloud.fields.append(val1)
00326 _x = self
00327 start = end
00328 end += 9
00329 (_x.goal.cloud.is_bigendian, _x.goal.cloud.point_step, _x.goal.cloud.row_step,) = _struct_B2I.unpack(str[start:end])
00330 self.goal.cloud.is_bigendian = bool(self.goal.cloud.is_bigendian)
00331 start = end
00332 end += 4
00333 (length,) = _struct_I.unpack(str[start:end])
00334 start = end
00335 end += length
00336 if python3:
00337 self.goal.cloud.data = str[start:end].decode('utf-8')
00338 else:
00339 self.goal.cloud.data = str[start:end]
00340 _x = self
00341 start = end
00342 end += 13
00343 (_x.goal.cloud.is_dense, _x.goal.pose_stamped.header.seq, _x.goal.pose_stamped.header.stamp.secs, _x.goal.pose_stamped.header.stamp.nsecs,) = _struct_B3I.unpack(str[start:end])
00344 self.goal.cloud.is_dense = bool(self.goal.cloud.is_dense)
00345 start = end
00346 end += 4
00347 (length,) = _struct_I.unpack(str[start:end])
00348 start = end
00349 end += length
00350 if python3:
00351 self.goal.pose_stamped.header.frame_id = str[start:end].decode('utf-8')
00352 else:
00353 self.goal.pose_stamped.header.frame_id = str[start:end]
00354 _x = self
00355 start = end
00356 end += 62
00357 (_x.goal.pose_stamped.pose.position.x, _x.goal.pose_stamped.pose.position.y, _x.goal.pose_stamped.pose.position.z, _x.goal.pose_stamped.pose.orientation.x, _x.goal.pose_stamped.pose.orientation.y, _x.goal.pose_stamped.pose.orientation.z, _x.goal.pose_stamped.pose.orientation.w, _x.goal.use_orientation, _x.goal.seed_index, _x.goal.search_mode,) = _struct_7dBiB.unpack(str[start:end])
00358 self.goal.use_orientation = bool(self.goal.use_orientation)
00359 return self
00360 except struct.error as e:
00361 raise genpy.DeserializationError(e)
00362
00363
00364 def serialize_numpy(self, buff, numpy):
00365 """
00366 serialize message with numpy array types into buffer
00367 :param buff: buffer, ``StringIO``
00368 :param numpy: numpy python module
00369 """
00370 try:
00371 _x = self
00372 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00373 _x = self.header.frame_id
00374 length = len(_x)
00375 if python3 or type(_x) == unicode:
00376 _x = _x.encode('utf-8')
00377 length = len(_x)
00378 buff.write(struct.pack('<I%ss'%length, length, _x))
00379 _x = self
00380 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs))
00381 _x = self.goal_id.id
00382 length = len(_x)
00383 if python3 or type(_x) == unicode:
00384 _x = _x.encode('utf-8')
00385 length = len(_x)
00386 buff.write(struct.pack('<I%ss'%length, length, _x))
00387 _x = self
00388 buff.write(_struct_3I.pack(_x.goal.cloud.header.seq, _x.goal.cloud.header.stamp.secs, _x.goal.cloud.header.stamp.nsecs))
00389 _x = self.goal.cloud.header.frame_id
00390 length = len(_x)
00391 if python3 or type(_x) == unicode:
00392 _x = _x.encode('utf-8')
00393 length = len(_x)
00394 buff.write(struct.pack('<I%ss'%length, length, _x))
00395 _x = self
00396 buff.write(_struct_2I.pack(_x.goal.cloud.height, _x.goal.cloud.width))
00397 length = len(self.goal.cloud.fields)
00398 buff.write(_struct_I.pack(length))
00399 for val1 in self.goal.cloud.fields:
00400 _x = val1.name
00401 length = len(_x)
00402 if python3 or type(_x) == unicode:
00403 _x = _x.encode('utf-8')
00404 length = len(_x)
00405 buff.write(struct.pack('<I%ss'%length, length, _x))
00406 _x = val1
00407 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00408 _x = self
00409 buff.write(_struct_B2I.pack(_x.goal.cloud.is_bigendian, _x.goal.cloud.point_step, _x.goal.cloud.row_step))
00410 _x = self.goal.cloud.data
00411 length = len(_x)
00412
00413 if type(_x) in [list, tuple]:
00414 buff.write(struct.pack('<I%sB'%length, length, *_x))
00415 else:
00416 buff.write(struct.pack('<I%ss'%length, length, _x))
00417 _x = self
00418 buff.write(_struct_B3I.pack(_x.goal.cloud.is_dense, _x.goal.pose_stamped.header.seq, _x.goal.pose_stamped.header.stamp.secs, _x.goal.pose_stamped.header.stamp.nsecs))
00419 _x = self.goal.pose_stamped.header.frame_id
00420 length = len(_x)
00421 if python3 or type(_x) == unicode:
00422 _x = _x.encode('utf-8')
00423 length = len(_x)
00424 buff.write(struct.pack('<I%ss'%length, length, _x))
00425 _x = self
00426 buff.write(_struct_7dBiB.pack(_x.goal.pose_stamped.pose.position.x, _x.goal.pose_stamped.pose.position.y, _x.goal.pose_stamped.pose.position.z, _x.goal.pose_stamped.pose.orientation.x, _x.goal.pose_stamped.pose.orientation.y, _x.goal.pose_stamped.pose.orientation.z, _x.goal.pose_stamped.pose.orientation.w, _x.goal.use_orientation, _x.goal.seed_index, _x.goal.search_mode))
00427 except struct.error as se: self._check_types(se)
00428 except TypeError as te: self._check_types(te)
00429
00430 def deserialize_numpy(self, str, numpy):
00431 """
00432 unpack serialized message in str into this message instance using numpy for array types
00433 :param str: byte array of serialized message, ``str``
00434 :param numpy: numpy python module
00435 """
00436 try:
00437 if self.header is None:
00438 self.header = std_msgs.msg.Header()
00439 if self.goal_id is None:
00440 self.goal_id = actionlib_msgs.msg.GoalID()
00441 if self.goal is None:
00442 self.goal = pr2_grasp_adjust.msg.GraspAdjustGoal()
00443 end = 0
00444 _x = self
00445 start = end
00446 end += 12
00447 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00448 start = end
00449 end += 4
00450 (length,) = _struct_I.unpack(str[start:end])
00451 start = end
00452 end += length
00453 if python3:
00454 self.header.frame_id = str[start:end].decode('utf-8')
00455 else:
00456 self.header.frame_id = str[start:end]
00457 _x = self
00458 start = end
00459 end += 8
00460 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00461 start = end
00462 end += 4
00463 (length,) = _struct_I.unpack(str[start:end])
00464 start = end
00465 end += length
00466 if python3:
00467 self.goal_id.id = str[start:end].decode('utf-8')
00468 else:
00469 self.goal_id.id = str[start:end]
00470 _x = self
00471 start = end
00472 end += 12
00473 (_x.goal.cloud.header.seq, _x.goal.cloud.header.stamp.secs, _x.goal.cloud.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00474 start = end
00475 end += 4
00476 (length,) = _struct_I.unpack(str[start:end])
00477 start = end
00478 end += length
00479 if python3:
00480 self.goal.cloud.header.frame_id = str[start:end].decode('utf-8')
00481 else:
00482 self.goal.cloud.header.frame_id = str[start:end]
00483 _x = self
00484 start = end
00485 end += 8
00486 (_x.goal.cloud.height, _x.goal.cloud.width,) = _struct_2I.unpack(str[start:end])
00487 start = end
00488 end += 4
00489 (length,) = _struct_I.unpack(str[start:end])
00490 self.goal.cloud.fields = []
00491 for i in range(0, length):
00492 val1 = sensor_msgs.msg.PointField()
00493 start = end
00494 end += 4
00495 (length,) = _struct_I.unpack(str[start:end])
00496 start = end
00497 end += length
00498 if python3:
00499 val1.name = str[start:end].decode('utf-8')
00500 else:
00501 val1.name = str[start:end]
00502 _x = val1
00503 start = end
00504 end += 9
00505 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00506 self.goal.cloud.fields.append(val1)
00507 _x = self
00508 start = end
00509 end += 9
00510 (_x.goal.cloud.is_bigendian, _x.goal.cloud.point_step, _x.goal.cloud.row_step,) = _struct_B2I.unpack(str[start:end])
00511 self.goal.cloud.is_bigendian = bool(self.goal.cloud.is_bigendian)
00512 start = end
00513 end += 4
00514 (length,) = _struct_I.unpack(str[start:end])
00515 start = end
00516 end += length
00517 if python3:
00518 self.goal.cloud.data = str[start:end].decode('utf-8')
00519 else:
00520 self.goal.cloud.data = str[start:end]
00521 _x = self
00522 start = end
00523 end += 13
00524 (_x.goal.cloud.is_dense, _x.goal.pose_stamped.header.seq, _x.goal.pose_stamped.header.stamp.secs, _x.goal.pose_stamped.header.stamp.nsecs,) = _struct_B3I.unpack(str[start:end])
00525 self.goal.cloud.is_dense = bool(self.goal.cloud.is_dense)
00526 start = end
00527 end += 4
00528 (length,) = _struct_I.unpack(str[start:end])
00529 start = end
00530 end += length
00531 if python3:
00532 self.goal.pose_stamped.header.frame_id = str[start:end].decode('utf-8')
00533 else:
00534 self.goal.pose_stamped.header.frame_id = str[start:end]
00535 _x = self
00536 start = end
00537 end += 62
00538 (_x.goal.pose_stamped.pose.position.x, _x.goal.pose_stamped.pose.position.y, _x.goal.pose_stamped.pose.position.z, _x.goal.pose_stamped.pose.orientation.x, _x.goal.pose_stamped.pose.orientation.y, _x.goal.pose_stamped.pose.orientation.z, _x.goal.pose_stamped.pose.orientation.w, _x.goal.use_orientation, _x.goal.seed_index, _x.goal.search_mode,) = _struct_7dBiB.unpack(str[start:end])
00539 self.goal.use_orientation = bool(self.goal.use_orientation)
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_3I = struct.Struct("<3I")
00547 _struct_B3I = struct.Struct("<B3I")
00548 _struct_B2I = struct.Struct("<B2I")
00549 _struct_7dBiB = struct.Struct("<7dBiB")
00550 _struct_2I = struct.Struct("<2I")