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


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