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