$search
00001 """autogenerated by genmsg_py from PoseStampedScriptedResult.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class PoseStampedScriptedResult(roslib.message.Message): 00007 _md5sum = "c22f2a1ed8654a0b365f1bb3f7ff2c0f" 00008 _type = "pr2_object_manipulation_msgs/PoseStampedScriptedResult" 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 00012 string result 00013 00014 00015 """ 00016 __slots__ = ['result'] 00017 _slot_types = ['string'] 00018 00019 def __init__(self, *args, **kwds): 00020 """ 00021 Constructor. Any message fields that are implicitly/explicitly 00022 set to None will be assigned a default value. The recommend 00023 use is keyword arguments as this is more robust to future message 00024 changes. You cannot mix in-order arguments and keyword arguments. 00025 00026 The available fields are: 00027 result 00028 00029 @param args: complete set of field values, in .msg order 00030 @param kwds: use keyword arguments corresponding to message field names 00031 to set specific fields. 00032 """ 00033 if args or kwds: 00034 super(PoseStampedScriptedResult, self).__init__(*args, **kwds) 00035 #message fields cannot be None, assign default values for those that are 00036 if self.result is None: 00037 self.result = '' 00038 else: 00039 self.result = '' 00040 00041 def _get_types(self): 00042 """ 00043 internal API method 00044 """ 00045 return self._slot_types 00046 00047 def serialize(self, buff): 00048 """ 00049 serialize message into buffer 00050 @param buff: buffer 00051 @type buff: StringIO 00052 """ 00053 try: 00054 _x = self.result 00055 length = len(_x) 00056 buff.write(struct.pack('<I%ss'%length, length, _x)) 00057 except struct.error as se: self._check_types(se) 00058 except TypeError as te: self._check_types(te) 00059 00060 def deserialize(self, str): 00061 """ 00062 unpack serialized message in str into this message instance 00063 @param str: byte array of serialized message 00064 @type str: str 00065 """ 00066 try: 00067 end = 0 00068 start = end 00069 end += 4 00070 (length,) = _struct_I.unpack(str[start:end]) 00071 start = end 00072 end += length 00073 self.result = str[start:end] 00074 return self 00075 except struct.error as e: 00076 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00077 00078 00079 def serialize_numpy(self, buff, numpy): 00080 """ 00081 serialize message with numpy array types into buffer 00082 @param buff: buffer 00083 @type buff: StringIO 00084 @param numpy: numpy python module 00085 @type numpy module 00086 """ 00087 try: 00088 _x = self.result 00089 length = len(_x) 00090 buff.write(struct.pack('<I%ss'%length, length, _x)) 00091 except struct.error as se: self._check_types(se) 00092 except TypeError as te: self._check_types(te) 00093 00094 def deserialize_numpy(self, str, numpy): 00095 """ 00096 unpack serialized message in str into this message instance using numpy for array types 00097 @param str: byte array of serialized message 00098 @type str: str 00099 @param numpy: numpy python module 00100 @type numpy: module 00101 """ 00102 try: 00103 end = 0 00104 start = end 00105 end += 4 00106 (length,) = _struct_I.unpack(str[start:end]) 00107 start = end 00108 end += length 00109 self.result = str[start:end] 00110 return self 00111 except struct.error as e: 00112 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00113 00114 _struct_I = roslib.message.struct_I