$search
00001 """autogenerated by genmsg_py from CmdVelServiceRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import geometry_msgs.msg 00006 00007 class CmdVelServiceRequest(roslib.message.Message): 00008 _md5sum = "a787b2802160dcc7fe02d089e10afe56" 00009 _type = "nao_msgs/CmdVelServiceRequest" 00010 _has_header = False #flag to mark the presence of a Header object 00011 _full_text = """ 00012 geometry_msgs/Twist twist 00013 00014 ================================================================================ 00015 MSG: geometry_msgs/Twist 00016 # This expresses velocity in free space broken into it's linear and angular parts. 00017 Vector3 linear 00018 Vector3 angular 00019 00020 ================================================================================ 00021 MSG: geometry_msgs/Vector3 00022 # This represents a vector in free space. 00023 00024 float64 x 00025 float64 y 00026 float64 z 00027 """ 00028 __slots__ = ['twist'] 00029 _slot_types = ['geometry_msgs/Twist'] 00030 00031 def __init__(self, *args, **kwds): 00032 """ 00033 Constructor. Any message fields that are implicitly/explicitly 00034 set to None will be assigned a default value. The recommend 00035 use is keyword arguments as this is more robust to future message 00036 changes. You cannot mix in-order arguments and keyword arguments. 00037 00038 The available fields are: 00039 twist 00040 00041 @param args: complete set of field values, in .msg order 00042 @param kwds: use keyword arguments corresponding to message field names 00043 to set specific fields. 00044 """ 00045 if args or kwds: 00046 super(CmdVelServiceRequest, self).__init__(*args, **kwds) 00047 #message fields cannot be None, assign default values for those that are 00048 if self.twist is None: 00049 self.twist = geometry_msgs.msg.Twist() 00050 else: 00051 self.twist = geometry_msgs.msg.Twist() 00052 00053 def _get_types(self): 00054 """ 00055 internal API method 00056 """ 00057 return self._slot_types 00058 00059 def serialize(self, buff): 00060 """ 00061 serialize message into buffer 00062 @param buff: buffer 00063 @type buff: StringIO 00064 """ 00065 try: 00066 _x = self 00067 buff.write(_struct_6d.pack(_x.twist.linear.x, _x.twist.linear.y, _x.twist.linear.z, _x.twist.angular.x, _x.twist.angular.y, _x.twist.angular.z)) 00068 except struct.error as se: self._check_types(se) 00069 except TypeError as te: self._check_types(te) 00070 00071 def deserialize(self, str): 00072 """ 00073 unpack serialized message in str into this message instance 00074 @param str: byte array of serialized message 00075 @type str: str 00076 """ 00077 try: 00078 if self.twist is None: 00079 self.twist = geometry_msgs.msg.Twist() 00080 end = 0 00081 _x = self 00082 start = end 00083 end += 48 00084 (_x.twist.linear.x, _x.twist.linear.y, _x.twist.linear.z, _x.twist.angular.x, _x.twist.angular.y, _x.twist.angular.z,) = _struct_6d.unpack(str[start:end]) 00085 return self 00086 except struct.error as e: 00087 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00088 00089 00090 def serialize_numpy(self, buff, numpy): 00091 """ 00092 serialize message with numpy array types into buffer 00093 @param buff: buffer 00094 @type buff: StringIO 00095 @param numpy: numpy python module 00096 @type numpy module 00097 """ 00098 try: 00099 _x = self 00100 buff.write(_struct_6d.pack(_x.twist.linear.x, _x.twist.linear.y, _x.twist.linear.z, _x.twist.angular.x, _x.twist.angular.y, _x.twist.angular.z)) 00101 except struct.error as se: self._check_types(se) 00102 except TypeError as te: self._check_types(te) 00103 00104 def deserialize_numpy(self, str, numpy): 00105 """ 00106 unpack serialized message in str into this message instance using numpy for array types 00107 @param str: byte array of serialized message 00108 @type str: str 00109 @param numpy: numpy python module 00110 @type numpy: module 00111 """ 00112 try: 00113 if self.twist is None: 00114 self.twist = geometry_msgs.msg.Twist() 00115 end = 0 00116 _x = self 00117 start = end 00118 end += 48 00119 (_x.twist.linear.x, _x.twist.linear.y, _x.twist.linear.z, _x.twist.angular.x, _x.twist.angular.y, _x.twist.angular.z,) = _struct_6d.unpack(str[start:end]) 00120 return self 00121 except struct.error as e: 00122 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00123 00124 _struct_I = roslib.message.struct_I 00125 _struct_6d = struct.Struct("<6d") 00126 """autogenerated by genmsg_py from CmdVelServiceResponse.msg. Do not edit.""" 00127 import roslib.message 00128 import struct 00129 00130 00131 class CmdVelServiceResponse(roslib.message.Message): 00132 _md5sum = "d41d8cd98f00b204e9800998ecf8427e" 00133 _type = "nao_msgs/CmdVelServiceResponse" 00134 _has_header = False #flag to mark the presence of a Header object 00135 _full_text = """ 00136 00137 """ 00138 __slots__ = [] 00139 _slot_types = [] 00140 00141 def __init__(self, *args, **kwds): 00142 """ 00143 Constructor. Any message fields that are implicitly/explicitly 00144 set to None will be assigned a default value. The recommend 00145 use is keyword arguments as this is more robust to future message 00146 changes. You cannot mix in-order arguments and keyword arguments. 00147 00148 The available fields are: 00149 00150 00151 @param args: complete set of field values, in .msg order 00152 @param kwds: use keyword arguments corresponding to message field names 00153 to set specific fields. 00154 """ 00155 if args or kwds: 00156 super(CmdVelServiceResponse, self).__init__(*args, **kwds) 00157 00158 def _get_types(self): 00159 """ 00160 internal API method 00161 """ 00162 return self._slot_types 00163 00164 def serialize(self, buff): 00165 """ 00166 serialize message into buffer 00167 @param buff: buffer 00168 @type buff: StringIO 00169 """ 00170 try: 00171 pass 00172 except struct.error as se: self._check_types(se) 00173 except TypeError as te: self._check_types(te) 00174 00175 def deserialize(self, str): 00176 """ 00177 unpack serialized message in str into this message instance 00178 @param str: byte array of serialized message 00179 @type str: str 00180 """ 00181 try: 00182 end = 0 00183 return self 00184 except struct.error as e: 00185 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00186 00187 00188 def serialize_numpy(self, buff, numpy): 00189 """ 00190 serialize message with numpy array types into buffer 00191 @param buff: buffer 00192 @type buff: StringIO 00193 @param numpy: numpy python module 00194 @type numpy module 00195 """ 00196 try: 00197 pass 00198 except struct.error as se: self._check_types(se) 00199 except TypeError as te: self._check_types(te) 00200 00201 def deserialize_numpy(self, str, numpy): 00202 """ 00203 unpack serialized message in str into this message instance using numpy for array types 00204 @param str: byte array of serialized message 00205 @type str: str 00206 @param numpy: numpy python module 00207 @type numpy: module 00208 """ 00209 try: 00210 end = 0 00211 return self 00212 except struct.error as e: 00213 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00214 00215 _struct_I = roslib.message.struct_I 00216 class CmdVelService(roslib.message.ServiceDefinition): 00217 _type = 'nao_msgs/CmdVelService' 00218 _md5sum = 'a787b2802160dcc7fe02d089e10afe56' 00219 _request_class = CmdVelServiceRequest 00220 _response_class = CmdVelServiceResponse