00001 """autogenerated by genpy from image_cb_detector/ConfigAction.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 genpy
00008 import image_cb_detector.msg
00009 import actionlib_msgs.msg
00010 import std_msgs.msg
00011
00012 class ConfigAction(genpy.Message):
00013 _md5sum = "1ddd846910edb1716470805de600567f"
00014 _type = "image_cb_detector/ConfigAction"
00015 _has_header = False
00016 _full_text = """
00017 ConfigActionGoal action_goal
00018 ConfigActionResult action_result
00019 ConfigActionFeedback action_feedback
00020
00021 ================================================================================
00022 MSG: image_cb_detector/ConfigActionGoal
00023
00024 Header header
00025 actionlib_msgs/GoalID goal_id
00026 ConfigGoal goal
00027
00028 ================================================================================
00029 MSG: std_msgs/Header
00030 # Standard metadata for higher-level stamped data types.
00031 # This is generally used to communicate timestamped data
00032 # in a particular coordinate frame.
00033 #
00034 # sequence ID: consecutively increasing ID
00035 uint32 seq
00036 #Two-integer timestamp that is expressed as:
00037 # * stamp.secs: seconds (stamp_secs) since epoch
00038 # * stamp.nsecs: nanoseconds since stamp_secs
00039 # time-handling sugar is provided by the client library
00040 time stamp
00041 #Frame this data is associated with
00042 # 0: no frame
00043 # 1: global frame
00044 string frame_id
00045
00046 ================================================================================
00047 MSG: actionlib_msgs/GoalID
00048 # The stamp should store the time at which this goal was requested.
00049 # It is used by an action server when it tries to preempt all
00050 # goals that were requested before a certain time
00051 time stamp
00052
00053 # The id provides a way to associate feedback and
00054 # result message with specific goal requests. The id
00055 # specified must be unique.
00056 string id
00057
00058
00059 ================================================================================
00060 MSG: image_cb_detector/ConfigGoal
00061 uint32 num_x # Number of checkerboard corners in the X direction
00062 uint32 num_y # Number of corners in the Y direction
00063 float32 spacing_x # Spacing between corners in the X direction (meters)
00064 float32 spacing_y # Spacing between corners in the Y direction (meters)
00065
00066 # Specify how many times we want to upsample the image.
00067 # This is often useful for detecting small checkerboards far away
00068 float32 width_scaling
00069 float32 height_scaling
00070
00071 # Configure openCV's subpixel corner detector
00072 uint32 subpixel_window
00073 int32 subpixel_zero_zone
00074
00075
00076 ================================================================================
00077 MSG: image_cb_detector/ConfigActionResult
00078
00079 Header header
00080 actionlib_msgs/GoalStatus status
00081 ConfigResult result
00082
00083 ================================================================================
00084 MSG: actionlib_msgs/GoalStatus
00085 GoalID goal_id
00086 uint8 status
00087 uint8 PENDING = 0 # The goal has yet to be processed by the action server
00088 uint8 ACTIVE = 1 # The goal is currently being processed by the action server
00089 uint8 PREEMPTED = 2 # The goal received a cancel request after it started executing
00090 # and has since completed its execution (Terminal State)
00091 uint8 SUCCEEDED = 3 # The goal was achieved successfully by the action server (Terminal State)
00092 uint8 ABORTED = 4 # The goal was aborted during execution by the action server due
00093 # to some failure (Terminal State)
00094 uint8 REJECTED = 5 # The goal was rejected by the action server without being processed,
00095 # because the goal was unattainable or invalid (Terminal State)
00096 uint8 PREEMPTING = 6 # The goal received a cancel request after it started executing
00097 # and has not yet completed execution
00098 uint8 RECALLING = 7 # The goal received a cancel request before it started executing,
00099 # but the action server has not yet confirmed that the goal is canceled
00100 uint8 RECALLED = 8 # The goal received a cancel request before it started executing
00101 # and was successfully cancelled (Terminal State)
00102 uint8 LOST = 9 # An action client can determine that a goal is LOST. This should not be
00103 # sent over the wire by an action server
00104
00105 #Allow for the user to associate a string with GoalStatus for debugging
00106 string text
00107
00108
00109 ================================================================================
00110 MSG: image_cb_detector/ConfigResult
00111
00112 ================================================================================
00113 MSG: image_cb_detector/ConfigActionFeedback
00114
00115 Header header
00116 actionlib_msgs/GoalStatus status
00117 ConfigFeedback feedback
00118
00119 ================================================================================
00120 MSG: image_cb_detector/ConfigFeedback
00121
00122 """
00123 __slots__ = ['action_goal','action_result','action_feedback']
00124 _slot_types = ['image_cb_detector/ConfigActionGoal','image_cb_detector/ConfigActionResult','image_cb_detector/ConfigActionFeedback']
00125
00126 def __init__(self, *args, **kwds):
00127 """
00128 Constructor. Any message fields that are implicitly/explicitly
00129 set to None will be assigned a default value. The recommend
00130 use is keyword arguments as this is more robust to future message
00131 changes. You cannot mix in-order arguments and keyword arguments.
00132
00133 The available fields are:
00134 action_goal,action_result,action_feedback
00135
00136 :param args: complete set of field values, in .msg order
00137 :param kwds: use keyword arguments corresponding to message field names
00138 to set specific fields.
00139 """
00140 if args or kwds:
00141 super(ConfigAction, self).__init__(*args, **kwds)
00142
00143 if self.action_goal is None:
00144 self.action_goal = image_cb_detector.msg.ConfigActionGoal()
00145 if self.action_result is None:
00146 self.action_result = image_cb_detector.msg.ConfigActionResult()
00147 if self.action_feedback is None:
00148 self.action_feedback = image_cb_detector.msg.ConfigActionFeedback()
00149 else:
00150 self.action_goal = image_cb_detector.msg.ConfigActionGoal()
00151 self.action_result = image_cb_detector.msg.ConfigActionResult()
00152 self.action_feedback = image_cb_detector.msg.ConfigActionFeedback()
00153
00154 def _get_types(self):
00155 """
00156 internal API method
00157 """
00158 return self._slot_types
00159
00160 def serialize(self, buff):
00161 """
00162 serialize message into buffer
00163 :param buff: buffer, ``StringIO``
00164 """
00165 try:
00166 _x = self
00167 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs))
00168 _x = self.action_goal.header.frame_id
00169 length = len(_x)
00170 if python3 or type(_x) == unicode:
00171 _x = _x.encode('utf-8')
00172 length = len(_x)
00173 buff.write(struct.pack('<I%ss'%length, length, _x))
00174 _x = self
00175 buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs))
00176 _x = self.action_goal.goal_id.id
00177 length = len(_x)
00178 if python3 or type(_x) == unicode:
00179 _x = _x.encode('utf-8')
00180 length = len(_x)
00181 buff.write(struct.pack('<I%ss'%length, length, _x))
00182 _x = self
00183 buff.write(_struct_2I4fIi3I.pack(_x.action_goal.goal.num_x, _x.action_goal.goal.num_y, _x.action_goal.goal.spacing_x, _x.action_goal.goal.spacing_y, _x.action_goal.goal.width_scaling, _x.action_goal.goal.height_scaling, _x.action_goal.goal.subpixel_window, _x.action_goal.goal.subpixel_zero_zone, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs))
00184 _x = self.action_result.header.frame_id
00185 length = len(_x)
00186 if python3 or type(_x) == unicode:
00187 _x = _x.encode('utf-8')
00188 length = len(_x)
00189 buff.write(struct.pack('<I%ss'%length, length, _x))
00190 _x = self
00191 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00192 _x = self.action_result.status.goal_id.id
00193 length = len(_x)
00194 if python3 or type(_x) == unicode:
00195 _x = _x.encode('utf-8')
00196 length = len(_x)
00197 buff.write(struct.pack('<I%ss'%length, length, _x))
00198 buff.write(_struct_B.pack(self.action_result.status.status))
00199 _x = self.action_result.status.text
00200 length = len(_x)
00201 if python3 or type(_x) == unicode:
00202 _x = _x.encode('utf-8')
00203 length = len(_x)
00204 buff.write(struct.pack('<I%ss'%length, length, _x))
00205 _x = self
00206 buff.write(_struct_3I.pack(_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs))
00207 _x = self.action_feedback.header.frame_id
00208 length = len(_x)
00209 if python3 or type(_x) == unicode:
00210 _x = _x.encode('utf-8')
00211 length = len(_x)
00212 buff.write(struct.pack('<I%ss'%length, length, _x))
00213 _x = self
00214 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00215 _x = self.action_feedback.status.goal_id.id
00216 length = len(_x)
00217 if python3 or type(_x) == unicode:
00218 _x = _x.encode('utf-8')
00219 length = len(_x)
00220 buff.write(struct.pack('<I%ss'%length, length, _x))
00221 buff.write(_struct_B.pack(self.action_feedback.status.status))
00222 _x = self.action_feedback.status.text
00223 length = len(_x)
00224 if python3 or type(_x) == unicode:
00225 _x = _x.encode('utf-8')
00226 length = len(_x)
00227 buff.write(struct.pack('<I%ss'%length, length, _x))
00228 except struct.error as se: self._check_types(se)
00229 except TypeError as te: self._check_types(te)
00230
00231 def deserialize(self, str):
00232 """
00233 unpack serialized message in str into this message instance
00234 :param str: byte array of serialized message, ``str``
00235 """
00236 try:
00237 if self.action_goal is None:
00238 self.action_goal = image_cb_detector.msg.ConfigActionGoal()
00239 if self.action_result is None:
00240 self.action_result = image_cb_detector.msg.ConfigActionResult()
00241 if self.action_feedback is None:
00242 self.action_feedback = image_cb_detector.msg.ConfigActionFeedback()
00243 end = 0
00244 _x = self
00245 start = end
00246 end += 12
00247 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00248 start = end
00249 end += 4
00250 (length,) = _struct_I.unpack(str[start:end])
00251 start = end
00252 end += length
00253 if python3:
00254 self.action_goal.header.frame_id = str[start:end].decode('utf-8')
00255 else:
00256 self.action_goal.header.frame_id = str[start:end]
00257 _x = self
00258 start = end
00259 end += 8
00260 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00261 start = end
00262 end += 4
00263 (length,) = _struct_I.unpack(str[start:end])
00264 start = end
00265 end += length
00266 if python3:
00267 self.action_goal.goal_id.id = str[start:end].decode('utf-8')
00268 else:
00269 self.action_goal.goal_id.id = str[start:end]
00270 _x = self
00271 start = end
00272 end += 44
00273 (_x.action_goal.goal.num_x, _x.action_goal.goal.num_y, _x.action_goal.goal.spacing_x, _x.action_goal.goal.spacing_y, _x.action_goal.goal.width_scaling, _x.action_goal.goal.height_scaling, _x.action_goal.goal.subpixel_window, _x.action_goal.goal.subpixel_zero_zone, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_2I4fIi3I.unpack(str[start:end])
00274 start = end
00275 end += 4
00276 (length,) = _struct_I.unpack(str[start:end])
00277 start = end
00278 end += length
00279 if python3:
00280 self.action_result.header.frame_id = str[start:end].decode('utf-8')
00281 else:
00282 self.action_result.header.frame_id = str[start:end]
00283 _x = self
00284 start = end
00285 end += 8
00286 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00287 start = end
00288 end += 4
00289 (length,) = _struct_I.unpack(str[start:end])
00290 start = end
00291 end += length
00292 if python3:
00293 self.action_result.status.goal_id.id = str[start:end].decode('utf-8')
00294 else:
00295 self.action_result.status.goal_id.id = str[start:end]
00296 start = end
00297 end += 1
00298 (self.action_result.status.status,) = _struct_B.unpack(str[start:end])
00299 start = end
00300 end += 4
00301 (length,) = _struct_I.unpack(str[start:end])
00302 start = end
00303 end += length
00304 if python3:
00305 self.action_result.status.text = str[start:end].decode('utf-8')
00306 else:
00307 self.action_result.status.text = str[start:end]
00308 _x = self
00309 start = end
00310 end += 12
00311 (_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00312 start = end
00313 end += 4
00314 (length,) = _struct_I.unpack(str[start:end])
00315 start = end
00316 end += length
00317 if python3:
00318 self.action_feedback.header.frame_id = str[start:end].decode('utf-8')
00319 else:
00320 self.action_feedback.header.frame_id = str[start:end]
00321 _x = self
00322 start = end
00323 end += 8
00324 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00325 start = end
00326 end += 4
00327 (length,) = _struct_I.unpack(str[start:end])
00328 start = end
00329 end += length
00330 if python3:
00331 self.action_feedback.status.goal_id.id = str[start:end].decode('utf-8')
00332 else:
00333 self.action_feedback.status.goal_id.id = str[start:end]
00334 start = end
00335 end += 1
00336 (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end])
00337 start = end
00338 end += 4
00339 (length,) = _struct_I.unpack(str[start:end])
00340 start = end
00341 end += length
00342 if python3:
00343 self.action_feedback.status.text = str[start:end].decode('utf-8')
00344 else:
00345 self.action_feedback.status.text = str[start:end]
00346 return self
00347 except struct.error as e:
00348 raise genpy.DeserializationError(e)
00349
00350
00351 def serialize_numpy(self, buff, numpy):
00352 """
00353 serialize message with numpy array types into buffer
00354 :param buff: buffer, ``StringIO``
00355 :param numpy: numpy python module
00356 """
00357 try:
00358 _x = self
00359 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs))
00360 _x = self.action_goal.header.frame_id
00361 length = len(_x)
00362 if python3 or type(_x) == unicode:
00363 _x = _x.encode('utf-8')
00364 length = len(_x)
00365 buff.write(struct.pack('<I%ss'%length, length, _x))
00366 _x = self
00367 buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs))
00368 _x = self.action_goal.goal_id.id
00369 length = len(_x)
00370 if python3 or type(_x) == unicode:
00371 _x = _x.encode('utf-8')
00372 length = len(_x)
00373 buff.write(struct.pack('<I%ss'%length, length, _x))
00374 _x = self
00375 buff.write(_struct_2I4fIi3I.pack(_x.action_goal.goal.num_x, _x.action_goal.goal.num_y, _x.action_goal.goal.spacing_x, _x.action_goal.goal.spacing_y, _x.action_goal.goal.width_scaling, _x.action_goal.goal.height_scaling, _x.action_goal.goal.subpixel_window, _x.action_goal.goal.subpixel_zero_zone, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs))
00376 _x = self.action_result.header.frame_id
00377 length = len(_x)
00378 if python3 or type(_x) == unicode:
00379 _x = _x.encode('utf-8')
00380 length = len(_x)
00381 buff.write(struct.pack('<I%ss'%length, length, _x))
00382 _x = self
00383 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00384 _x = self.action_result.status.goal_id.id
00385 length = len(_x)
00386 if python3 or type(_x) == unicode:
00387 _x = _x.encode('utf-8')
00388 length = len(_x)
00389 buff.write(struct.pack('<I%ss'%length, length, _x))
00390 buff.write(_struct_B.pack(self.action_result.status.status))
00391 _x = self.action_result.status.text
00392 length = len(_x)
00393 if python3 or type(_x) == unicode:
00394 _x = _x.encode('utf-8')
00395 length = len(_x)
00396 buff.write(struct.pack('<I%ss'%length, length, _x))
00397 _x = self
00398 buff.write(_struct_3I.pack(_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs))
00399 _x = self.action_feedback.header.frame_id
00400 length = len(_x)
00401 if python3 or type(_x) == unicode:
00402 _x = _x.encode('utf-8')
00403 length = len(_x)
00404 buff.write(struct.pack('<I%ss'%length, length, _x))
00405 _x = self
00406 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00407 _x = self.action_feedback.status.goal_id.id
00408 length = len(_x)
00409 if python3 or type(_x) == unicode:
00410 _x = _x.encode('utf-8')
00411 length = len(_x)
00412 buff.write(struct.pack('<I%ss'%length, length, _x))
00413 buff.write(_struct_B.pack(self.action_feedback.status.status))
00414 _x = self.action_feedback.status.text
00415 length = len(_x)
00416 if python3 or type(_x) == unicode:
00417 _x = _x.encode('utf-8')
00418 length = len(_x)
00419 buff.write(struct.pack('<I%ss'%length, length, _x))
00420 except struct.error as se: self._check_types(se)
00421 except TypeError as te: self._check_types(te)
00422
00423 def deserialize_numpy(self, str, numpy):
00424 """
00425 unpack serialized message in str into this message instance using numpy for array types
00426 :param str: byte array of serialized message, ``str``
00427 :param numpy: numpy python module
00428 """
00429 try:
00430 if self.action_goal is None:
00431 self.action_goal = image_cb_detector.msg.ConfigActionGoal()
00432 if self.action_result is None:
00433 self.action_result = image_cb_detector.msg.ConfigActionResult()
00434 if self.action_feedback is None:
00435 self.action_feedback = image_cb_detector.msg.ConfigActionFeedback()
00436 end = 0
00437 _x = self
00438 start = end
00439 end += 12
00440 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00441 start = end
00442 end += 4
00443 (length,) = _struct_I.unpack(str[start:end])
00444 start = end
00445 end += length
00446 if python3:
00447 self.action_goal.header.frame_id = str[start:end].decode('utf-8')
00448 else:
00449 self.action_goal.header.frame_id = str[start:end]
00450 _x = self
00451 start = end
00452 end += 8
00453 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00454 start = end
00455 end += 4
00456 (length,) = _struct_I.unpack(str[start:end])
00457 start = end
00458 end += length
00459 if python3:
00460 self.action_goal.goal_id.id = str[start:end].decode('utf-8')
00461 else:
00462 self.action_goal.goal_id.id = str[start:end]
00463 _x = self
00464 start = end
00465 end += 44
00466 (_x.action_goal.goal.num_x, _x.action_goal.goal.num_y, _x.action_goal.goal.spacing_x, _x.action_goal.goal.spacing_y, _x.action_goal.goal.width_scaling, _x.action_goal.goal.height_scaling, _x.action_goal.goal.subpixel_window, _x.action_goal.goal.subpixel_zero_zone, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_2I4fIi3I.unpack(str[start:end])
00467 start = end
00468 end += 4
00469 (length,) = _struct_I.unpack(str[start:end])
00470 start = end
00471 end += length
00472 if python3:
00473 self.action_result.header.frame_id = str[start:end].decode('utf-8')
00474 else:
00475 self.action_result.header.frame_id = str[start:end]
00476 _x = self
00477 start = end
00478 end += 8
00479 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00480 start = end
00481 end += 4
00482 (length,) = _struct_I.unpack(str[start:end])
00483 start = end
00484 end += length
00485 if python3:
00486 self.action_result.status.goal_id.id = str[start:end].decode('utf-8')
00487 else:
00488 self.action_result.status.goal_id.id = str[start:end]
00489 start = end
00490 end += 1
00491 (self.action_result.status.status,) = _struct_B.unpack(str[start:end])
00492 start = end
00493 end += 4
00494 (length,) = _struct_I.unpack(str[start:end])
00495 start = end
00496 end += length
00497 if python3:
00498 self.action_result.status.text = str[start:end].decode('utf-8')
00499 else:
00500 self.action_result.status.text = str[start:end]
00501 _x = self
00502 start = end
00503 end += 12
00504 (_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00505 start = end
00506 end += 4
00507 (length,) = _struct_I.unpack(str[start:end])
00508 start = end
00509 end += length
00510 if python3:
00511 self.action_feedback.header.frame_id = str[start:end].decode('utf-8')
00512 else:
00513 self.action_feedback.header.frame_id = str[start:end]
00514 _x = self
00515 start = end
00516 end += 8
00517 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00518 start = end
00519 end += 4
00520 (length,) = _struct_I.unpack(str[start:end])
00521 start = end
00522 end += length
00523 if python3:
00524 self.action_feedback.status.goal_id.id = str[start:end].decode('utf-8')
00525 else:
00526 self.action_feedback.status.goal_id.id = str[start:end]
00527 start = end
00528 end += 1
00529 (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end])
00530 start = end
00531 end += 4
00532 (length,) = _struct_I.unpack(str[start:end])
00533 start = end
00534 end += length
00535 if python3:
00536 self.action_feedback.status.text = str[start:end].decode('utf-8')
00537 else:
00538 self.action_feedback.status.text = str[start:end]
00539 return self
00540 except struct.error as e:
00541 raise genpy.DeserializationError(e)
00542
00543 _struct_I = genpy.struct_I
00544 _struct_3I = struct.Struct("<3I")
00545 _struct_B = struct.Struct("<B")
00546 _struct_2I = struct.Struct("<2I")
00547 _struct_2I4fIi3I = struct.Struct("<2I4fIi3I")