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