_SetPhysicsProperties.py
Go to the documentation of this file.
00001 """autogenerated by genpy from gazebo_msgs/SetPhysicsPropertiesRequest.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006 
00007 import geometry_msgs.msg
00008 import gazebo_msgs.msg
00009 
00010 class SetPhysicsPropertiesRequest(genpy.Message):
00011   _md5sum = "abd9f82732b52b92e9d6bb36e6a82452"
00012   _type = "gazebo_msgs/SetPhysicsPropertiesRequest"
00013   _has_header = False #flag to mark the presence of a Header object
00014   _full_text = """
00015 float64 time_step
00016 float64 max_update_rate
00017 geometry_msgs/Vector3 gravity
00018 gazebo_msgs/ODEPhysics ode_config
00019 
00020 ================================================================================
00021 MSG: geometry_msgs/Vector3
00022 # This represents a vector in free space. 
00023 
00024 float64 x
00025 float64 y
00026 float64 z
00027 ================================================================================
00028 MSG: gazebo_msgs/ODEPhysics
00029 bool auto_disable_bodies           # enable auto disabling of bodies, default false
00030 uint32 sor_pgs_precon_iters        # preconditioning inner iterations when uisng projected Gauss Seidel
00031 uint32 sor_pgs_iters               # inner iterations when uisng projected Gauss Seidel
00032 float64 sor_pgs_w                  # relaxation parameter when using projected Gauss Seidel, 1 = no relaxation
00033 float64 sor_pgs_rms_error_tol      # rms error tolerance before stopping inner iterations
00034 float64 contact_surface_layer      # contact "dead-band" width
00035 float64 contact_max_correcting_vel # contact maximum correction velocity
00036 float64 cfm                        # global constraint force mixing
00037 float64 erp                        # global error reduction parameter
00038 uint32 max_contacts                # maximum contact joints between two geoms
00039 
00040 """
00041   __slots__ = ['time_step','max_update_rate','gravity','ode_config']
00042   _slot_types = ['float64','float64','geometry_msgs/Vector3','gazebo_msgs/ODEPhysics']
00043 
00044   def __init__(self, *args, **kwds):
00045     """
00046     Constructor. Any message fields that are implicitly/explicitly
00047     set to None will be assigned a default value. The recommend
00048     use is keyword arguments as this is more robust to future message
00049     changes.  You cannot mix in-order arguments and keyword arguments.
00050 
00051     The available fields are:
00052        time_step,max_update_rate,gravity,ode_config
00053 
00054     :param args: complete set of field values, in .msg order
00055     :param kwds: use keyword arguments corresponding to message field names
00056     to set specific fields.
00057     """
00058     if args or kwds:
00059       super(SetPhysicsPropertiesRequest, self).__init__(*args, **kwds)
00060       #message fields cannot be None, assign default values for those that are
00061       if self.time_step is None:
00062         self.time_step = 0.
00063       if self.max_update_rate is None:
00064         self.max_update_rate = 0.
00065       if self.gravity is None:
00066         self.gravity = geometry_msgs.msg.Vector3()
00067       if self.ode_config is None:
00068         self.ode_config = gazebo_msgs.msg.ODEPhysics()
00069     else:
00070       self.time_step = 0.
00071       self.max_update_rate = 0.
00072       self.gravity = geometry_msgs.msg.Vector3()
00073       self.ode_config = gazebo_msgs.msg.ODEPhysics()
00074 
00075   def _get_types(self):
00076     """
00077     internal API method
00078     """
00079     return self._slot_types
00080 
00081   def serialize(self, buff):
00082     """
00083     serialize message into buffer
00084     :param buff: buffer, ``StringIO``
00085     """
00086     try:
00087       _x = self
00088       buff.write(_struct_5dB2I6dI.pack(_x.time_step, _x.max_update_rate, _x.gravity.x, _x.gravity.y, _x.gravity.z, _x.ode_config.auto_disable_bodies, _x.ode_config.sor_pgs_precon_iters, _x.ode_config.sor_pgs_iters, _x.ode_config.sor_pgs_w, _x.ode_config.sor_pgs_rms_error_tol, _x.ode_config.contact_surface_layer, _x.ode_config.contact_max_correcting_vel, _x.ode_config.cfm, _x.ode_config.erp, _x.ode_config.max_contacts))
00089     except struct.error as se: self._check_types(se)
00090     except TypeError as te: self._check_types(te)
00091 
00092   def deserialize(self, str):
00093     """
00094     unpack serialized message in str into this message instance
00095     :param str: byte array of serialized message, ``str``
00096     """
00097     try:
00098       if self.gravity is None:
00099         self.gravity = geometry_msgs.msg.Vector3()
00100       if self.ode_config is None:
00101         self.ode_config = gazebo_msgs.msg.ODEPhysics()
00102       end = 0
00103       _x = self
00104       start = end
00105       end += 101
00106       (_x.time_step, _x.max_update_rate, _x.gravity.x, _x.gravity.y, _x.gravity.z, _x.ode_config.auto_disable_bodies, _x.ode_config.sor_pgs_precon_iters, _x.ode_config.sor_pgs_iters, _x.ode_config.sor_pgs_w, _x.ode_config.sor_pgs_rms_error_tol, _x.ode_config.contact_surface_layer, _x.ode_config.contact_max_correcting_vel, _x.ode_config.cfm, _x.ode_config.erp, _x.ode_config.max_contacts,) = _struct_5dB2I6dI.unpack(str[start:end])
00107       self.ode_config.auto_disable_bodies = bool(self.ode_config.auto_disable_bodies)
00108       return self
00109     except struct.error as e:
00110       raise genpy.DeserializationError(e) #most likely buffer underfill
00111 
00112 
00113   def serialize_numpy(self, buff, numpy):
00114     """
00115     serialize message with numpy array types into buffer
00116     :param buff: buffer, ``StringIO``
00117     :param numpy: numpy python module
00118     """
00119     try:
00120       _x = self
00121       buff.write(_struct_5dB2I6dI.pack(_x.time_step, _x.max_update_rate, _x.gravity.x, _x.gravity.y, _x.gravity.z, _x.ode_config.auto_disable_bodies, _x.ode_config.sor_pgs_precon_iters, _x.ode_config.sor_pgs_iters, _x.ode_config.sor_pgs_w, _x.ode_config.sor_pgs_rms_error_tol, _x.ode_config.contact_surface_layer, _x.ode_config.contact_max_correcting_vel, _x.ode_config.cfm, _x.ode_config.erp, _x.ode_config.max_contacts))
00122     except struct.error as se: self._check_types(se)
00123     except TypeError as te: self._check_types(te)
00124 
00125   def deserialize_numpy(self, str, numpy):
00126     """
00127     unpack serialized message in str into this message instance using numpy for array types
00128     :param str: byte array of serialized message, ``str``
00129     :param numpy: numpy python module
00130     """
00131     try:
00132       if self.gravity is None:
00133         self.gravity = geometry_msgs.msg.Vector3()
00134       if self.ode_config is None:
00135         self.ode_config = gazebo_msgs.msg.ODEPhysics()
00136       end = 0
00137       _x = self
00138       start = end
00139       end += 101
00140       (_x.time_step, _x.max_update_rate, _x.gravity.x, _x.gravity.y, _x.gravity.z, _x.ode_config.auto_disable_bodies, _x.ode_config.sor_pgs_precon_iters, _x.ode_config.sor_pgs_iters, _x.ode_config.sor_pgs_w, _x.ode_config.sor_pgs_rms_error_tol, _x.ode_config.contact_surface_layer, _x.ode_config.contact_max_correcting_vel, _x.ode_config.cfm, _x.ode_config.erp, _x.ode_config.max_contacts,) = _struct_5dB2I6dI.unpack(str[start:end])
00141       self.ode_config.auto_disable_bodies = bool(self.ode_config.auto_disable_bodies)
00142       return self
00143     except struct.error as e:
00144       raise genpy.DeserializationError(e) #most likely buffer underfill
00145 
00146 _struct_I = genpy.struct_I
00147 _struct_5dB2I6dI = struct.Struct("<5dB2I6dI")
00148 """autogenerated by genpy from gazebo_msgs/SetPhysicsPropertiesResponse.msg. Do not edit."""
00149 import sys
00150 python3 = True if sys.hexversion > 0x03000000 else False
00151 import genpy
00152 import struct
00153 
00154 
00155 class SetPhysicsPropertiesResponse(genpy.Message):
00156   _md5sum = "2ec6f3eff0161f4257b808b12bc830c2"
00157   _type = "gazebo_msgs/SetPhysicsPropertiesResponse"
00158   _has_header = False #flag to mark the presence of a Header object
00159   _full_text = """bool success
00160 string status_message
00161 
00162 
00163 """
00164   __slots__ = ['success','status_message']
00165   _slot_types = ['bool','string']
00166 
00167   def __init__(self, *args, **kwds):
00168     """
00169     Constructor. Any message fields that are implicitly/explicitly
00170     set to None will be assigned a default value. The recommend
00171     use is keyword arguments as this is more robust to future message
00172     changes.  You cannot mix in-order arguments and keyword arguments.
00173 
00174     The available fields are:
00175        success,status_message
00176 
00177     :param args: complete set of field values, in .msg order
00178     :param kwds: use keyword arguments corresponding to message field names
00179     to set specific fields.
00180     """
00181     if args or kwds:
00182       super(SetPhysicsPropertiesResponse, self).__init__(*args, **kwds)
00183       #message fields cannot be None, assign default values for those that are
00184       if self.success is None:
00185         self.success = False
00186       if self.status_message is None:
00187         self.status_message = ''
00188     else:
00189       self.success = False
00190       self.status_message = ''
00191 
00192   def _get_types(self):
00193     """
00194     internal API method
00195     """
00196     return self._slot_types
00197 
00198   def serialize(self, buff):
00199     """
00200     serialize message into buffer
00201     :param buff: buffer, ``StringIO``
00202     """
00203     try:
00204       buff.write(_struct_B.pack(self.success))
00205       _x = self.status_message
00206       length = len(_x)
00207       if python3 or type(_x) == unicode:
00208         _x = _x.encode('utf-8')
00209         length = len(_x)
00210       buff.write(struct.pack('<I%ss'%length, length, _x))
00211     except struct.error as se: self._check_types(se)
00212     except TypeError as te: self._check_types(te)
00213 
00214   def deserialize(self, str):
00215     """
00216     unpack serialized message in str into this message instance
00217     :param str: byte array of serialized message, ``str``
00218     """
00219     try:
00220       end = 0
00221       start = end
00222       end += 1
00223       (self.success,) = _struct_B.unpack(str[start:end])
00224       self.success = bool(self.success)
00225       start = end
00226       end += 4
00227       (length,) = _struct_I.unpack(str[start:end])
00228       start = end
00229       end += length
00230       if python3:
00231         self.status_message = str[start:end].decode('utf-8')
00232       else:
00233         self.status_message = str[start:end]
00234       return self
00235     except struct.error as e:
00236       raise genpy.DeserializationError(e) #most likely buffer underfill
00237 
00238 
00239   def serialize_numpy(self, buff, numpy):
00240     """
00241     serialize message with numpy array types into buffer
00242     :param buff: buffer, ``StringIO``
00243     :param numpy: numpy python module
00244     """
00245     try:
00246       buff.write(_struct_B.pack(self.success))
00247       _x = self.status_message
00248       length = len(_x)
00249       if python3 or type(_x) == unicode:
00250         _x = _x.encode('utf-8')
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_numpy(self, str, numpy):
00257     """
00258     unpack serialized message in str into this message instance using numpy for array types
00259     :param str: byte array of serialized message, ``str``
00260     :param numpy: numpy python module
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       if python3:
00274         self.status_message = str[start:end].decode('utf-8')
00275       else:
00276         self.status_message = str[start:end]
00277       return self
00278     except struct.error as e:
00279       raise genpy.DeserializationError(e) #most likely buffer underfill
00280 
00281 _struct_I = genpy.struct_I
00282 _struct_B = struct.Struct("<B")
00283 class SetPhysicsProperties(object):
00284   _type          = 'gazebo_msgs/SetPhysicsProperties'
00285   _md5sum = '97e2057080558ce4730434b5fae75c91'
00286   _request_class  = SetPhysicsPropertiesRequest
00287   _response_class = SetPhysicsPropertiesResponse


gazebo_msgs
Author(s): John Hsu
autogenerated on Sun Jan 5 2014 11:34:32