$search
00001 """autogenerated by genmsg_py from ExecFootstepsGoal.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import geometry_msgs.msg 00006 import humanoid_nav_msgs.msg 00007 00008 class ExecFootstepsGoal(roslib.message.Message): 00009 _md5sum = "40a3f8092ef3bb49c3253baa6eb94932" 00010 _type = "humanoid_nav_msgs/ExecFootstepsGoal" 00011 _has_header = False #flag to mark the presence of a Header object 00012 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00013 # Define the goal 00014 humanoid_nav_msgs/StepTarget[] footsteps 00015 float64 feedback_frequency 00016 00017 ================================================================================ 00018 MSG: humanoid_nav_msgs/StepTarget 00019 # Target for a single stepping motion of a humanoid's leg 00020 00021 geometry_msgs/Pose2D pose # step pose as relative offset to last leg 00022 uint8 leg # which leg to use (left/right, see below) 00023 00024 uint8 right=0 # right leg constant 00025 uint8 left=1 # left leg constant 00026 00027 ================================================================================ 00028 MSG: geometry_msgs/Pose2D 00029 # This expresses a position and orientation on a 2D manifold. 00030 00031 float64 x 00032 float64 y 00033 float64 theta 00034 """ 00035 __slots__ = ['footsteps','feedback_frequency'] 00036 _slot_types = ['humanoid_nav_msgs/StepTarget[]','float64'] 00037 00038 def __init__(self, *args, **kwds): 00039 """ 00040 Constructor. Any message fields that are implicitly/explicitly 00041 set to None will be assigned a default value. The recommend 00042 use is keyword arguments as this is more robust to future message 00043 changes. You cannot mix in-order arguments and keyword arguments. 00044 00045 The available fields are: 00046 footsteps,feedback_frequency 00047 00048 @param args: complete set of field values, in .msg order 00049 @param kwds: use keyword arguments corresponding to message field names 00050 to set specific fields. 00051 """ 00052 if args or kwds: 00053 super(ExecFootstepsGoal, self).__init__(*args, **kwds) 00054 #message fields cannot be None, assign default values for those that are 00055 if self.footsteps is None: 00056 self.footsteps = [] 00057 if self.feedback_frequency is None: 00058 self.feedback_frequency = 0. 00059 else: 00060 self.footsteps = [] 00061 self.feedback_frequency = 0. 00062 00063 def _get_types(self): 00064 """ 00065 internal API method 00066 """ 00067 return self._slot_types 00068 00069 def serialize(self, buff): 00070 """ 00071 serialize message into buffer 00072 @param buff: buffer 00073 @type buff: StringIO 00074 """ 00075 try: 00076 length = len(self.footsteps) 00077 buff.write(_struct_I.pack(length)) 00078 for val1 in self.footsteps: 00079 _v1 = val1.pose 00080 _x = _v1 00081 buff.write(_struct_3d.pack(_x.x, _x.y, _x.theta)) 00082 buff.write(_struct_B.pack(val1.leg)) 00083 buff.write(_struct_d.pack(self.feedback_frequency)) 00084 except struct.error as se: self._check_types(se) 00085 except TypeError as te: self._check_types(te) 00086 00087 def deserialize(self, str): 00088 """ 00089 unpack serialized message in str into this message instance 00090 @param str: byte array of serialized message 00091 @type str: str 00092 """ 00093 try: 00094 end = 0 00095 start = end 00096 end += 4 00097 (length,) = _struct_I.unpack(str[start:end]) 00098 self.footsteps = [] 00099 for i in range(0, length): 00100 val1 = humanoid_nav_msgs.msg.StepTarget() 00101 _v2 = val1.pose 00102 _x = _v2 00103 start = end 00104 end += 24 00105 (_x.x, _x.y, _x.theta,) = _struct_3d.unpack(str[start:end]) 00106 start = end 00107 end += 1 00108 (val1.leg,) = _struct_B.unpack(str[start:end]) 00109 self.footsteps.append(val1) 00110 start = end 00111 end += 8 00112 (self.feedback_frequency,) = _struct_d.unpack(str[start:end]) 00113 return self 00114 except struct.error as e: 00115 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00116 00117 00118 def serialize_numpy(self, buff, numpy): 00119 """ 00120 serialize message with numpy array types into buffer 00121 @param buff: buffer 00122 @type buff: StringIO 00123 @param numpy: numpy python module 00124 @type numpy module 00125 """ 00126 try: 00127 length = len(self.footsteps) 00128 buff.write(_struct_I.pack(length)) 00129 for val1 in self.footsteps: 00130 _v3 = val1.pose 00131 _x = _v3 00132 buff.write(_struct_3d.pack(_x.x, _x.y, _x.theta)) 00133 buff.write(_struct_B.pack(val1.leg)) 00134 buff.write(_struct_d.pack(self.feedback_frequency)) 00135 except struct.error as se: self._check_types(se) 00136 except TypeError as te: self._check_types(te) 00137 00138 def deserialize_numpy(self, str, numpy): 00139 """ 00140 unpack serialized message in str into this message instance using numpy for array types 00141 @param str: byte array of serialized message 00142 @type str: str 00143 @param numpy: numpy python module 00144 @type numpy: module 00145 """ 00146 try: 00147 end = 0 00148 start = end 00149 end += 4 00150 (length,) = _struct_I.unpack(str[start:end]) 00151 self.footsteps = [] 00152 for i in range(0, length): 00153 val1 = humanoid_nav_msgs.msg.StepTarget() 00154 _v4 = val1.pose 00155 _x = _v4 00156 start = end 00157 end += 24 00158 (_x.x, _x.y, _x.theta,) = _struct_3d.unpack(str[start:end]) 00159 start = end 00160 end += 1 00161 (val1.leg,) = _struct_B.unpack(str[start:end]) 00162 self.footsteps.append(val1) 00163 start = end 00164 end += 8 00165 (self.feedback_frequency,) = _struct_d.unpack(str[start:end]) 00166 return self 00167 except struct.error as e: 00168 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00169 00170 _struct_I = roslib.message.struct_I 00171 _struct_B = struct.Struct("<B") 00172 _struct_d = struct.Struct("<d") 00173 _struct_3d = struct.Struct("<3d")