$search
00001 """autogenerated by genmsg_py from ExecFootstepsActionGoal.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import geometry_msgs.msg 00006 import roslib.rostime 00007 import actionlib_msgs.msg 00008 import humanoid_nav_msgs.msg 00009 import std_msgs.msg 00010 00011 class ExecFootstepsActionGoal(roslib.message.Message): 00012 _md5sum = "c460c01f665b894cf2e45a340e1a98a9" 00013 _type = "humanoid_nav_msgs/ExecFootstepsActionGoal" 00014 _has_header = True #flag to mark the presence of a Header object 00015 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00016 00017 Header header 00018 actionlib_msgs/GoalID goal_id 00019 ExecFootstepsGoal goal 00020 00021 ================================================================================ 00022 MSG: std_msgs/Header 00023 # Standard metadata for higher-level stamped data types. 00024 # This is generally used to communicate timestamped data 00025 # in a particular coordinate frame. 00026 # 00027 # sequence ID: consecutively increasing ID 00028 uint32 seq 00029 #Two-integer timestamp that is expressed as: 00030 # * stamp.secs: seconds (stamp_secs) since epoch 00031 # * stamp.nsecs: nanoseconds since stamp_secs 00032 # time-handling sugar is provided by the client library 00033 time stamp 00034 #Frame this data is associated with 00035 # 0: no frame 00036 # 1: global frame 00037 string frame_id 00038 00039 ================================================================================ 00040 MSG: actionlib_msgs/GoalID 00041 # The stamp should store the time at which this goal was requested. 00042 # It is used by an action server when it tries to preempt all 00043 # goals that were requested before a certain time 00044 time stamp 00045 00046 # The id provides a way to associate feedback and 00047 # result message with specific goal requests. The id 00048 # specified must be unique. 00049 string id 00050 00051 00052 ================================================================================ 00053 MSG: humanoid_nav_msgs/ExecFootstepsGoal 00054 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00055 # Define the goal 00056 humanoid_nav_msgs/StepTarget[] footsteps 00057 float64 feedback_frequency 00058 00059 ================================================================================ 00060 MSG: humanoid_nav_msgs/StepTarget 00061 # Target for a single stepping motion of a humanoid's leg 00062 00063 geometry_msgs/Pose2D pose # step pose as relative offset to last leg 00064 uint8 leg # which leg to use (left/right, see below) 00065 00066 uint8 right=0 # right leg constant 00067 uint8 left=1 # left leg constant 00068 00069 ================================================================================ 00070 MSG: geometry_msgs/Pose2D 00071 # This expresses a position and orientation on a 2D manifold. 00072 00073 float64 x 00074 float64 y 00075 float64 theta 00076 """ 00077 __slots__ = ['header','goal_id','goal'] 00078 _slot_types = ['Header','actionlib_msgs/GoalID','humanoid_nav_msgs/ExecFootstepsGoal'] 00079 00080 def __init__(self, *args, **kwds): 00081 """ 00082 Constructor. Any message fields that are implicitly/explicitly 00083 set to None will be assigned a default value. The recommend 00084 use is keyword arguments as this is more robust to future message 00085 changes. You cannot mix in-order arguments and keyword arguments. 00086 00087 The available fields are: 00088 header,goal_id,goal 00089 00090 @param args: complete set of field values, in .msg order 00091 @param kwds: use keyword arguments corresponding to message field names 00092 to set specific fields. 00093 """ 00094 if args or kwds: 00095 super(ExecFootstepsActionGoal, self).__init__(*args, **kwds) 00096 #message fields cannot be None, assign default values for those that are 00097 if self.header is None: 00098 self.header = std_msgs.msg._Header.Header() 00099 if self.goal_id is None: 00100 self.goal_id = actionlib_msgs.msg.GoalID() 00101 if self.goal is None: 00102 self.goal = humanoid_nav_msgs.msg.ExecFootstepsGoal() 00103 else: 00104 self.header = std_msgs.msg._Header.Header() 00105 self.goal_id = actionlib_msgs.msg.GoalID() 00106 self.goal = humanoid_nav_msgs.msg.ExecFootstepsGoal() 00107 00108 def _get_types(self): 00109 """ 00110 internal API method 00111 """ 00112 return self._slot_types 00113 00114 def serialize(self, buff): 00115 """ 00116 serialize message into buffer 00117 @param buff: buffer 00118 @type buff: StringIO 00119 """ 00120 try: 00121 _x = self 00122 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00123 _x = self.header.frame_id 00124 length = len(_x) 00125 buff.write(struct.pack('<I%ss'%length, length, _x)) 00126 _x = self 00127 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs)) 00128 _x = self.goal_id.id 00129 length = len(_x) 00130 buff.write(struct.pack('<I%ss'%length, length, _x)) 00131 length = len(self.goal.footsteps) 00132 buff.write(_struct_I.pack(length)) 00133 for val1 in self.goal.footsteps: 00134 _v1 = val1.pose 00135 _x = _v1 00136 buff.write(_struct_3d.pack(_x.x, _x.y, _x.theta)) 00137 buff.write(_struct_B.pack(val1.leg)) 00138 buff.write(_struct_d.pack(self.goal.feedback_frequency)) 00139 except struct.error as se: self._check_types(se) 00140 except TypeError as te: self._check_types(te) 00141 00142 def deserialize(self, str): 00143 """ 00144 unpack serialized message in str into this message instance 00145 @param str: byte array of serialized message 00146 @type str: str 00147 """ 00148 try: 00149 if self.header is None: 00150 self.header = std_msgs.msg._Header.Header() 00151 if self.goal_id is None: 00152 self.goal_id = actionlib_msgs.msg.GoalID() 00153 if self.goal is None: 00154 self.goal = humanoid_nav_msgs.msg.ExecFootstepsGoal() 00155 end = 0 00156 _x = self 00157 start = end 00158 end += 12 00159 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00160 start = end 00161 end += 4 00162 (length,) = _struct_I.unpack(str[start:end]) 00163 start = end 00164 end += length 00165 self.header.frame_id = str[start:end] 00166 _x = self 00167 start = end 00168 end += 8 00169 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00170 start = end 00171 end += 4 00172 (length,) = _struct_I.unpack(str[start:end]) 00173 start = end 00174 end += length 00175 self.goal_id.id = str[start:end] 00176 start = end 00177 end += 4 00178 (length,) = _struct_I.unpack(str[start:end]) 00179 self.goal.footsteps = [] 00180 for i in range(0, length): 00181 val1 = humanoid_nav_msgs.msg.StepTarget() 00182 _v2 = val1.pose 00183 _x = _v2 00184 start = end 00185 end += 24 00186 (_x.x, _x.y, _x.theta,) = _struct_3d.unpack(str[start:end]) 00187 start = end 00188 end += 1 00189 (val1.leg,) = _struct_B.unpack(str[start:end]) 00190 self.goal.footsteps.append(val1) 00191 start = end 00192 end += 8 00193 (self.goal.feedback_frequency,) = _struct_d.unpack(str[start:end]) 00194 return self 00195 except struct.error as e: 00196 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00197 00198 00199 def serialize_numpy(self, buff, numpy): 00200 """ 00201 serialize message with numpy array types into buffer 00202 @param buff: buffer 00203 @type buff: StringIO 00204 @param numpy: numpy python module 00205 @type numpy module 00206 """ 00207 try: 00208 _x = self 00209 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00210 _x = self.header.frame_id 00211 length = len(_x) 00212 buff.write(struct.pack('<I%ss'%length, length, _x)) 00213 _x = self 00214 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs)) 00215 _x = self.goal_id.id 00216 length = len(_x) 00217 buff.write(struct.pack('<I%ss'%length, length, _x)) 00218 length = len(self.goal.footsteps) 00219 buff.write(_struct_I.pack(length)) 00220 for val1 in self.goal.footsteps: 00221 _v3 = val1.pose 00222 _x = _v3 00223 buff.write(_struct_3d.pack(_x.x, _x.y, _x.theta)) 00224 buff.write(_struct_B.pack(val1.leg)) 00225 buff.write(_struct_d.pack(self.goal.feedback_frequency)) 00226 except struct.error as se: self._check_types(se) 00227 except TypeError as te: self._check_types(te) 00228 00229 def deserialize_numpy(self, str, numpy): 00230 """ 00231 unpack serialized message in str into this message instance using numpy for array types 00232 @param str: byte array of serialized message 00233 @type str: str 00234 @param numpy: numpy python module 00235 @type numpy: module 00236 """ 00237 try: 00238 if self.header is None: 00239 self.header = std_msgs.msg._Header.Header() 00240 if self.goal_id is None: 00241 self.goal_id = actionlib_msgs.msg.GoalID() 00242 if self.goal is None: 00243 self.goal = humanoid_nav_msgs.msg.ExecFootstepsGoal() 00244 end = 0 00245 _x = self 00246 start = end 00247 end += 12 00248 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00249 start = end 00250 end += 4 00251 (length,) = _struct_I.unpack(str[start:end]) 00252 start = end 00253 end += length 00254 self.header.frame_id = str[start:end] 00255 _x = self 00256 start = end 00257 end += 8 00258 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00259 start = end 00260 end += 4 00261 (length,) = _struct_I.unpack(str[start:end]) 00262 start = end 00263 end += length 00264 self.goal_id.id = str[start:end] 00265 start = end 00266 end += 4 00267 (length,) = _struct_I.unpack(str[start:end]) 00268 self.goal.footsteps = [] 00269 for i in range(0, length): 00270 val1 = humanoid_nav_msgs.msg.StepTarget() 00271 _v4 = val1.pose 00272 _x = _v4 00273 start = end 00274 end += 24 00275 (_x.x, _x.y, _x.theta,) = _struct_3d.unpack(str[start:end]) 00276 start = end 00277 end += 1 00278 (val1.leg,) = _struct_B.unpack(str[start:end]) 00279 self.goal.footsteps.append(val1) 00280 start = end 00281 end += 8 00282 (self.goal.feedback_frequency,) = _struct_d.unpack(str[start:end]) 00283 return self 00284 except struct.error as e: 00285 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00286 00287 _struct_I = roslib.message.struct_I 00288 _struct_d = struct.Struct("<d") 00289 _struct_3I = struct.Struct("<3I") 00290 _struct_B = struct.Struct("<B") 00291 _struct_2I = struct.Struct("<2I") 00292 _struct_3d = struct.Struct("<3d")