$search
00001 """autogenerated by genmsg_py from StepTarget.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import geometry_msgs.msg 00006 00007 class StepTarget(roslib.message.Message): 00008 _md5sum = "8ccf34ddb67039fbda0d9b2515ebb1ea" 00009 _type = "humanoid_nav_msgs/StepTarget" 00010 _has_header = False #flag to mark the presence of a Header object 00011 _full_text = """# Target for a single stepping motion of a humanoid's leg 00012 00013 geometry_msgs/Pose2D pose # step pose as relative offset to last leg 00014 uint8 leg # which leg to use (left/right, see below) 00015 00016 uint8 right=0 # right leg constant 00017 uint8 left=1 # left leg constant 00018 00019 ================================================================================ 00020 MSG: geometry_msgs/Pose2D 00021 # This expresses a position and orientation on a 2D manifold. 00022 00023 float64 x 00024 float64 y 00025 float64 theta 00026 """ 00027 # Pseudo-constants 00028 right = 0 00029 left = 1 00030 00031 __slots__ = ['pose','leg'] 00032 _slot_types = ['geometry_msgs/Pose2D','uint8'] 00033 00034 def __init__(self, *args, **kwds): 00035 """ 00036 Constructor. Any message fields that are implicitly/explicitly 00037 set to None will be assigned a default value. The recommend 00038 use is keyword arguments as this is more robust to future message 00039 changes. You cannot mix in-order arguments and keyword arguments. 00040 00041 The available fields are: 00042 pose,leg 00043 00044 @param args: complete set of field values, in .msg order 00045 @param kwds: use keyword arguments corresponding to message field names 00046 to set specific fields. 00047 """ 00048 if args or kwds: 00049 super(StepTarget, self).__init__(*args, **kwds) 00050 #message fields cannot be None, assign default values for those that are 00051 if self.pose is None: 00052 self.pose = geometry_msgs.msg.Pose2D() 00053 if self.leg is None: 00054 self.leg = 0 00055 else: 00056 self.pose = geometry_msgs.msg.Pose2D() 00057 self.leg = 0 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 _x = self 00073 buff.write(_struct_3dB.pack(_x.pose.x, _x.pose.y, _x.pose.theta, _x.leg)) 00074 except struct.error as se: self._check_types(se) 00075 except TypeError as te: self._check_types(te) 00076 00077 def deserialize(self, str): 00078 """ 00079 unpack serialized message in str into this message instance 00080 @param str: byte array of serialized message 00081 @type str: str 00082 """ 00083 try: 00084 if self.pose is None: 00085 self.pose = geometry_msgs.msg.Pose2D() 00086 end = 0 00087 _x = self 00088 start = end 00089 end += 25 00090 (_x.pose.x, _x.pose.y, _x.pose.theta, _x.leg,) = _struct_3dB.unpack(str[start:end]) 00091 return self 00092 except struct.error as e: 00093 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00094 00095 00096 def serialize_numpy(self, buff, numpy): 00097 """ 00098 serialize message with numpy array types into buffer 00099 @param buff: buffer 00100 @type buff: StringIO 00101 @param numpy: numpy python module 00102 @type numpy module 00103 """ 00104 try: 00105 _x = self 00106 buff.write(_struct_3dB.pack(_x.pose.x, _x.pose.y, _x.pose.theta, _x.leg)) 00107 except struct.error as se: self._check_types(se) 00108 except TypeError as te: self._check_types(te) 00109 00110 def deserialize_numpy(self, str, numpy): 00111 """ 00112 unpack serialized message in str into this message instance using numpy for array types 00113 @param str: byte array of serialized message 00114 @type str: str 00115 @param numpy: numpy python module 00116 @type numpy: module 00117 """ 00118 try: 00119 if self.pose is None: 00120 self.pose = geometry_msgs.msg.Pose2D() 00121 end = 0 00122 _x = self 00123 start = end 00124 end += 25 00125 (_x.pose.x, _x.pose.y, _x.pose.theta, _x.leg,) = _struct_3dB.unpack(str[start:end]) 00126 return self 00127 except struct.error as e: 00128 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00129 00130 _struct_I = roslib.message.struct_I 00131 _struct_3dB = struct.Struct("<3dB")