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