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


gazebo_msgs
Author(s): John Hsu
autogenerated on Mon Oct 6 2014 12:14:33