00001 """autogenerated by genpy from control_msgs/PointHeadActionActionGoal.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 geometry_msgs.msg
00008 import control_msgs.msg
00009 import genpy
00010 import actionlib_msgs.msg
00011 import std_msgs.msg
00012
00013 class PointHeadActionActionGoal(genpy.Message):
00014 _md5sum = "b53a8323d0ba7b310ba17a2d3a82a6b8"
00015 _type = "control_msgs/PointHeadActionActionGoal"
00016 _has_header = True
00017 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00018
00019 Header header
00020 actionlib_msgs/GoalID goal_id
00021 PointHeadActionGoal goal
00022
00023 ================================================================================
00024 MSG: std_msgs/Header
00025 # Standard metadata for higher-level stamped data types.
00026 # This is generally used to communicate timestamped data
00027 # in a particular coordinate frame.
00028 #
00029 # sequence ID: consecutively increasing ID
00030 uint32 seq
00031 #Two-integer timestamp that is expressed as:
00032 # * stamp.secs: seconds (stamp_secs) since epoch
00033 # * stamp.nsecs: nanoseconds since stamp_secs
00034 # time-handling sugar is provided by the client library
00035 time stamp
00036 #Frame this data is associated with
00037 # 0: no frame
00038 # 1: global frame
00039 string frame_id
00040
00041 ================================================================================
00042 MSG: actionlib_msgs/GoalID
00043 # The stamp should store the time at which this goal was requested.
00044 # It is used by an action server when it tries to preempt all
00045 # goals that were requested before a certain time
00046 time stamp
00047
00048 # The id provides a way to associate feedback and
00049 # result message with specific goal requests. The id
00050 # specified must be unique.
00051 string id
00052
00053
00054 ================================================================================
00055 MSG: control_msgs/PointHeadActionGoal
00056 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00057 geometry_msgs/PointStamped target
00058 geometry_msgs/Vector3 pointing_axis
00059 string pointing_frame
00060 duration min_duration
00061 float64 max_velocity
00062
00063 ================================================================================
00064 MSG: geometry_msgs/PointStamped
00065 # This represents a Point with reference coordinate frame and timestamp
00066 Header header
00067 Point point
00068
00069 ================================================================================
00070 MSG: geometry_msgs/Point
00071 # This contains the position of a point in free space
00072 float64 x
00073 float64 y
00074 float64 z
00075
00076 ================================================================================
00077 MSG: geometry_msgs/Vector3
00078 # This represents a vector in free space.
00079
00080 float64 x
00081 float64 y
00082 float64 z
00083 """
00084 __slots__ = ['header','goal_id','goal']
00085 _slot_types = ['std_msgs/Header','actionlib_msgs/GoalID','control_msgs/PointHeadActionGoal']
00086
00087 def __init__(self, *args, **kwds):
00088 """
00089 Constructor. Any message fields that are implicitly/explicitly
00090 set to None will be assigned a default value. The recommend
00091 use is keyword arguments as this is more robust to future message
00092 changes. You cannot mix in-order arguments and keyword arguments.
00093
00094 The available fields are:
00095 header,goal_id,goal
00096
00097 :param args: complete set of field values, in .msg order
00098 :param kwds: use keyword arguments corresponding to message field names
00099 to set specific fields.
00100 """
00101 if args or kwds:
00102 super(PointHeadActionActionGoal, self).__init__(*args, **kwds)
00103
00104 if self.header is None:
00105 self.header = std_msgs.msg.Header()
00106 if self.goal_id is None:
00107 self.goal_id = actionlib_msgs.msg.GoalID()
00108 if self.goal is None:
00109 self.goal = control_msgs.msg.PointHeadActionGoal()
00110 else:
00111 self.header = std_msgs.msg.Header()
00112 self.goal_id = actionlib_msgs.msg.GoalID()
00113 self.goal = control_msgs.msg.PointHeadActionGoal()
00114
00115 def _get_types(self):
00116 """
00117 internal API method
00118 """
00119 return self._slot_types
00120
00121 def serialize(self, buff):
00122 """
00123 serialize message into buffer
00124 :param buff: buffer, ``StringIO``
00125 """
00126 try:
00127 _x = self
00128 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00129 _x = self.header.frame_id
00130 length = len(_x)
00131 if python3 or type(_x) == unicode:
00132 _x = _x.encode('utf-8')
00133 length = len(_x)
00134 buff.write(struct.pack('<I%ss'%length, length, _x))
00135 _x = self
00136 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs))
00137 _x = self.goal_id.id
00138 length = len(_x)
00139 if python3 or type(_x) == unicode:
00140 _x = _x.encode('utf-8')
00141 length = len(_x)
00142 buff.write(struct.pack('<I%ss'%length, length, _x))
00143 _x = self
00144 buff.write(_struct_3I.pack(_x.goal.target.header.seq, _x.goal.target.header.stamp.secs, _x.goal.target.header.stamp.nsecs))
00145 _x = self.goal.target.header.frame_id
00146 length = len(_x)
00147 if python3 or type(_x) == unicode:
00148 _x = _x.encode('utf-8')
00149 length = len(_x)
00150 buff.write(struct.pack('<I%ss'%length, length, _x))
00151 _x = self
00152 buff.write(_struct_6d.pack(_x.goal.target.point.x, _x.goal.target.point.y, _x.goal.target.point.z, _x.goal.pointing_axis.x, _x.goal.pointing_axis.y, _x.goal.pointing_axis.z))
00153 _x = self.goal.pointing_frame
00154 length = len(_x)
00155 if python3 or type(_x) == unicode:
00156 _x = _x.encode('utf-8')
00157 length = len(_x)
00158 buff.write(struct.pack('<I%ss'%length, length, _x))
00159 _x = self
00160 buff.write(_struct_2id.pack(_x.goal.min_duration.secs, _x.goal.min_duration.nsecs, _x.goal.max_velocity))
00161 except struct.error as se: self._check_types(se)
00162 except TypeError as te: self._check_types(te)
00163
00164 def deserialize(self, str):
00165 """
00166 unpack serialized message in str into this message instance
00167 :param str: byte array of serialized message, ``str``
00168 """
00169 try:
00170 if self.header is None:
00171 self.header = std_msgs.msg.Header()
00172 if self.goal_id is None:
00173 self.goal_id = actionlib_msgs.msg.GoalID()
00174 if self.goal is None:
00175 self.goal = control_msgs.msg.PointHeadActionGoal()
00176 end = 0
00177 _x = self
00178 start = end
00179 end += 12
00180 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00181 start = end
00182 end += 4
00183 (length,) = _struct_I.unpack(str[start:end])
00184 start = end
00185 end += length
00186 if python3:
00187 self.header.frame_id = str[start:end].decode('utf-8')
00188 else:
00189 self.header.frame_id = str[start:end]
00190 _x = self
00191 start = end
00192 end += 8
00193 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00194 start = end
00195 end += 4
00196 (length,) = _struct_I.unpack(str[start:end])
00197 start = end
00198 end += length
00199 if python3:
00200 self.goal_id.id = str[start:end].decode('utf-8')
00201 else:
00202 self.goal_id.id = str[start:end]
00203 _x = self
00204 start = end
00205 end += 12
00206 (_x.goal.target.header.seq, _x.goal.target.header.stamp.secs, _x.goal.target.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00207 start = end
00208 end += 4
00209 (length,) = _struct_I.unpack(str[start:end])
00210 start = end
00211 end += length
00212 if python3:
00213 self.goal.target.header.frame_id = str[start:end].decode('utf-8')
00214 else:
00215 self.goal.target.header.frame_id = str[start:end]
00216 _x = self
00217 start = end
00218 end += 48
00219 (_x.goal.target.point.x, _x.goal.target.point.y, _x.goal.target.point.z, _x.goal.pointing_axis.x, _x.goal.pointing_axis.y, _x.goal.pointing_axis.z,) = _struct_6d.unpack(str[start:end])
00220 start = end
00221 end += 4
00222 (length,) = _struct_I.unpack(str[start:end])
00223 start = end
00224 end += length
00225 if python3:
00226 self.goal.pointing_frame = str[start:end].decode('utf-8')
00227 else:
00228 self.goal.pointing_frame = str[start:end]
00229 _x = self
00230 start = end
00231 end += 16
00232 (_x.goal.min_duration.secs, _x.goal.min_duration.nsecs, _x.goal.max_velocity,) = _struct_2id.unpack(str[start:end])
00233 return self
00234 except struct.error as e:
00235 raise genpy.DeserializationError(e)
00236
00237
00238 def serialize_numpy(self, buff, numpy):
00239 """
00240 serialize message with numpy array types into buffer
00241 :param buff: buffer, ``StringIO``
00242 :param numpy: numpy python module
00243 """
00244 try:
00245 _x = self
00246 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00247 _x = self.header.frame_id
00248 length = len(_x)
00249 if python3 or type(_x) == unicode:
00250 _x = _x.encode('utf-8')
00251 length = len(_x)
00252 buff.write(struct.pack('<I%ss'%length, length, _x))
00253 _x = self
00254 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs))
00255 _x = self.goal_id.id
00256 length = len(_x)
00257 if python3 or type(_x) == unicode:
00258 _x = _x.encode('utf-8')
00259 length = len(_x)
00260 buff.write(struct.pack('<I%ss'%length, length, _x))
00261 _x = self
00262 buff.write(_struct_3I.pack(_x.goal.target.header.seq, _x.goal.target.header.stamp.secs, _x.goal.target.header.stamp.nsecs))
00263 _x = self.goal.target.header.frame_id
00264 length = len(_x)
00265 if python3 or type(_x) == unicode:
00266 _x = _x.encode('utf-8')
00267 length = len(_x)
00268 buff.write(struct.pack('<I%ss'%length, length, _x))
00269 _x = self
00270 buff.write(_struct_6d.pack(_x.goal.target.point.x, _x.goal.target.point.y, _x.goal.target.point.z, _x.goal.pointing_axis.x, _x.goal.pointing_axis.y, _x.goal.pointing_axis.z))
00271 _x = self.goal.pointing_frame
00272 length = len(_x)
00273 if python3 or type(_x) == unicode:
00274 _x = _x.encode('utf-8')
00275 length = len(_x)
00276 buff.write(struct.pack('<I%ss'%length, length, _x))
00277 _x = self
00278 buff.write(_struct_2id.pack(_x.goal.min_duration.secs, _x.goal.min_duration.nsecs, _x.goal.max_velocity))
00279 except struct.error as se: self._check_types(se)
00280 except TypeError as te: self._check_types(te)
00281
00282 def deserialize_numpy(self, str, numpy):
00283 """
00284 unpack serialized message in str into this message instance using numpy for array types
00285 :param str: byte array of serialized message, ``str``
00286 :param numpy: numpy python module
00287 """
00288 try:
00289 if self.header is None:
00290 self.header = std_msgs.msg.Header()
00291 if self.goal_id is None:
00292 self.goal_id = actionlib_msgs.msg.GoalID()
00293 if self.goal is None:
00294 self.goal = control_msgs.msg.PointHeadActionGoal()
00295 end = 0
00296 _x = self
00297 start = end
00298 end += 12
00299 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00300 start = end
00301 end += 4
00302 (length,) = _struct_I.unpack(str[start:end])
00303 start = end
00304 end += length
00305 if python3:
00306 self.header.frame_id = str[start:end].decode('utf-8')
00307 else:
00308 self.header.frame_id = str[start:end]
00309 _x = self
00310 start = end
00311 end += 8
00312 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00313 start = end
00314 end += 4
00315 (length,) = _struct_I.unpack(str[start:end])
00316 start = end
00317 end += length
00318 if python3:
00319 self.goal_id.id = str[start:end].decode('utf-8')
00320 else:
00321 self.goal_id.id = str[start:end]
00322 _x = self
00323 start = end
00324 end += 12
00325 (_x.goal.target.header.seq, _x.goal.target.header.stamp.secs, _x.goal.target.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00326 start = end
00327 end += 4
00328 (length,) = _struct_I.unpack(str[start:end])
00329 start = end
00330 end += length
00331 if python3:
00332 self.goal.target.header.frame_id = str[start:end].decode('utf-8')
00333 else:
00334 self.goal.target.header.frame_id = str[start:end]
00335 _x = self
00336 start = end
00337 end += 48
00338 (_x.goal.target.point.x, _x.goal.target.point.y, _x.goal.target.point.z, _x.goal.pointing_axis.x, _x.goal.pointing_axis.y, _x.goal.pointing_axis.z,) = _struct_6d.unpack(str[start:end])
00339 start = end
00340 end += 4
00341 (length,) = _struct_I.unpack(str[start:end])
00342 start = end
00343 end += length
00344 if python3:
00345 self.goal.pointing_frame = str[start:end].decode('utf-8')
00346 else:
00347 self.goal.pointing_frame = str[start:end]
00348 _x = self
00349 start = end
00350 end += 16
00351 (_x.goal.min_duration.secs, _x.goal.min_duration.nsecs, _x.goal.max_velocity,) = _struct_2id.unpack(str[start:end])
00352 return self
00353 except struct.error as e:
00354 raise genpy.DeserializationError(e)
00355
00356 _struct_I = genpy.struct_I
00357 _struct_3I = struct.Struct("<3I")
00358 _struct_6d = struct.Struct("<6d")
00359 _struct_2I = struct.Struct("<2I")
00360 _struct_2id = struct.Struct("<2id")