00001 """autogenerated by genpy from vrep_common/simRosReadForceSensorRequest.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 simRosReadForceSensorRequest(genpy.Message):
00009 _md5sum = "92535b678299d2bdda959704e78c275e"
00010 _type = "vrep_common/simRosReadForceSensorRequest"
00011 _has_header = False
00012 _full_text = """
00013
00014
00015
00016 int32 handle
00017
00018 """
00019 __slots__ = ['handle']
00020 _slot_types = ['int32']
00021
00022 def __init__(self, *args, **kwds):
00023 """
00024 Constructor. Any message fields that are implicitly/explicitly
00025 set to None will be assigned a default value. The recommend
00026 use is keyword arguments as this is more robust to future message
00027 changes. You cannot mix in-order arguments and keyword arguments.
00028
00029 The available fields are:
00030 handle
00031
00032 :param args: complete set of field values, in .msg order
00033 :param kwds: use keyword arguments corresponding to message field names
00034 to set specific fields.
00035 """
00036 if args or kwds:
00037 super(simRosReadForceSensorRequest, self).__init__(*args, **kwds)
00038
00039 if self.handle is None:
00040 self.handle = 0
00041 else:
00042 self.handle = 0
00043
00044 def _get_types(self):
00045 """
00046 internal API method
00047 """
00048 return self._slot_types
00049
00050 def serialize(self, buff):
00051 """
00052 serialize message into buffer
00053 :param buff: buffer, ``StringIO``
00054 """
00055 try:
00056 buff.write(_struct_i.pack(self.handle))
00057 except struct.error as se: self._check_types(se)
00058 except TypeError as te: self._check_types(te)
00059
00060 def deserialize(self, str):
00061 """
00062 unpack serialized message in str into this message instance
00063 :param str: byte array of serialized message, ``str``
00064 """
00065 try:
00066 end = 0
00067 start = end
00068 end += 4
00069 (self.handle,) = _struct_i.unpack(str[start:end])
00070 return self
00071 except struct.error as e:
00072 raise genpy.DeserializationError(e)
00073
00074
00075 def serialize_numpy(self, buff, numpy):
00076 """
00077 serialize message with numpy array types into buffer
00078 :param buff: buffer, ``StringIO``
00079 :param numpy: numpy python module
00080 """
00081 try:
00082 buff.write(_struct_i.pack(self.handle))
00083 except struct.error as se: self._check_types(se)
00084 except TypeError as te: self._check_types(te)
00085
00086 def deserialize_numpy(self, str, numpy):
00087 """
00088 unpack serialized message in str into this message instance using numpy for array types
00089 :param str: byte array of serialized message, ``str``
00090 :param numpy: numpy python module
00091 """
00092 try:
00093 end = 0
00094 start = end
00095 end += 4
00096 (self.handle,) = _struct_i.unpack(str[start:end])
00097 return self
00098 except struct.error as e:
00099 raise genpy.DeserializationError(e)
00100
00101 _struct_I = genpy.struct_I
00102 _struct_i = struct.Struct("<i")
00103 """autogenerated by genpy from vrep_common/simRosReadForceSensorResponse.msg. Do not edit."""
00104 import sys
00105 python3 = True if sys.hexversion > 0x03000000 else False
00106 import genpy
00107 import struct
00108
00109 import geometry_msgs.msg
00110
00111 class simRosReadForceSensorResponse(genpy.Message):
00112 _md5sum = "5e4b65925af0e441033ad70b707ce684"
00113 _type = "vrep_common/simRosReadForceSensorResponse"
00114 _has_header = False
00115 _full_text = """int32 result
00116 geometry_msgs/Vector3 force
00117 geometry_msgs/Vector3 torque
00118
00119
00120 ================================================================================
00121 MSG: geometry_msgs/Vector3
00122 # This represents a vector in free space.
00123
00124 float64 x
00125 float64 y
00126 float64 z
00127 """
00128 __slots__ = ['result','force','torque']
00129 _slot_types = ['int32','geometry_msgs/Vector3','geometry_msgs/Vector3']
00130
00131 def __init__(self, *args, **kwds):
00132 """
00133 Constructor. Any message fields that are implicitly/explicitly
00134 set to None will be assigned a default value. The recommend
00135 use is keyword arguments as this is more robust to future message
00136 changes. You cannot mix in-order arguments and keyword arguments.
00137
00138 The available fields are:
00139 result,force,torque
00140
00141 :param args: complete set of field values, in .msg order
00142 :param kwds: use keyword arguments corresponding to message field names
00143 to set specific fields.
00144 """
00145 if args or kwds:
00146 super(simRosReadForceSensorResponse, self).__init__(*args, **kwds)
00147
00148 if self.result is None:
00149 self.result = 0
00150 if self.force is None:
00151 self.force = geometry_msgs.msg.Vector3()
00152 if self.torque is None:
00153 self.torque = geometry_msgs.msg.Vector3()
00154 else:
00155 self.result = 0
00156 self.force = geometry_msgs.msg.Vector3()
00157 self.torque = geometry_msgs.msg.Vector3()
00158
00159 def _get_types(self):
00160 """
00161 internal API method
00162 """
00163 return self._slot_types
00164
00165 def serialize(self, buff):
00166 """
00167 serialize message into buffer
00168 :param buff: buffer, ``StringIO``
00169 """
00170 try:
00171 _x = self
00172 buff.write(_struct_i6d.pack(_x.result, _x.force.x, _x.force.y, _x.force.z, _x.torque.x, _x.torque.y, _x.torque.z))
00173 except struct.error as se: self._check_types(se)
00174 except TypeError as te: self._check_types(te)
00175
00176 def deserialize(self, str):
00177 """
00178 unpack serialized message in str into this message instance
00179 :param str: byte array of serialized message, ``str``
00180 """
00181 try:
00182 if self.force is None:
00183 self.force = geometry_msgs.msg.Vector3()
00184 if self.torque is None:
00185 self.torque = geometry_msgs.msg.Vector3()
00186 end = 0
00187 _x = self
00188 start = end
00189 end += 52
00190 (_x.result, _x.force.x, _x.force.y, _x.force.z, _x.torque.x, _x.torque.y, _x.torque.z,) = _struct_i6d.unpack(str[start:end])
00191 return self
00192 except struct.error as e:
00193 raise genpy.DeserializationError(e)
00194
00195
00196 def serialize_numpy(self, buff, numpy):
00197 """
00198 serialize message with numpy array types into buffer
00199 :param buff: buffer, ``StringIO``
00200 :param numpy: numpy python module
00201 """
00202 try:
00203 _x = self
00204 buff.write(_struct_i6d.pack(_x.result, _x.force.x, _x.force.y, _x.force.z, _x.torque.x, _x.torque.y, _x.torque.z))
00205 except struct.error as se: self._check_types(se)
00206 except TypeError as te: self._check_types(te)
00207
00208 def deserialize_numpy(self, str, numpy):
00209 """
00210 unpack serialized message in str into this message instance using numpy for array types
00211 :param str: byte array of serialized message, ``str``
00212 :param numpy: numpy python module
00213 """
00214 try:
00215 if self.force is None:
00216 self.force = geometry_msgs.msg.Vector3()
00217 if self.torque is None:
00218 self.torque = geometry_msgs.msg.Vector3()
00219 end = 0
00220 _x = self
00221 start = end
00222 end += 52
00223 (_x.result, _x.force.x, _x.force.y, _x.force.z, _x.torque.x, _x.torque.y, _x.torque.z,) = _struct_i6d.unpack(str[start:end])
00224 return self
00225 except struct.error as e:
00226 raise genpy.DeserializationError(e)
00227
00228 _struct_I = genpy.struct_I
00229 _struct_i6d = struct.Struct("<i6d")
00230 class simRosReadForceSensor(object):
00231 _type = 'vrep_common/simRosReadForceSensor'
00232 _md5sum = 'f2a54a090baac0d8c5c08bb865b8cd2d'
00233 _request_class = simRosReadForceSensorRequest
00234 _response_class = simRosReadForceSensorResponse