$search
00001 """autogenerated by genmsg_py from AcquireObjectImageActionGoal.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import cob_object_detection_msgs.msg 00006 import geometry_msgs.msg 00007 import roslib.rostime 00008 import actionlib_msgs.msg 00009 import std_msgs.msg 00010 00011 class AcquireObjectImageActionGoal(roslib.message.Message): 00012 _md5sum = "5d81769387c56e38175f36d1b8297c93" 00013 _type = "cob_object_detection_msgs/AcquireObjectImageActionGoal" 00014 _has_header = True #flag to mark the presence of a Header object 00015 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00016 00017 Header header 00018 actionlib_msgs/GoalID goal_id 00019 AcquireObjectImageGoal goal 00020 00021 ================================================================================ 00022 MSG: std_msgs/Header 00023 # Standard metadata for higher-level stamped data types. 00024 # This is generally used to communicate timestamped data 00025 # in a particular coordinate frame. 00026 # 00027 # sequence ID: consecutively increasing ID 00028 uint32 seq 00029 #Two-integer timestamp that is expressed as: 00030 # * stamp.secs: seconds (stamp_secs) since epoch 00031 # * stamp.nsecs: nanoseconds since stamp_secs 00032 # time-handling sugar is provided by the client library 00033 time stamp 00034 #Frame this data is associated with 00035 # 0: no frame 00036 # 1: global frame 00037 string frame_id 00038 00039 ================================================================================ 00040 MSG: actionlib_msgs/GoalID 00041 # The stamp should store the time at which this goal was requested. 00042 # It is used by an action server when it tries to preempt all 00043 # goals that were requested before a certain time 00044 time stamp 00045 00046 # The id provides a way to associate feedback and 00047 # result message with specific goal requests. The id 00048 # specified must be unique. 00049 string id 00050 00051 00052 ================================================================================ 00053 MSG: cob_object_detection_msgs/AcquireObjectImageGoal 00054 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00055 # The goal 00056 string object_name 00057 bool reset_image_counter 00058 geometry_msgs/PoseStamped pose 00059 geometry_msgs/PoseStamped[] sdh_joints 00060 00061 ================================================================================ 00062 MSG: geometry_msgs/PoseStamped 00063 # A Pose with reference coordinate frame and timestamp 00064 Header header 00065 Pose pose 00066 00067 ================================================================================ 00068 MSG: geometry_msgs/Pose 00069 # A representation of pose in free space, composed of postion and orientation. 00070 Point position 00071 Quaternion orientation 00072 00073 ================================================================================ 00074 MSG: geometry_msgs/Point 00075 # This contains the position of a point in free space 00076 float64 x 00077 float64 y 00078 float64 z 00079 00080 ================================================================================ 00081 MSG: geometry_msgs/Quaternion 00082 # This represents an orientation in free space in quaternion form. 00083 00084 float64 x 00085 float64 y 00086 float64 z 00087 float64 w 00088 00089 """ 00090 __slots__ = ['header','goal_id','goal'] 00091 _slot_types = ['Header','actionlib_msgs/GoalID','cob_object_detection_msgs/AcquireObjectImageGoal'] 00092 00093 def __init__(self, *args, **kwds): 00094 """ 00095 Constructor. Any message fields that are implicitly/explicitly 00096 set to None will be assigned a default value. The recommend 00097 use is keyword arguments as this is more robust to future message 00098 changes. You cannot mix in-order arguments and keyword arguments. 00099 00100 The available fields are: 00101 header,goal_id,goal 00102 00103 @param args: complete set of field values, in .msg order 00104 @param kwds: use keyword arguments corresponding to message field names 00105 to set specific fields. 00106 """ 00107 if args or kwds: 00108 super(AcquireObjectImageActionGoal, self).__init__(*args, **kwds) 00109 #message fields cannot be None, assign default values for those that are 00110 if self.header is None: 00111 self.header = std_msgs.msg._Header.Header() 00112 if self.goal_id is None: 00113 self.goal_id = actionlib_msgs.msg.GoalID() 00114 if self.goal is None: 00115 self.goal = cob_object_detection_msgs.msg.AcquireObjectImageGoal() 00116 else: 00117 self.header = std_msgs.msg._Header.Header() 00118 self.goal_id = actionlib_msgs.msg.GoalID() 00119 self.goal = cob_object_detection_msgs.msg.AcquireObjectImageGoal() 00120 00121 def _get_types(self): 00122 """ 00123 internal API method 00124 """ 00125 return self._slot_types 00126 00127 def serialize(self, buff): 00128 """ 00129 serialize message into buffer 00130 @param buff: buffer 00131 @type buff: StringIO 00132 """ 00133 try: 00134 _x = self 00135 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00136 _x = self.header.frame_id 00137 length = len(_x) 00138 buff.write(struct.pack('<I%ss'%length, length, _x)) 00139 _x = self 00140 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs)) 00141 _x = self.goal_id.id 00142 length = len(_x) 00143 buff.write(struct.pack('<I%ss'%length, length, _x)) 00144 _x = self.goal.object_name 00145 length = len(_x) 00146 buff.write(struct.pack('<I%ss'%length, length, _x)) 00147 _x = self 00148 buff.write(_struct_B3I.pack(_x.goal.reset_image_counter, _x.goal.pose.header.seq, _x.goal.pose.header.stamp.secs, _x.goal.pose.header.stamp.nsecs)) 00149 _x = self.goal.pose.header.frame_id 00150 length = len(_x) 00151 buff.write(struct.pack('<I%ss'%length, length, _x)) 00152 _x = self 00153 buff.write(_struct_7d.pack(_x.goal.pose.pose.position.x, _x.goal.pose.pose.position.y, _x.goal.pose.pose.position.z, _x.goal.pose.pose.orientation.x, _x.goal.pose.pose.orientation.y, _x.goal.pose.pose.orientation.z, _x.goal.pose.pose.orientation.w)) 00154 length = len(self.goal.sdh_joints) 00155 buff.write(_struct_I.pack(length)) 00156 for val1 in self.goal.sdh_joints: 00157 _v1 = val1.header 00158 buff.write(_struct_I.pack(_v1.seq)) 00159 _v2 = _v1.stamp 00160 _x = _v2 00161 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00162 _x = _v1.frame_id 00163 length = len(_x) 00164 buff.write(struct.pack('<I%ss'%length, length, _x)) 00165 _v3 = val1.pose 00166 _v4 = _v3.position 00167 _x = _v4 00168 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00169 _v5 = _v3.orientation 00170 _x = _v5 00171 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00172 except struct.error as se: self._check_types(se) 00173 except TypeError as te: self._check_types(te) 00174 00175 def deserialize(self, str): 00176 """ 00177 unpack serialized message in str into this message instance 00178 @param str: byte array of serialized message 00179 @type str: str 00180 """ 00181 try: 00182 if self.header is None: 00183 self.header = std_msgs.msg._Header.Header() 00184 if self.goal_id is None: 00185 self.goal_id = actionlib_msgs.msg.GoalID() 00186 if self.goal is None: 00187 self.goal = cob_object_detection_msgs.msg.AcquireObjectImageGoal() 00188 end = 0 00189 _x = self 00190 start = end 00191 end += 12 00192 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00193 start = end 00194 end += 4 00195 (length,) = _struct_I.unpack(str[start:end]) 00196 start = end 00197 end += length 00198 self.header.frame_id = str[start:end] 00199 _x = self 00200 start = end 00201 end += 8 00202 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00203 start = end 00204 end += 4 00205 (length,) = _struct_I.unpack(str[start:end]) 00206 start = end 00207 end += length 00208 self.goal_id.id = str[start:end] 00209 start = end 00210 end += 4 00211 (length,) = _struct_I.unpack(str[start:end]) 00212 start = end 00213 end += length 00214 self.goal.object_name = str[start:end] 00215 _x = self 00216 start = end 00217 end += 13 00218 (_x.goal.reset_image_counter, _x.goal.pose.header.seq, _x.goal.pose.header.stamp.secs, _x.goal.pose.header.stamp.nsecs,) = _struct_B3I.unpack(str[start:end]) 00219 self.goal.reset_image_counter = bool(self.goal.reset_image_counter) 00220 start = end 00221 end += 4 00222 (length,) = _struct_I.unpack(str[start:end]) 00223 start = end 00224 end += length 00225 self.goal.pose.header.frame_id = str[start:end] 00226 _x = self 00227 start = end 00228 end += 56 00229 (_x.goal.pose.pose.position.x, _x.goal.pose.pose.position.y, _x.goal.pose.pose.position.z, _x.goal.pose.pose.orientation.x, _x.goal.pose.pose.orientation.y, _x.goal.pose.pose.orientation.z, _x.goal.pose.pose.orientation.w,) = _struct_7d.unpack(str[start:end]) 00230 start = end 00231 end += 4 00232 (length,) = _struct_I.unpack(str[start:end]) 00233 self.goal.sdh_joints = [] 00234 for i in range(0, length): 00235 val1 = geometry_msgs.msg.PoseStamped() 00236 _v6 = val1.header 00237 start = end 00238 end += 4 00239 (_v6.seq,) = _struct_I.unpack(str[start:end]) 00240 _v7 = _v6.stamp 00241 _x = _v7 00242 start = end 00243 end += 8 00244 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00245 start = end 00246 end += 4 00247 (length,) = _struct_I.unpack(str[start:end]) 00248 start = end 00249 end += length 00250 _v6.frame_id = str[start:end] 00251 _v8 = val1.pose 00252 _v9 = _v8.position 00253 _x = _v9 00254 start = end 00255 end += 24 00256 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00257 _v10 = _v8.orientation 00258 _x = _v10 00259 start = end 00260 end += 32 00261 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00262 self.goal.sdh_joints.append(val1) 00263 return self 00264 except struct.error as e: 00265 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00266 00267 00268 def serialize_numpy(self, buff, numpy): 00269 """ 00270 serialize message with numpy array types into buffer 00271 @param buff: buffer 00272 @type buff: StringIO 00273 @param numpy: numpy python module 00274 @type numpy module 00275 """ 00276 try: 00277 _x = self 00278 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00279 _x = self.header.frame_id 00280 length = len(_x) 00281 buff.write(struct.pack('<I%ss'%length, length, _x)) 00282 _x = self 00283 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs)) 00284 _x = self.goal_id.id 00285 length = len(_x) 00286 buff.write(struct.pack('<I%ss'%length, length, _x)) 00287 _x = self.goal.object_name 00288 length = len(_x) 00289 buff.write(struct.pack('<I%ss'%length, length, _x)) 00290 _x = self 00291 buff.write(_struct_B3I.pack(_x.goal.reset_image_counter, _x.goal.pose.header.seq, _x.goal.pose.header.stamp.secs, _x.goal.pose.header.stamp.nsecs)) 00292 _x = self.goal.pose.header.frame_id 00293 length = len(_x) 00294 buff.write(struct.pack('<I%ss'%length, length, _x)) 00295 _x = self 00296 buff.write(_struct_7d.pack(_x.goal.pose.pose.position.x, _x.goal.pose.pose.position.y, _x.goal.pose.pose.position.z, _x.goal.pose.pose.orientation.x, _x.goal.pose.pose.orientation.y, _x.goal.pose.pose.orientation.z, _x.goal.pose.pose.orientation.w)) 00297 length = len(self.goal.sdh_joints) 00298 buff.write(_struct_I.pack(length)) 00299 for val1 in self.goal.sdh_joints: 00300 _v11 = val1.header 00301 buff.write(_struct_I.pack(_v11.seq)) 00302 _v12 = _v11.stamp 00303 _x = _v12 00304 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00305 _x = _v11.frame_id 00306 length = len(_x) 00307 buff.write(struct.pack('<I%ss'%length, length, _x)) 00308 _v13 = val1.pose 00309 _v14 = _v13.position 00310 _x = _v14 00311 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00312 _v15 = _v13.orientation 00313 _x = _v15 00314 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00315 except struct.error as se: self._check_types(se) 00316 except TypeError as te: self._check_types(te) 00317 00318 def deserialize_numpy(self, str, numpy): 00319 """ 00320 unpack serialized message in str into this message instance using numpy for array types 00321 @param str: byte array of serialized message 00322 @type str: str 00323 @param numpy: numpy python module 00324 @type numpy: module 00325 """ 00326 try: 00327 if self.header is None: 00328 self.header = std_msgs.msg._Header.Header() 00329 if self.goal_id is None: 00330 self.goal_id = actionlib_msgs.msg.GoalID() 00331 if self.goal is None: 00332 self.goal = cob_object_detection_msgs.msg.AcquireObjectImageGoal() 00333 end = 0 00334 _x = self 00335 start = end 00336 end += 12 00337 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00338 start = end 00339 end += 4 00340 (length,) = _struct_I.unpack(str[start:end]) 00341 start = end 00342 end += length 00343 self.header.frame_id = str[start:end] 00344 _x = self 00345 start = end 00346 end += 8 00347 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00348 start = end 00349 end += 4 00350 (length,) = _struct_I.unpack(str[start:end]) 00351 start = end 00352 end += length 00353 self.goal_id.id = str[start:end] 00354 start = end 00355 end += 4 00356 (length,) = _struct_I.unpack(str[start:end]) 00357 start = end 00358 end += length 00359 self.goal.object_name = str[start:end] 00360 _x = self 00361 start = end 00362 end += 13 00363 (_x.goal.reset_image_counter, _x.goal.pose.header.seq, _x.goal.pose.header.stamp.secs, _x.goal.pose.header.stamp.nsecs,) = _struct_B3I.unpack(str[start:end]) 00364 self.goal.reset_image_counter = bool(self.goal.reset_image_counter) 00365 start = end 00366 end += 4 00367 (length,) = _struct_I.unpack(str[start:end]) 00368 start = end 00369 end += length 00370 self.goal.pose.header.frame_id = str[start:end] 00371 _x = self 00372 start = end 00373 end += 56 00374 (_x.goal.pose.pose.position.x, _x.goal.pose.pose.position.y, _x.goal.pose.pose.position.z, _x.goal.pose.pose.orientation.x, _x.goal.pose.pose.orientation.y, _x.goal.pose.pose.orientation.z, _x.goal.pose.pose.orientation.w,) = _struct_7d.unpack(str[start:end]) 00375 start = end 00376 end += 4 00377 (length,) = _struct_I.unpack(str[start:end]) 00378 self.goal.sdh_joints = [] 00379 for i in range(0, length): 00380 val1 = geometry_msgs.msg.PoseStamped() 00381 _v16 = val1.header 00382 start = end 00383 end += 4 00384 (_v16.seq,) = _struct_I.unpack(str[start:end]) 00385 _v17 = _v16.stamp 00386 _x = _v17 00387 start = end 00388 end += 8 00389 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00390 start = end 00391 end += 4 00392 (length,) = _struct_I.unpack(str[start:end]) 00393 start = end 00394 end += length 00395 _v16.frame_id = str[start:end] 00396 _v18 = val1.pose 00397 _v19 = _v18.position 00398 _x = _v19 00399 start = end 00400 end += 24 00401 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00402 _v20 = _v18.orientation 00403 _x = _v20 00404 start = end 00405 end += 32 00406 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00407 self.goal.sdh_joints.append(val1) 00408 return self 00409 except struct.error as e: 00410 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00411 00412 _struct_I = roslib.message.struct_I 00413 _struct_7d = struct.Struct("<7d") 00414 _struct_3I = struct.Struct("<3I") 00415 _struct_B3I = struct.Struct("<B3I") 00416 _struct_4d = struct.Struct("<4d") 00417 _struct_2I = struct.Struct("<2I") 00418 _struct_3d = struct.Struct("<3d")