00001 """autogenerated by genpy from laser_cb_detector/ConfigActionGoal.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 actionlib_msgs.msg
00009 import laser_cb_detector.msg
00010 import std_msgs.msg
00011
00012 class ConfigActionGoal(genpy.Message):
00013 _md5sum = "f6f8cb46e4d9ad5f8de5944ff7521a06"
00014 _type = "laser_cb_detector/ConfigActionGoal"
00015 _has_header = True
00016 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00017
00018 Header header
00019 actionlib_msgs/GoalID goal_id
00020 ConfigGoal 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: laser_cb_detector/ConfigGoal
00055 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00056 uint32 num_x # Number of checkerboard corners in the X direction
00057 uint32 num_y # Number of corners in the Y direction
00058 float32 spacing_x # Spacing between corners in the X direction (meters)
00059 float32 spacing_y # Spacing between corners in the Y direction (meters)
00060
00061 # Specify how many times we want to upsample the image.
00062 # This is often useful for detecting small checkerboards far away
00063 float32 width_scaling
00064 float32 height_scaling
00065
00066 # Specifiy how intensity maps into a uint8. A specified window of
00067 # intensities is linearly scaled to 0-255
00068 float32 min_intensity
00069 float32 max_intensity
00070
00071 # Configure openCV's subpixel corner detector
00072 uint32 subpixel_window
00073 int32 subpixel_zero_zone
00074
00075 # Specify if we need to flip snapshot image model. This is usually necessary
00076 # when the laser scans from right to left, since this is the opposite of images,
00077 # which are normally indexed left to right
00078 uint8 flip_horizontal
00079
00080
00081 """
00082 __slots__ = ['header','goal_id','goal']
00083 _slot_types = ['std_msgs/Header','actionlib_msgs/GoalID','laser_cb_detector/ConfigGoal']
00084
00085 def __init__(self, *args, **kwds):
00086 """
00087 Constructor. Any message fields that are implicitly/explicitly
00088 set to None will be assigned a default value. The recommend
00089 use is keyword arguments as this is more robust to future message
00090 changes. You cannot mix in-order arguments and keyword arguments.
00091
00092 The available fields are:
00093 header,goal_id,goal
00094
00095 :param args: complete set of field values, in .msg order
00096 :param kwds: use keyword arguments corresponding to message field names
00097 to set specific fields.
00098 """
00099 if args or kwds:
00100 super(ConfigActionGoal, self).__init__(*args, **kwds)
00101
00102 if self.header is None:
00103 self.header = std_msgs.msg.Header()
00104 if self.goal_id is None:
00105 self.goal_id = actionlib_msgs.msg.GoalID()
00106 if self.goal is None:
00107 self.goal = laser_cb_detector.msg.ConfigGoal()
00108 else:
00109 self.header = std_msgs.msg.Header()
00110 self.goal_id = actionlib_msgs.msg.GoalID()
00111 self.goal = laser_cb_detector.msg.ConfigGoal()
00112
00113 def _get_types(self):
00114 """
00115 internal API method
00116 """
00117 return self._slot_types
00118
00119 def serialize(self, buff):
00120 """
00121 serialize message into buffer
00122 :param buff: buffer, ``StringIO``
00123 """
00124 try:
00125 _x = self
00126 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00127 _x = self.header.frame_id
00128 length = len(_x)
00129 if python3 or type(_x) == unicode:
00130 _x = _x.encode('utf-8')
00131 length = len(_x)
00132 buff.write(struct.pack('<I%ss'%length, length, _x))
00133 _x = self
00134 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs))
00135 _x = self.goal_id.id
00136 length = len(_x)
00137 if python3 or type(_x) == unicode:
00138 _x = _x.encode('utf-8')
00139 length = len(_x)
00140 buff.write(struct.pack('<I%ss'%length, length, _x))
00141 _x = self
00142 buff.write(_struct_2I6fIiB.pack(_x.goal.num_x, _x.goal.num_y, _x.goal.spacing_x, _x.goal.spacing_y, _x.goal.width_scaling, _x.goal.height_scaling, _x.goal.min_intensity, _x.goal.max_intensity, _x.goal.subpixel_window, _x.goal.subpixel_zero_zone, _x.goal.flip_horizontal))
00143 except struct.error as se: self._check_types(se)
00144 except TypeError as te: self._check_types(te)
00145
00146 def deserialize(self, str):
00147 """
00148 unpack serialized message in str into this message instance
00149 :param str: byte array of serialized message, ``str``
00150 """
00151 try:
00152 if self.header is None:
00153 self.header = std_msgs.msg.Header()
00154 if self.goal_id is None:
00155 self.goal_id = actionlib_msgs.msg.GoalID()
00156 if self.goal is None:
00157 self.goal = laser_cb_detector.msg.ConfigGoal()
00158 end = 0
00159 _x = self
00160 start = end
00161 end += 12
00162 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00163 start = end
00164 end += 4
00165 (length,) = _struct_I.unpack(str[start:end])
00166 start = end
00167 end += length
00168 if python3:
00169 self.header.frame_id = str[start:end].decode('utf-8')
00170 else:
00171 self.header.frame_id = str[start:end]
00172 _x = self
00173 start = end
00174 end += 8
00175 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00176 start = end
00177 end += 4
00178 (length,) = _struct_I.unpack(str[start:end])
00179 start = end
00180 end += length
00181 if python3:
00182 self.goal_id.id = str[start:end].decode('utf-8')
00183 else:
00184 self.goal_id.id = str[start:end]
00185 _x = self
00186 start = end
00187 end += 41
00188 (_x.goal.num_x, _x.goal.num_y, _x.goal.spacing_x, _x.goal.spacing_y, _x.goal.width_scaling, _x.goal.height_scaling, _x.goal.min_intensity, _x.goal.max_intensity, _x.goal.subpixel_window, _x.goal.subpixel_zero_zone, _x.goal.flip_horizontal,) = _struct_2I6fIiB.unpack(str[start:end])
00189 return self
00190 except struct.error as e:
00191 raise genpy.DeserializationError(e)
00192
00193
00194 def serialize_numpy(self, buff, numpy):
00195 """
00196 serialize message with numpy array types into buffer
00197 :param buff: buffer, ``StringIO``
00198 :param numpy: numpy python module
00199 """
00200 try:
00201 _x = self
00202 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00203 _x = self.header.frame_id
00204 length = len(_x)
00205 if python3 or type(_x) == unicode:
00206 _x = _x.encode('utf-8')
00207 length = len(_x)
00208 buff.write(struct.pack('<I%ss'%length, length, _x))
00209 _x = self
00210 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs))
00211 _x = self.goal_id.id
00212 length = len(_x)
00213 if python3 or type(_x) == unicode:
00214 _x = _x.encode('utf-8')
00215 length = len(_x)
00216 buff.write(struct.pack('<I%ss'%length, length, _x))
00217 _x = self
00218 buff.write(_struct_2I6fIiB.pack(_x.goal.num_x, _x.goal.num_y, _x.goal.spacing_x, _x.goal.spacing_y, _x.goal.width_scaling, _x.goal.height_scaling, _x.goal.min_intensity, _x.goal.max_intensity, _x.goal.subpixel_window, _x.goal.subpixel_zero_zone, _x.goal.flip_horizontal))
00219 except struct.error as se: self._check_types(se)
00220 except TypeError as te: self._check_types(te)
00221
00222 def deserialize_numpy(self, str, numpy):
00223 """
00224 unpack serialized message in str into this message instance using numpy for array types
00225 :param str: byte array of serialized message, ``str``
00226 :param numpy: numpy python module
00227 """
00228 try:
00229 if self.header is None:
00230 self.header = std_msgs.msg.Header()
00231 if self.goal_id is None:
00232 self.goal_id = actionlib_msgs.msg.GoalID()
00233 if self.goal is None:
00234 self.goal = laser_cb_detector.msg.ConfigGoal()
00235 end = 0
00236 _x = self
00237 start = end
00238 end += 12
00239 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00240 start = end
00241 end += 4
00242 (length,) = _struct_I.unpack(str[start:end])
00243 start = end
00244 end += length
00245 if python3:
00246 self.header.frame_id = str[start:end].decode('utf-8')
00247 else:
00248 self.header.frame_id = str[start:end]
00249 _x = self
00250 start = end
00251 end += 8
00252 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00253 start = end
00254 end += 4
00255 (length,) = _struct_I.unpack(str[start:end])
00256 start = end
00257 end += length
00258 if python3:
00259 self.goal_id.id = str[start:end].decode('utf-8')
00260 else:
00261 self.goal_id.id = str[start:end]
00262 _x = self
00263 start = end
00264 end += 41
00265 (_x.goal.num_x, _x.goal.num_y, _x.goal.spacing_x, _x.goal.spacing_y, _x.goal.width_scaling, _x.goal.height_scaling, _x.goal.min_intensity, _x.goal.max_intensity, _x.goal.subpixel_window, _x.goal.subpixel_zero_zone, _x.goal.flip_horizontal,) = _struct_2I6fIiB.unpack(str[start:end])
00266 return self
00267 except struct.error as e:
00268 raise genpy.DeserializationError(e)
00269
00270 _struct_I = genpy.struct_I
00271 _struct_3I = struct.Struct("<3I")
00272 _struct_2I = struct.Struct("<2I")
00273 _struct_2I6fIiB = struct.Struct("<2I6fIiB")