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