$search
00001 """autogenerated by genmsg_py from ExecFootstepsFeedback.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 ExecFootstepsFeedback(roslib.message.Message): 00009 _md5sum = "5dfde2cb244d6c76567d3c52c40a988c" 00010 _type = "humanoid_nav_msgs/ExecFootstepsFeedback" 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 a feedback message 00014 humanoid_nav_msgs/StepTarget[] executed_footsteps 00015 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__ = ['executed_footsteps'] 00036 _slot_types = ['humanoid_nav_msgs/StepTarget[]'] 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 executed_footsteps 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(ExecFootstepsFeedback, self).__init__(*args, **kwds) 00054 #message fields cannot be None, assign default values for those that are 00055 if self.executed_footsteps is None: 00056 self.executed_footsteps = [] 00057 else: 00058 self.executed_footsteps = [] 00059 00060 def _get_types(self): 00061 """ 00062 internal API method 00063 """ 00064 return self._slot_types 00065 00066 def serialize(self, buff): 00067 """ 00068 serialize message into buffer 00069 @param buff: buffer 00070 @type buff: StringIO 00071 """ 00072 try: 00073 length = len(self.executed_footsteps) 00074 buff.write(_struct_I.pack(length)) 00075 for val1 in self.executed_footsteps: 00076 _v1 = val1.pose 00077 _x = _v1 00078 buff.write(_struct_3d.pack(_x.x, _x.y, _x.theta)) 00079 buff.write(_struct_B.pack(val1.leg)) 00080 except struct.error as se: self._check_types(se) 00081 except TypeError as te: self._check_types(te) 00082 00083 def deserialize(self, str): 00084 """ 00085 unpack serialized message in str into this message instance 00086 @param str: byte array of serialized message 00087 @type str: str 00088 """ 00089 try: 00090 end = 0 00091 start = end 00092 end += 4 00093 (length,) = _struct_I.unpack(str[start:end]) 00094 self.executed_footsteps = [] 00095 for i in range(0, length): 00096 val1 = humanoid_nav_msgs.msg.StepTarget() 00097 _v2 = val1.pose 00098 _x = _v2 00099 start = end 00100 end += 24 00101 (_x.x, _x.y, _x.theta,) = _struct_3d.unpack(str[start:end]) 00102 start = end 00103 end += 1 00104 (val1.leg,) = _struct_B.unpack(str[start:end]) 00105 self.executed_footsteps.append(val1) 00106 return self 00107 except struct.error as e: 00108 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00109 00110 00111 def serialize_numpy(self, buff, numpy): 00112 """ 00113 serialize message with numpy array types into buffer 00114 @param buff: buffer 00115 @type buff: StringIO 00116 @param numpy: numpy python module 00117 @type numpy module 00118 """ 00119 try: 00120 length = len(self.executed_footsteps) 00121 buff.write(_struct_I.pack(length)) 00122 for val1 in self.executed_footsteps: 00123 _v3 = val1.pose 00124 _x = _v3 00125 buff.write(_struct_3d.pack(_x.x, _x.y, _x.theta)) 00126 buff.write(_struct_B.pack(val1.leg)) 00127 except struct.error as se: self._check_types(se) 00128 except TypeError as te: self._check_types(te) 00129 00130 def deserialize_numpy(self, str, numpy): 00131 """ 00132 unpack serialized message in str into this message instance using numpy for array types 00133 @param str: byte array of serialized message 00134 @type str: str 00135 @param numpy: numpy python module 00136 @type numpy: module 00137 """ 00138 try: 00139 end = 0 00140 start = end 00141 end += 4 00142 (length,) = _struct_I.unpack(str[start:end]) 00143 self.executed_footsteps = [] 00144 for i in range(0, length): 00145 val1 = humanoid_nav_msgs.msg.StepTarget() 00146 _v4 = val1.pose 00147 _x = _v4 00148 start = end 00149 end += 24 00150 (_x.x, _x.y, _x.theta,) = _struct_3d.unpack(str[start:end]) 00151 start = end 00152 end += 1 00153 (val1.leg,) = _struct_B.unpack(str[start:end]) 00154 self.executed_footsteps.append(val1) 00155 return self 00156 except struct.error as e: 00157 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00158 00159 _struct_I = roslib.message.struct_I 00160 _struct_B = struct.Struct("<B") 00161 _struct_3d = struct.Struct("<3d")