_CartesianImpedance.py
Go to the documentation of this file.
00001 """autogenerated by genpy from lwr_impedance_controller/CartesianImpedance.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 CartesianImpedance(genpy.Message):
00010   _md5sum = "00eebfadf4eb16b827bad74384942870"
00011   _type = "lwr_impedance_controller/CartesianImpedance"
00012   _has_header = False #flag to mark the presence of a Header object
00013   _full_text = """geometry_msgs/Wrench stiffness
00014 geometry_msgs/Wrench damping
00015 
00016 ================================================================================
00017 MSG: geometry_msgs/Wrench
00018 # This represents force in free space, seperated into 
00019 # it's linear and angular parts.  
00020 Vector3  force
00021 Vector3  torque
00022 
00023 ================================================================================
00024 MSG: geometry_msgs/Vector3
00025 # This represents a vector in free space. 
00026 
00027 float64 x
00028 float64 y
00029 float64 z
00030 """
00031   __slots__ = ['stiffness','damping']
00032   _slot_types = ['geometry_msgs/Wrench','geometry_msgs/Wrench']
00033 
00034   def __init__(self, *args, **kwds):
00035     """
00036     Constructor. Any message fields that are implicitly/explicitly
00037     set to None will be assigned a default value. The recommend
00038     use is keyword arguments as this is more robust to future message
00039     changes.  You cannot mix in-order arguments and keyword arguments.
00040 
00041     The available fields are:
00042        stiffness,damping
00043 
00044     :param args: complete set of field values, in .msg order
00045     :param kwds: use keyword arguments corresponding to message field names
00046     to set specific fields.
00047     """
00048     if args or kwds:
00049       super(CartesianImpedance, self).__init__(*args, **kwds)
00050       #message fields cannot be None, assign default values for those that are
00051       if self.stiffness is None:
00052         self.stiffness = geometry_msgs.msg.Wrench()
00053       if self.damping is None:
00054         self.damping = geometry_msgs.msg.Wrench()
00055     else:
00056       self.stiffness = geometry_msgs.msg.Wrench()
00057       self.damping = geometry_msgs.msg.Wrench()
00058 
00059   def _get_types(self):
00060     """
00061     internal API method
00062     """
00063     return self._slot_types
00064 
00065   def serialize(self, buff):
00066     """
00067     serialize message into buffer
00068     :param buff: buffer, ``StringIO``
00069     """
00070     try:
00071       _x = self
00072       buff.write(_struct_12d.pack(_x.stiffness.force.x, _x.stiffness.force.y, _x.stiffness.force.z, _x.stiffness.torque.x, _x.stiffness.torque.y, _x.stiffness.torque.z, _x.damping.force.x, _x.damping.force.y, _x.damping.force.z, _x.damping.torque.x, _x.damping.torque.y, _x.damping.torque.z))
00073     except struct.error as se: self._check_types(se)
00074     except TypeError as te: self._check_types(te)
00075 
00076   def deserialize(self, str):
00077     """
00078     unpack serialized message in str into this message instance
00079     :param str: byte array of serialized message, ``str``
00080     """
00081     try:
00082       if self.stiffness is None:
00083         self.stiffness = geometry_msgs.msg.Wrench()
00084       if self.damping is None:
00085         self.damping = geometry_msgs.msg.Wrench()
00086       end = 0
00087       _x = self
00088       start = end
00089       end += 96
00090       (_x.stiffness.force.x, _x.stiffness.force.y, _x.stiffness.force.z, _x.stiffness.torque.x, _x.stiffness.torque.y, _x.stiffness.torque.z, _x.damping.force.x, _x.damping.force.y, _x.damping.force.z, _x.damping.torque.x, _x.damping.torque.y, _x.damping.torque.z,) = _struct_12d.unpack(str[start:end])
00091       return self
00092     except struct.error as e:
00093       raise genpy.DeserializationError(e) #most likely buffer underfill
00094 
00095 
00096   def serialize_numpy(self, buff, numpy):
00097     """
00098     serialize message with numpy array types into buffer
00099     :param buff: buffer, ``StringIO``
00100     :param numpy: numpy python module
00101     """
00102     try:
00103       _x = self
00104       buff.write(_struct_12d.pack(_x.stiffness.force.x, _x.stiffness.force.y, _x.stiffness.force.z, _x.stiffness.torque.x, _x.stiffness.torque.y, _x.stiffness.torque.z, _x.damping.force.x, _x.damping.force.y, _x.damping.force.z, _x.damping.torque.x, _x.damping.torque.y, _x.damping.torque.z))
00105     except struct.error as se: self._check_types(se)
00106     except TypeError as te: self._check_types(te)
00107 
00108   def deserialize_numpy(self, str, numpy):
00109     """
00110     unpack serialized message in str into this message instance using numpy for array types
00111     :param str: byte array of serialized message, ``str``
00112     :param numpy: numpy python module
00113     """
00114     try:
00115       if self.stiffness is None:
00116         self.stiffness = geometry_msgs.msg.Wrench()
00117       if self.damping is None:
00118         self.damping = geometry_msgs.msg.Wrench()
00119       end = 0
00120       _x = self
00121       start = end
00122       end += 96
00123       (_x.stiffness.force.x, _x.stiffness.force.y, _x.stiffness.force.z, _x.stiffness.torque.x, _x.stiffness.torque.y, _x.stiffness.torque.z, _x.damping.force.x, _x.damping.force.y, _x.damping.force.z, _x.damping.torque.x, _x.damping.torque.y, _x.damping.torque.z,) = _struct_12d.unpack(str[start:end])
00124       return self
00125     except struct.error as e:
00126       raise genpy.DeserializationError(e) #most likely buffer underfill
00127 
00128 _struct_I = genpy.struct_I
00129 _struct_12d = struct.Struct("<12d")
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends


lwr_impedance_controller
Author(s): Konrad Banachowicz
autogenerated on Thu Nov 14 2013 11:56:13