$search
00001 """autogenerated by genmsg_py from ManualBBEstimationGoal.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class ManualBBEstimationGoal(roslib.message.Message): 00007 _md5sum = "781df1358f25fcea62d0dad6eece60a9" 00008 _type = "srs_assisted_arm_navigation_msgs/ManualBBEstimationGoal" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00011 # Action server is implemented in RVIZ plugin which acts as bb_estimator client 00012 # goal 00013 string object_name 00014 bool disable_video # aka useless mode for RVIZ plugin 00015 00016 """ 00017 __slots__ = ['object_name','disable_video'] 00018 _slot_types = ['string','bool'] 00019 00020 def __init__(self, *args, **kwds): 00021 """ 00022 Constructor. Any message fields that are implicitly/explicitly 00023 set to None will be assigned a default value. The recommend 00024 use is keyword arguments as this is more robust to future message 00025 changes. You cannot mix in-order arguments and keyword arguments. 00026 00027 The available fields are: 00028 object_name,disable_video 00029 00030 @param args: complete set of field values, in .msg order 00031 @param kwds: use keyword arguments corresponding to message field names 00032 to set specific fields. 00033 """ 00034 if args or kwds: 00035 super(ManualBBEstimationGoal, self).__init__(*args, **kwds) 00036 #message fields cannot be None, assign default values for those that are 00037 if self.object_name is None: 00038 self.object_name = '' 00039 if self.disable_video is None: 00040 self.disable_video = False 00041 else: 00042 self.object_name = '' 00043 self.disable_video = False 00044 00045 def _get_types(self): 00046 """ 00047 internal API method 00048 """ 00049 return self._slot_types 00050 00051 def serialize(self, buff): 00052 """ 00053 serialize message into buffer 00054 @param buff: buffer 00055 @type buff: StringIO 00056 """ 00057 try: 00058 _x = self.object_name 00059 length = len(_x) 00060 buff.write(struct.pack('<I%ss'%length, length, _x)) 00061 buff.write(_struct_B.pack(self.disable_video)) 00062 except struct.error as se: self._check_types(se) 00063 except TypeError as te: self._check_types(te) 00064 00065 def deserialize(self, str): 00066 """ 00067 unpack serialized message in str into this message instance 00068 @param str: byte array of serialized message 00069 @type str: str 00070 """ 00071 try: 00072 end = 0 00073 start = end 00074 end += 4 00075 (length,) = _struct_I.unpack(str[start:end]) 00076 start = end 00077 end += length 00078 self.object_name = str[start:end] 00079 start = end 00080 end += 1 00081 (self.disable_video,) = _struct_B.unpack(str[start:end]) 00082 self.disable_video = bool(self.disable_video) 00083 return self 00084 except struct.error as e: 00085 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00086 00087 00088 def serialize_numpy(self, buff, numpy): 00089 """ 00090 serialize message with numpy array types into buffer 00091 @param buff: buffer 00092 @type buff: StringIO 00093 @param numpy: numpy python module 00094 @type numpy module 00095 """ 00096 try: 00097 _x = self.object_name 00098 length = len(_x) 00099 buff.write(struct.pack('<I%ss'%length, length, _x)) 00100 buff.write(_struct_B.pack(self.disable_video)) 00101 except struct.error as se: self._check_types(se) 00102 except TypeError as te: self._check_types(te) 00103 00104 def deserialize_numpy(self, str, numpy): 00105 """ 00106 unpack serialized message in str into this message instance using numpy for array types 00107 @param str: byte array of serialized message 00108 @type str: str 00109 @param numpy: numpy python module 00110 @type numpy: module 00111 """ 00112 try: 00113 end = 0 00114 start = end 00115 end += 4 00116 (length,) = _struct_I.unpack(str[start:end]) 00117 start = end 00118 end += length 00119 self.object_name = str[start:end] 00120 start = end 00121 end += 1 00122 (self.disable_video,) = _struct_B.unpack(str[start:end]) 00123 self.disable_video = bool(self.disable_video) 00124 return self 00125 except struct.error as e: 00126 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00127 00128 _struct_I = roslib.message.struct_I 00129 _struct_B = struct.Struct("<B")