Go to the documentation of this file.00001 """autogenerated by genpy from phantom_omni/OmniFeedback.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 OmniFeedback(genpy.Message):
00010 _md5sum = "e9083ac4fd95494e94fbb0c0f90b6c00"
00011 _type = "phantom_omni/OmniFeedback"
00012 _has_header = False
00013 _full_text = """# This is the force as estimated from the applied torques as well as the current
00014 # end effector position of the robot arm
00015 geometry_msgs/Vector3 force
00016 geometry_msgs/Vector3 position
00017 ================================================================================
00018 MSG: geometry_msgs/Vector3
00019 # This represents a vector in free space.
00020
00021 float64 x
00022 float64 y
00023 float64 z
00024 """
00025 __slots__ = ['force','position']
00026 _slot_types = ['geometry_msgs/Vector3','geometry_msgs/Vector3']
00027
00028 def __init__(self, *args, **kwds):
00029 """
00030 Constructor. Any message fields that are implicitly/explicitly
00031 set to None will be assigned a default value. The recommend
00032 use is keyword arguments as this is more robust to future message
00033 changes. You cannot mix in-order arguments and keyword arguments.
00034
00035 The available fields are:
00036 force,position
00037
00038 :param args: complete set of field values, in .msg order
00039 :param kwds: use keyword arguments corresponding to message field names
00040 to set specific fields.
00041 """
00042 if args or kwds:
00043 super(OmniFeedback, self).__init__(*args, **kwds)
00044
00045 if self.force is None:
00046 self.force = geometry_msgs.msg.Vector3()
00047 if self.position is None:
00048 self.position = geometry_msgs.msg.Vector3()
00049 else:
00050 self.force = geometry_msgs.msg.Vector3()
00051 self.position = geometry_msgs.msg.Vector3()
00052
00053 def _get_types(self):
00054 """
00055 internal API method
00056 """
00057 return self._slot_types
00058
00059 def serialize(self, buff):
00060 """
00061 serialize message into buffer
00062 :param buff: buffer, ``StringIO``
00063 """
00064 try:
00065 _x = self
00066 buff.write(_struct_6d.pack(_x.force.x, _x.force.y, _x.force.z, _x.position.x, _x.position.y, _x.position.z))
00067 except struct.error as se: self._check_types(se)
00068 except TypeError as te: self._check_types(te)
00069
00070 def deserialize(self, str):
00071 """
00072 unpack serialized message in str into this message instance
00073 :param str: byte array of serialized message, ``str``
00074 """
00075 try:
00076 if self.force is None:
00077 self.force = geometry_msgs.msg.Vector3()
00078 if self.position is None:
00079 self.position = geometry_msgs.msg.Vector3()
00080 end = 0
00081 _x = self
00082 start = end
00083 end += 48
00084 (_x.force.x, _x.force.y, _x.force.z, _x.position.x, _x.position.y, _x.position.z,) = _struct_6d.unpack(str[start:end])
00085 return self
00086 except struct.error as e:
00087 raise genpy.DeserializationError(e)
00088
00089
00090 def serialize_numpy(self, buff, numpy):
00091 """
00092 serialize message with numpy array types into buffer
00093 :param buff: buffer, ``StringIO``
00094 :param numpy: numpy python module
00095 """
00096 try:
00097 _x = self
00098 buff.write(_struct_6d.pack(_x.force.x, _x.force.y, _x.force.z, _x.position.x, _x.position.y, _x.position.z))
00099 except struct.error as se: self._check_types(se)
00100 except TypeError as te: self._check_types(te)
00101
00102 def deserialize_numpy(self, str, numpy):
00103 """
00104 unpack serialized message in str into this message instance using numpy for array types
00105 :param str: byte array of serialized message, ``str``
00106 :param numpy: numpy python module
00107 """
00108 try:
00109 if self.force is None:
00110 self.force = geometry_msgs.msg.Vector3()
00111 if self.position is None:
00112 self.position = geometry_msgs.msg.Vector3()
00113 end = 0
00114 _x = self
00115 start = end
00116 end += 48
00117 (_x.force.x, _x.force.y, _x.force.z, _x.position.x, _x.position.y, _x.position.z,) = _struct_6d.unpack(str[start:end])
00118 return self
00119 except struct.error as e:
00120 raise genpy.DeserializationError(e)
00121
00122 _struct_I = genpy.struct_I
00123 _struct_6d = struct.Struct("<6d")
phantom_omni
Author(s): Hai Nguyen, Marc Killpack, Chi-Hung King, Advisor: Prof. Charlie Kemp, Lab: Healthcare Robotics Lab at Georgia Tech
autogenerated on Wed Nov 27 2013 11:51:14