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