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


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