$search
00001 """autogenerated by genmsg_py from GetModelStateRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class GetModelStateRequest(roslib.message.Message): 00007 _md5sum = "19d412713cefe4a67437e17a951e759e" 00008 _type = "gazebo/GetModelStateRequest" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """ 00011 00012 string model_name 00013 string relative_entity_name 00014 00015 00016 00017 00018 """ 00019 __slots__ = ['model_name','relative_entity_name'] 00020 _slot_types = ['string','string'] 00021 00022 def __init__(self, *args, **kwds): 00023 """ 00024 Constructor. Any message fields that are implicitly/explicitly 00025 set to None will be assigned a default value. The recommend 00026 use is keyword arguments as this is more robust to future message 00027 changes. You cannot mix in-order arguments and keyword arguments. 00028 00029 The available fields are: 00030 model_name,relative_entity_name 00031 00032 @param args: complete set of field values, in .msg order 00033 @param kwds: use keyword arguments corresponding to message field names 00034 to set specific fields. 00035 """ 00036 if args or kwds: 00037 super(GetModelStateRequest, self).__init__(*args, **kwds) 00038 #message fields cannot be None, assign default values for those that are 00039 if self.model_name is None: 00040 self.model_name = '' 00041 if self.relative_entity_name is None: 00042 self.relative_entity_name = '' 00043 else: 00044 self.model_name = '' 00045 self.relative_entity_name = '' 00046 00047 def _get_types(self): 00048 """ 00049 internal API method 00050 """ 00051 return self._slot_types 00052 00053 def serialize(self, buff): 00054 """ 00055 serialize message into buffer 00056 @param buff: buffer 00057 @type buff: StringIO 00058 """ 00059 try: 00060 _x = self.model_name 00061 length = len(_x) 00062 buff.write(struct.pack('<I%ss'%length, length, _x)) 00063 _x = self.relative_entity_name 00064 length = len(_x) 00065 buff.write(struct.pack('<I%ss'%length, length, _x)) 00066 except struct.error as se: self._check_types(se) 00067 except TypeError as te: self._check_types(te) 00068 00069 def deserialize(self, str): 00070 """ 00071 unpack serialized message in str into this message instance 00072 @param str: byte array of serialized message 00073 @type str: str 00074 """ 00075 try: 00076 end = 0 00077 start = end 00078 end += 4 00079 (length,) = _struct_I.unpack(str[start:end]) 00080 start = end 00081 end += length 00082 self.model_name = str[start:end] 00083 start = end 00084 end += 4 00085 (length,) = _struct_I.unpack(str[start:end]) 00086 start = end 00087 end += length 00088 self.relative_entity_name = str[start:end] 00089 return self 00090 except struct.error as e: 00091 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00092 00093 00094 def serialize_numpy(self, buff, numpy): 00095 """ 00096 serialize message with numpy array types into buffer 00097 @param buff: buffer 00098 @type buff: StringIO 00099 @param numpy: numpy python module 00100 @type numpy module 00101 """ 00102 try: 00103 _x = self.model_name 00104 length = len(_x) 00105 buff.write(struct.pack('<I%ss'%length, length, _x)) 00106 _x = self.relative_entity_name 00107 length = len(_x) 00108 buff.write(struct.pack('<I%ss'%length, length, _x)) 00109 except struct.error as se: self._check_types(se) 00110 except TypeError as te: self._check_types(te) 00111 00112 def deserialize_numpy(self, str, numpy): 00113 """ 00114 unpack serialized message in str into this message instance using numpy for array types 00115 @param str: byte array of serialized message 00116 @type str: str 00117 @param numpy: numpy python module 00118 @type numpy: module 00119 """ 00120 try: 00121 end = 0 00122 start = end 00123 end += 4 00124 (length,) = _struct_I.unpack(str[start:end]) 00125 start = end 00126 end += length 00127 self.model_name = str[start:end] 00128 start = end 00129 end += 4 00130 (length,) = _struct_I.unpack(str[start:end]) 00131 start = end 00132 end += length 00133 self.relative_entity_name = str[start:end] 00134 return self 00135 except struct.error as e: 00136 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00137 00138 _struct_I = roslib.message.struct_I 00139 """autogenerated by genmsg_py from GetModelStateResponse.msg. Do not edit.""" 00140 import roslib.message 00141 import struct 00142 00143 import geometry_msgs.msg 00144 00145 class GetModelStateResponse(roslib.message.Message): 00146 _md5sum = "1f8f991dc94e0cb27fe61383e0f576bb" 00147 _type = "gazebo/GetModelStateResponse" 00148 _has_header = False #flag to mark the presence of a Header object 00149 _full_text = """geometry_msgs/Pose pose 00150 geometry_msgs/Twist twist 00151 bool success 00152 string status_message 00153 00154 00155 ================================================================================ 00156 MSG: geometry_msgs/Pose 00157 # A representation of pose in free space, composed of postion and orientation. 00158 Point position 00159 Quaternion orientation 00160 00161 ================================================================================ 00162 MSG: geometry_msgs/Point 00163 # This contains the position of a point in free space 00164 float64 x 00165 float64 y 00166 float64 z 00167 00168 ================================================================================ 00169 MSG: geometry_msgs/Quaternion 00170 # This represents an orientation in free space in quaternion form. 00171 00172 float64 x 00173 float64 y 00174 float64 z 00175 float64 w 00176 00177 ================================================================================ 00178 MSG: geometry_msgs/Twist 00179 # This expresses velocity in free space broken into it's linear and angular parts. 00180 Vector3 linear 00181 Vector3 angular 00182 00183 ================================================================================ 00184 MSG: geometry_msgs/Vector3 00185 # This represents a vector in free space. 00186 00187 float64 x 00188 float64 y 00189 float64 z 00190 """ 00191 __slots__ = ['pose','twist','success','status_message'] 00192 _slot_types = ['geometry_msgs/Pose','geometry_msgs/Twist','bool','string'] 00193 00194 def __init__(self, *args, **kwds): 00195 """ 00196 Constructor. Any message fields that are implicitly/explicitly 00197 set to None will be assigned a default value. The recommend 00198 use is keyword arguments as this is more robust to future message 00199 changes. You cannot mix in-order arguments and keyword arguments. 00200 00201 The available fields are: 00202 pose,twist,success,status_message 00203 00204 @param args: complete set of field values, in .msg order 00205 @param kwds: use keyword arguments corresponding to message field names 00206 to set specific fields. 00207 """ 00208 if args or kwds: 00209 super(GetModelStateResponse, self).__init__(*args, **kwds) 00210 #message fields cannot be None, assign default values for those that are 00211 if self.pose is None: 00212 self.pose = geometry_msgs.msg.Pose() 00213 if self.twist is None: 00214 self.twist = geometry_msgs.msg.Twist() 00215 if self.success is None: 00216 self.success = False 00217 if self.status_message is None: 00218 self.status_message = '' 00219 else: 00220 self.pose = geometry_msgs.msg.Pose() 00221 self.twist = geometry_msgs.msg.Twist() 00222 self.success = False 00223 self.status_message = '' 00224 00225 def _get_types(self): 00226 """ 00227 internal API method 00228 """ 00229 return self._slot_types 00230 00231 def serialize(self, buff): 00232 """ 00233 serialize message into buffer 00234 @param buff: buffer 00235 @type buff: StringIO 00236 """ 00237 try: 00238 _x = self 00239 buff.write(_struct_13dB.pack(_x.pose.position.x, _x.pose.position.y, _x.pose.position.z, _x.pose.orientation.x, _x.pose.orientation.y, _x.pose.orientation.z, _x.pose.orientation.w, _x.twist.linear.x, _x.twist.linear.y, _x.twist.linear.z, _x.twist.angular.x, _x.twist.angular.y, _x.twist.angular.z, _x.success)) 00240 _x = self.status_message 00241 length = len(_x) 00242 buff.write(struct.pack('<I%ss'%length, length, _x)) 00243 except struct.error as se: self._check_types(se) 00244 except TypeError as te: self._check_types(te) 00245 00246 def deserialize(self, str): 00247 """ 00248 unpack serialized message in str into this message instance 00249 @param str: byte array of serialized message 00250 @type str: str 00251 """ 00252 try: 00253 if self.pose is None: 00254 self.pose = geometry_msgs.msg.Pose() 00255 if self.twist is None: 00256 self.twist = geometry_msgs.msg.Twist() 00257 end = 0 00258 _x = self 00259 start = end 00260 end += 105 00261 (_x.pose.position.x, _x.pose.position.y, _x.pose.position.z, _x.pose.orientation.x, _x.pose.orientation.y, _x.pose.orientation.z, _x.pose.orientation.w, _x.twist.linear.x, _x.twist.linear.y, _x.twist.linear.z, _x.twist.angular.x, _x.twist.angular.y, _x.twist.angular.z, _x.success,) = _struct_13dB.unpack(str[start:end]) 00262 self.success = bool(self.success) 00263 start = end 00264 end += 4 00265 (length,) = _struct_I.unpack(str[start:end]) 00266 start = end 00267 end += length 00268 self.status_message = str[start:end] 00269 return self 00270 except struct.error as e: 00271 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00272 00273 00274 def serialize_numpy(self, buff, numpy): 00275 """ 00276 serialize message with numpy array types into buffer 00277 @param buff: buffer 00278 @type buff: StringIO 00279 @param numpy: numpy python module 00280 @type numpy module 00281 """ 00282 try: 00283 _x = self 00284 buff.write(_struct_13dB.pack(_x.pose.position.x, _x.pose.position.y, _x.pose.position.z, _x.pose.orientation.x, _x.pose.orientation.y, _x.pose.orientation.z, _x.pose.orientation.w, _x.twist.linear.x, _x.twist.linear.y, _x.twist.linear.z, _x.twist.angular.x, _x.twist.angular.y, _x.twist.angular.z, _x.success)) 00285 _x = self.status_message 00286 length = len(_x) 00287 buff.write(struct.pack('<I%ss'%length, length, _x)) 00288 except struct.error as se: self._check_types(se) 00289 except TypeError as te: self._check_types(te) 00290 00291 def deserialize_numpy(self, str, numpy): 00292 """ 00293 unpack serialized message in str into this message instance using numpy for array types 00294 @param str: byte array of serialized message 00295 @type str: str 00296 @param numpy: numpy python module 00297 @type numpy: module 00298 """ 00299 try: 00300 if self.pose is None: 00301 self.pose = geometry_msgs.msg.Pose() 00302 if self.twist is None: 00303 self.twist = geometry_msgs.msg.Twist() 00304 end = 0 00305 _x = self 00306 start = end 00307 end += 105 00308 (_x.pose.position.x, _x.pose.position.y, _x.pose.position.z, _x.pose.orientation.x, _x.pose.orientation.y, _x.pose.orientation.z, _x.pose.orientation.w, _x.twist.linear.x, _x.twist.linear.y, _x.twist.linear.z, _x.twist.angular.x, _x.twist.angular.y, _x.twist.angular.z, _x.success,) = _struct_13dB.unpack(str[start:end]) 00309 self.success = bool(self.success) 00310 start = end 00311 end += 4 00312 (length,) = _struct_I.unpack(str[start:end]) 00313 start = end 00314 end += length 00315 self.status_message = str[start:end] 00316 return self 00317 except struct.error as e: 00318 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00319 00320 _struct_I = roslib.message.struct_I 00321 _struct_13dB = struct.Struct("<13dB") 00322 class GetModelState(roslib.message.ServiceDefinition): 00323 _type = 'gazebo/GetModelState' 00324 _md5sum = 'af0f702011820738976b120226dc9d96' 00325 _request_class = GetModelStateRequest 00326 _response_class = GetModelStateResponse