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