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