_footsens_state_message.py
Go to the documentation of this file.
00001 """autogenerated by genpy from tulip_gazebo/footsens_state_message.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 genpy
00008 
00009 class footsens_state_message(genpy.Message):
00010   _md5sum = "637cc52f29ad57805d41857293269bf3"
00011   _type = "tulip_gazebo/footsens_state_message"
00012   _has_header = False #flag to mark the presence of a Header object
00013   _full_text = """time time
00014 float64 left_heel_inner
00015 float64 left_heel_outer
00016 float64 left_toe_inner
00017 float64 left_toe_outer
00018 float64 right_heel_inner
00019 float64 right_heel_outer
00020 float64 right_toe_inner
00021 float64 right_toe_outer
00022 
00023 """
00024   __slots__ = ['time','left_heel_inner','left_heel_outer','left_toe_inner','left_toe_outer','right_heel_inner','right_heel_outer','right_toe_inner','right_toe_outer']
00025   _slot_types = ['time','float64','float64','float64','float64','float64','float64','float64','float64']
00026 
00027   def __init__(self, *args, **kwds):
00028     """
00029     Constructor. Any message fields that are implicitly/explicitly
00030     set to None will be assigned a default value. The recommend
00031     use is keyword arguments as this is more robust to future message
00032     changes.  You cannot mix in-order arguments and keyword arguments.
00033 
00034     The available fields are:
00035        time,left_heel_inner,left_heel_outer,left_toe_inner,left_toe_outer,right_heel_inner,right_heel_outer,right_toe_inner,right_toe_outer
00036 
00037     :param args: complete set of field values, in .msg order
00038     :param kwds: use keyword arguments corresponding to message field names
00039     to set specific fields.
00040     """
00041     if args or kwds:
00042       super(footsens_state_message, self).__init__(*args, **kwds)
00043       #message fields cannot be None, assign default values for those that are
00044       if self.time is None:
00045         self.time = genpy.Time()
00046       if self.left_heel_inner is None:
00047         self.left_heel_inner = 0.
00048       if self.left_heel_outer is None:
00049         self.left_heel_outer = 0.
00050       if self.left_toe_inner is None:
00051         self.left_toe_inner = 0.
00052       if self.left_toe_outer is None:
00053         self.left_toe_outer = 0.
00054       if self.right_heel_inner is None:
00055         self.right_heel_inner = 0.
00056       if self.right_heel_outer is None:
00057         self.right_heel_outer = 0.
00058       if self.right_toe_inner is None:
00059         self.right_toe_inner = 0.
00060       if self.right_toe_outer is None:
00061         self.right_toe_outer = 0.
00062     else:
00063       self.time = genpy.Time()
00064       self.left_heel_inner = 0.
00065       self.left_heel_outer = 0.
00066       self.left_toe_inner = 0.
00067       self.left_toe_outer = 0.
00068       self.right_heel_inner = 0.
00069       self.right_heel_outer = 0.
00070       self.right_toe_inner = 0.
00071       self.right_toe_outer = 0.
00072 
00073   def _get_types(self):
00074     """
00075     internal API method
00076     """
00077     return self._slot_types
00078 
00079   def serialize(self, buff):
00080     """
00081     serialize message into buffer
00082     :param buff: buffer, ``StringIO``
00083     """
00084     try:
00085       _x = self
00086       buff.write(_struct_2I8d.pack(_x.time.secs, _x.time.nsecs, _x.left_heel_inner, _x.left_heel_outer, _x.left_toe_inner, _x.left_toe_outer, _x.right_heel_inner, _x.right_heel_outer, _x.right_toe_inner, _x.right_toe_outer))
00087     except struct.error as se: self._check_types(se)
00088     except TypeError as te: self._check_types(te)
00089 
00090   def deserialize(self, str):
00091     """
00092     unpack serialized message in str into this message instance
00093     :param str: byte array of serialized message, ``str``
00094     """
00095     try:
00096       if self.time is None:
00097         self.time = genpy.Time()
00098       end = 0
00099       _x = self
00100       start = end
00101       end += 72
00102       (_x.time.secs, _x.time.nsecs, _x.left_heel_inner, _x.left_heel_outer, _x.left_toe_inner, _x.left_toe_outer, _x.right_heel_inner, _x.right_heel_outer, _x.right_toe_inner, _x.right_toe_outer,) = _struct_2I8d.unpack(str[start:end])
00103       self.time.canon()
00104       return self
00105     except struct.error as e:
00106       raise genpy.DeserializationError(e) #most likely buffer underfill
00107 
00108 
00109   def serialize_numpy(self, buff, numpy):
00110     """
00111     serialize message with numpy array types into buffer
00112     :param buff: buffer, ``StringIO``
00113     :param numpy: numpy python module
00114     """
00115     try:
00116       _x = self
00117       buff.write(_struct_2I8d.pack(_x.time.secs, _x.time.nsecs, _x.left_heel_inner, _x.left_heel_outer, _x.left_toe_inner, _x.left_toe_outer, _x.right_heel_inner, _x.right_heel_outer, _x.right_toe_inner, _x.right_toe_outer))
00118     except struct.error as se: self._check_types(se)
00119     except TypeError as te: self._check_types(te)
00120 
00121   def deserialize_numpy(self, str, numpy):
00122     """
00123     unpack serialized message in str into this message instance using numpy for array types
00124     :param str: byte array of serialized message, ``str``
00125     :param numpy: numpy python module
00126     """
00127     try:
00128       if self.time is None:
00129         self.time = genpy.Time()
00130       end = 0
00131       _x = self
00132       start = end
00133       end += 72
00134       (_x.time.secs, _x.time.nsecs, _x.left_heel_inner, _x.left_heel_outer, _x.left_toe_inner, _x.left_toe_outer, _x.right_heel_inner, _x.right_heel_outer, _x.right_toe_inner, _x.right_toe_outer,) = _struct_2I8d.unpack(str[start:end])
00135       self.time.canon()
00136       return self
00137     except struct.error as e:
00138       raise genpy.DeserializationError(e) #most likely buffer underfill
00139 
00140 _struct_I = genpy.struct_I
00141 _struct_2I8d = struct.Struct("<2I8d")


tulip_gazebo
Author(s): Tim Assman, Pieter van Zutven
autogenerated on Sun Jan 26 2014 21:00:10