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