00001 """autogenerated by genpy from humanoid_nav_msgs/ExecFootstepsActionGoal.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 genpy
00009 import actionlib_msgs.msg
00010 import humanoid_nav_msgs.msg
00011 import std_msgs.msg
00012
00013 class ExecFootstepsActionGoal(genpy.Message):
00014 _md5sum = "c460c01f665b894cf2e45a340e1a98a9"
00015 _type = "humanoid_nav_msgs/ExecFootstepsActionGoal"
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 ExecFootstepsGoal 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: humanoid_nav_msgs/ExecFootstepsGoal
00056 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00057 # Define the goal
00058 humanoid_nav_msgs/StepTarget[] footsteps
00059 float64 feedback_frequency
00060
00061 ================================================================================
00062 MSG: humanoid_nav_msgs/StepTarget
00063 # Target for a single stepping motion of a humanoid's leg
00064
00065 geometry_msgs/Pose2D pose # step pose as relative offset to last leg
00066 uint8 leg # which leg to use (left/right, see below)
00067
00068 uint8 right=0 # right leg constant
00069 uint8 left=1 # left leg constant
00070
00071 ================================================================================
00072 MSG: geometry_msgs/Pose2D
00073 # This expresses a position and orientation on a 2D manifold.
00074
00075 float64 x
00076 float64 y
00077 float64 theta
00078 """
00079 __slots__ = ['header','goal_id','goal']
00080 _slot_types = ['std_msgs/Header','actionlib_msgs/GoalID','humanoid_nav_msgs/ExecFootstepsGoal']
00081
00082 def __init__(self, *args, **kwds):
00083 """
00084 Constructor. Any message fields that are implicitly/explicitly
00085 set to None will be assigned a default value. The recommend
00086 use is keyword arguments as this is more robust to future message
00087 changes. You cannot mix in-order arguments and keyword arguments.
00088
00089 The available fields are:
00090 header,goal_id,goal
00091
00092 :param args: complete set of field values, in .msg order
00093 :param kwds: use keyword arguments corresponding to message field names
00094 to set specific fields.
00095 """
00096 if args or kwds:
00097 super(ExecFootstepsActionGoal, self).__init__(*args, **kwds)
00098
00099 if self.header is None:
00100 self.header = std_msgs.msg.Header()
00101 if self.goal_id is None:
00102 self.goal_id = actionlib_msgs.msg.GoalID()
00103 if self.goal is None:
00104 self.goal = humanoid_nav_msgs.msg.ExecFootstepsGoal()
00105 else:
00106 self.header = std_msgs.msg.Header()
00107 self.goal_id = actionlib_msgs.msg.GoalID()
00108 self.goal = humanoid_nav_msgs.msg.ExecFootstepsGoal()
00109
00110 def _get_types(self):
00111 """
00112 internal API method
00113 """
00114 return self._slot_types
00115
00116 def serialize(self, buff):
00117 """
00118 serialize message into buffer
00119 :param buff: buffer, ``StringIO``
00120 """
00121 try:
00122 _x = self
00123 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00124 _x = self.header.frame_id
00125 length = len(_x)
00126 if python3 or type(_x) == unicode:
00127 _x = _x.encode('utf-8')
00128 length = len(_x)
00129 buff.write(struct.pack('<I%ss'%length, length, _x))
00130 _x = self
00131 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs))
00132 _x = self.goal_id.id
00133 length = len(_x)
00134 if python3 or type(_x) == unicode:
00135 _x = _x.encode('utf-8')
00136 length = len(_x)
00137 buff.write(struct.pack('<I%ss'%length, length, _x))
00138 length = len(self.goal.footsteps)
00139 buff.write(_struct_I.pack(length))
00140 for val1 in self.goal.footsteps:
00141 _v1 = val1.pose
00142 _x = _v1
00143 buff.write(_struct_3d.pack(_x.x, _x.y, _x.theta))
00144 buff.write(_struct_B.pack(val1.leg))
00145 buff.write(_struct_d.pack(self.goal.feedback_frequency))
00146 except struct.error as se: self._check_types(se)
00147 except TypeError as te: self._check_types(te)
00148
00149 def deserialize(self, str):
00150 """
00151 unpack serialized message in str into this message instance
00152 :param str: byte array of serialized message, ``str``
00153 """
00154 try:
00155 if self.header is None:
00156 self.header = std_msgs.msg.Header()
00157 if self.goal_id is None:
00158 self.goal_id = actionlib_msgs.msg.GoalID()
00159 if self.goal is None:
00160 self.goal = humanoid_nav_msgs.msg.ExecFootstepsGoal()
00161 end = 0
00162 _x = self
00163 start = end
00164 end += 12
00165 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00166 start = end
00167 end += 4
00168 (length,) = _struct_I.unpack(str[start:end])
00169 start = end
00170 end += length
00171 if python3:
00172 self.header.frame_id = str[start:end].decode('utf-8')
00173 else:
00174 self.header.frame_id = str[start:end]
00175 _x = self
00176 start = end
00177 end += 8
00178 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00179 start = end
00180 end += 4
00181 (length,) = _struct_I.unpack(str[start:end])
00182 start = end
00183 end += length
00184 if python3:
00185 self.goal_id.id = str[start:end].decode('utf-8')
00186 else:
00187 self.goal_id.id = str[start:end]
00188 start = end
00189 end += 4
00190 (length,) = _struct_I.unpack(str[start:end])
00191 self.goal.footsteps = []
00192 for i in range(0, length):
00193 val1 = humanoid_nav_msgs.msg.StepTarget()
00194 _v2 = val1.pose
00195 _x = _v2
00196 start = end
00197 end += 24
00198 (_x.x, _x.y, _x.theta,) = _struct_3d.unpack(str[start:end])
00199 start = end
00200 end += 1
00201 (val1.leg,) = _struct_B.unpack(str[start:end])
00202 self.goal.footsteps.append(val1)
00203 start = end
00204 end += 8
00205 (self.goal.feedback_frequency,) = _struct_d.unpack(str[start:end])
00206 return self
00207 except struct.error as e:
00208 raise genpy.DeserializationError(e)
00209
00210
00211 def serialize_numpy(self, buff, numpy):
00212 """
00213 serialize message with numpy array types into buffer
00214 :param buff: buffer, ``StringIO``
00215 :param numpy: numpy python module
00216 """
00217 try:
00218 _x = self
00219 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00220 _x = self.header.frame_id
00221 length = len(_x)
00222 if python3 or type(_x) == unicode:
00223 _x = _x.encode('utf-8')
00224 length = len(_x)
00225 buff.write(struct.pack('<I%ss'%length, length, _x))
00226 _x = self
00227 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs))
00228 _x = self.goal_id.id
00229 length = len(_x)
00230 if python3 or type(_x) == unicode:
00231 _x = _x.encode('utf-8')
00232 length = len(_x)
00233 buff.write(struct.pack('<I%ss'%length, length, _x))
00234 length = len(self.goal.footsteps)
00235 buff.write(_struct_I.pack(length))
00236 for val1 in self.goal.footsteps:
00237 _v3 = val1.pose
00238 _x = _v3
00239 buff.write(_struct_3d.pack(_x.x, _x.y, _x.theta))
00240 buff.write(_struct_B.pack(val1.leg))
00241 buff.write(_struct_d.pack(self.goal.feedback_frequency))
00242 except struct.error as se: self._check_types(se)
00243 except TypeError as te: self._check_types(te)
00244
00245 def deserialize_numpy(self, str, numpy):
00246 """
00247 unpack serialized message in str into this message instance using numpy for array types
00248 :param str: byte array of serialized message, ``str``
00249 :param numpy: numpy python module
00250 """
00251 try:
00252 if self.header is None:
00253 self.header = std_msgs.msg.Header()
00254 if self.goal_id is None:
00255 self.goal_id = actionlib_msgs.msg.GoalID()
00256 if self.goal is None:
00257 self.goal = humanoid_nav_msgs.msg.ExecFootstepsGoal()
00258 end = 0
00259 _x = self
00260 start = end
00261 end += 12
00262 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00263 start = end
00264 end += 4
00265 (length,) = _struct_I.unpack(str[start:end])
00266 start = end
00267 end += length
00268 if python3:
00269 self.header.frame_id = str[start:end].decode('utf-8')
00270 else:
00271 self.header.frame_id = str[start:end]
00272 _x = self
00273 start = end
00274 end += 8
00275 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00276 start = end
00277 end += 4
00278 (length,) = _struct_I.unpack(str[start:end])
00279 start = end
00280 end += length
00281 if python3:
00282 self.goal_id.id = str[start:end].decode('utf-8')
00283 else:
00284 self.goal_id.id = str[start:end]
00285 start = end
00286 end += 4
00287 (length,) = _struct_I.unpack(str[start:end])
00288 self.goal.footsteps = []
00289 for i in range(0, length):
00290 val1 = humanoid_nav_msgs.msg.StepTarget()
00291 _v4 = val1.pose
00292 _x = _v4
00293 start = end
00294 end += 24
00295 (_x.x, _x.y, _x.theta,) = _struct_3d.unpack(str[start:end])
00296 start = end
00297 end += 1
00298 (val1.leg,) = _struct_B.unpack(str[start:end])
00299 self.goal.footsteps.append(val1)
00300 start = end
00301 end += 8
00302 (self.goal.feedback_frequency,) = _struct_d.unpack(str[start:end])
00303 return self
00304 except struct.error as e:
00305 raise genpy.DeserializationError(e)
00306
00307 _struct_I = genpy.struct_I
00308 _struct_d = struct.Struct("<d")
00309 _struct_3I = struct.Struct("<3I")
00310 _struct_B = struct.Struct("<B")
00311 _struct_2I = struct.Struct("<2I")
00312 _struct_3d = struct.Struct("<3d")