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