_BipedRobinGlobalBehaviour.py
Go to the documentation of this file.
00001 """autogenerated by genpy from biped_robin_msgs/BipedRobinGlobalBehaviour.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 BipedRobinGlobalBehaviour(genpy.Message):
00009   _md5sum = "6a7c24c4ab7c274c7020ee1cd9c6c8c2"
00010   _type = "biped_robin_msgs/BipedRobinGlobalBehaviour"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """# GlobalBehaviour of biped robin
00013 
00014 bool areJointErrors
00015 bool areJointsReferenced
00016 bool areJointTowErrorsSmall
00017 bool areJointsReadyToDrive
00018 bool areForceSensorsOK
00019 bool isAirborne
00020 bool areJointsReadyToDriveAirborne
00021 bool isReadyToWalk
00022 uint8 currentMotionMode
00023 
00024 """
00025   __slots__ = ['areJointErrors','areJointsReferenced','areJointTowErrorsSmall','areJointsReadyToDrive','areForceSensorsOK','isAirborne','areJointsReadyToDriveAirborne','isReadyToWalk','currentMotionMode']
00026   _slot_types = ['bool','bool','bool','bool','bool','bool','bool','bool','uint8']
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        areJointErrors,areJointsReferenced,areJointTowErrorsSmall,areJointsReadyToDrive,areForceSensorsOK,isAirborne,areJointsReadyToDriveAirborne,isReadyToWalk,currentMotionMode
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(BipedRobinGlobalBehaviour, self).__init__(*args, **kwds)
00044       #message fields cannot be None, assign default values for those that are
00045       if self.areJointErrors is None:
00046         self.areJointErrors = False
00047       if self.areJointsReferenced is None:
00048         self.areJointsReferenced = False
00049       if self.areJointTowErrorsSmall is None:
00050         self.areJointTowErrorsSmall = False
00051       if self.areJointsReadyToDrive is None:
00052         self.areJointsReadyToDrive = False
00053       if self.areForceSensorsOK is None:
00054         self.areForceSensorsOK = False
00055       if self.isAirborne is None:
00056         self.isAirborne = False
00057       if self.areJointsReadyToDriveAirborne is None:
00058         self.areJointsReadyToDriveAirborne = False
00059       if self.isReadyToWalk is None:
00060         self.isReadyToWalk = False
00061       if self.currentMotionMode is None:
00062         self.currentMotionMode = 0
00063     else:
00064       self.areJointErrors = False
00065       self.areJointsReferenced = False
00066       self.areJointTowErrorsSmall = False
00067       self.areJointsReadyToDrive = False
00068       self.areForceSensorsOK = False
00069       self.isAirborne = False
00070       self.areJointsReadyToDriveAirborne = False
00071       self.isReadyToWalk = False
00072       self.currentMotionMode = 0
00073 
00074   def _get_types(self):
00075     """
00076     internal API method
00077     """
00078     return self._slot_types
00079 
00080   def serialize(self, buff):
00081     """
00082     serialize message into buffer
00083     :param buff: buffer, ``StringIO``
00084     """
00085     try:
00086       _x = self
00087       buff.write(_struct_9B.pack(_x.areJointErrors, _x.areJointsReferenced, _x.areJointTowErrorsSmall, _x.areJointsReadyToDrive, _x.areForceSensorsOK, _x.isAirborne, _x.areJointsReadyToDriveAirborne, _x.isReadyToWalk, _x.currentMotionMode))
00088     except struct.error as se: self._check_types(se)
00089     except TypeError as te: self._check_types(te)
00090 
00091   def deserialize(self, str):
00092     """
00093     unpack serialized message in str into this message instance
00094     :param str: byte array of serialized message, ``str``
00095     """
00096     try:
00097       end = 0
00098       _x = self
00099       start = end
00100       end += 9
00101       (_x.areJointErrors, _x.areJointsReferenced, _x.areJointTowErrorsSmall, _x.areJointsReadyToDrive, _x.areForceSensorsOK, _x.isAirborne, _x.areJointsReadyToDriveAirborne, _x.isReadyToWalk, _x.currentMotionMode,) = _struct_9B.unpack(str[start:end])
00102       self.areJointErrors = bool(self.areJointErrors)
00103       self.areJointsReferenced = bool(self.areJointsReferenced)
00104       self.areJointTowErrorsSmall = bool(self.areJointTowErrorsSmall)
00105       self.areJointsReadyToDrive = bool(self.areJointsReadyToDrive)
00106       self.areForceSensorsOK = bool(self.areForceSensorsOK)
00107       self.isAirborne = bool(self.isAirborne)
00108       self.areJointsReadyToDriveAirborne = bool(self.areJointsReadyToDriveAirborne)
00109       self.isReadyToWalk = bool(self.isReadyToWalk)
00110       return self
00111     except struct.error as e:
00112       raise genpy.DeserializationError(e) #most likely buffer underfill
00113 
00114 
00115   def serialize_numpy(self, buff, numpy):
00116     """
00117     serialize message with numpy array types into buffer
00118     :param buff: buffer, ``StringIO``
00119     :param numpy: numpy python module
00120     """
00121     try:
00122       _x = self
00123       buff.write(_struct_9B.pack(_x.areJointErrors, _x.areJointsReferenced, _x.areJointTowErrorsSmall, _x.areJointsReadyToDrive, _x.areForceSensorsOK, _x.isAirborne, _x.areJointsReadyToDriveAirborne, _x.isReadyToWalk, _x.currentMotionMode))
00124     except struct.error as se: self._check_types(se)
00125     except TypeError as te: self._check_types(te)
00126 
00127   def deserialize_numpy(self, str, numpy):
00128     """
00129     unpack serialized message in str into this message instance using numpy for array types
00130     :param str: byte array of serialized message, ``str``
00131     :param numpy: numpy python module
00132     """
00133     try:
00134       end = 0
00135       _x = self
00136       start = end
00137       end += 9
00138       (_x.areJointErrors, _x.areJointsReferenced, _x.areJointTowErrorsSmall, _x.areJointsReadyToDrive, _x.areForceSensorsOK, _x.isAirborne, _x.areJointsReadyToDriveAirborne, _x.isReadyToWalk, _x.currentMotionMode,) = _struct_9B.unpack(str[start:end])
00139       self.areJointErrors = bool(self.areJointErrors)
00140       self.areJointsReferenced = bool(self.areJointsReferenced)
00141       self.areJointTowErrorsSmall = bool(self.areJointTowErrorsSmall)
00142       self.areJointsReadyToDrive = bool(self.areJointsReadyToDrive)
00143       self.areForceSensorsOK = bool(self.areForceSensorsOK)
00144       self.isAirborne = bool(self.isAirborne)
00145       self.areJointsReadyToDriveAirborne = bool(self.areJointsReadyToDriveAirborne)
00146       self.isReadyToWalk = bool(self.isReadyToWalk)
00147       return self
00148     except struct.error as e:
00149       raise genpy.DeserializationError(e) #most likely buffer underfill
00150 
00151 _struct_I = genpy.struct_I
00152 _struct_9B = struct.Struct("<9B")


biped_robin_msgs
Author(s): Johannes Mayr
autogenerated on Mon Jan 6 2014 11:07:41