$search
00001 """autogenerated by genmsg_py from LookupTransformGoal.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import roslib.rostime 00006 00007 class LookupTransformGoal(roslib.message.Message): 00008 _md5sum = "35e3720468131d675a18bb6f3e5f22f8" 00009 _type = "tf2_msgs/LookupTransformGoal" 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 #Simple API 00013 string target_frame 00014 string source_frame 00015 time source_time 00016 duration timeout 00017 00018 #Advanced API 00019 time target_time 00020 string fixed_frame 00021 00022 #Whether or not to use the advanced API 00023 bool advanced 00024 00025 00026 """ 00027 __slots__ = ['target_frame','source_frame','source_time','timeout','target_time','fixed_frame','advanced'] 00028 _slot_types = ['string','string','time','duration','time','string','bool'] 00029 00030 def __init__(self, *args, **kwds): 00031 """ 00032 Constructor. Any message fields that are implicitly/explicitly 00033 set to None will be assigned a default value. The recommend 00034 use is keyword arguments as this is more robust to future message 00035 changes. You cannot mix in-order arguments and keyword arguments. 00036 00037 The available fields are: 00038 target_frame,source_frame,source_time,timeout,target_time,fixed_frame,advanced 00039 00040 @param args: complete set of field values, in .msg order 00041 @param kwds: use keyword arguments corresponding to message field names 00042 to set specific fields. 00043 """ 00044 if args or kwds: 00045 super(LookupTransformGoal, self).__init__(*args, **kwds) 00046 #message fields cannot be None, assign default values for those that are 00047 if self.target_frame is None: 00048 self.target_frame = '' 00049 if self.source_frame is None: 00050 self.source_frame = '' 00051 if self.source_time is None: 00052 self.source_time = roslib.rostime.Time() 00053 if self.timeout is None: 00054 self.timeout = roslib.rostime.Duration() 00055 if self.target_time is None: 00056 self.target_time = roslib.rostime.Time() 00057 if self.fixed_frame is None: 00058 self.fixed_frame = '' 00059 if self.advanced is None: 00060 self.advanced = False 00061 else: 00062 self.target_frame = '' 00063 self.source_frame = '' 00064 self.source_time = roslib.rostime.Time() 00065 self.timeout = roslib.rostime.Duration() 00066 self.target_time = roslib.rostime.Time() 00067 self.fixed_frame = '' 00068 self.advanced = False 00069 00070 def _get_types(self): 00071 """ 00072 internal API method 00073 """ 00074 return self._slot_types 00075 00076 def serialize(self, buff): 00077 """ 00078 serialize message into buffer 00079 @param buff: buffer 00080 @type buff: StringIO 00081 """ 00082 try: 00083 _x = self.target_frame 00084 length = len(_x) 00085 buff.write(struct.pack('<I%ss'%length, length, _x)) 00086 _x = self.source_frame 00087 length = len(_x) 00088 buff.write(struct.pack('<I%ss'%length, length, _x)) 00089 _x = self 00090 buff.write(_struct_2I2i2I.pack(_x.source_time.secs, _x.source_time.nsecs, _x.timeout.secs, _x.timeout.nsecs, _x.target_time.secs, _x.target_time.nsecs)) 00091 _x = self.fixed_frame 00092 length = len(_x) 00093 buff.write(struct.pack('<I%ss'%length, length, _x)) 00094 buff.write(_struct_B.pack(self.advanced)) 00095 except struct.error as se: self._check_types(se) 00096 except TypeError as te: self._check_types(te) 00097 00098 def deserialize(self, str): 00099 """ 00100 unpack serialized message in str into this message instance 00101 @param str: byte array of serialized message 00102 @type str: str 00103 """ 00104 try: 00105 if self.source_time is None: 00106 self.source_time = roslib.rostime.Time() 00107 if self.timeout is None: 00108 self.timeout = roslib.rostime.Duration() 00109 if self.target_time is None: 00110 self.target_time = roslib.rostime.Time() 00111 end = 0 00112 start = end 00113 end += 4 00114 (length,) = _struct_I.unpack(str[start:end]) 00115 start = end 00116 end += length 00117 self.target_frame = str[start:end] 00118 start = end 00119 end += 4 00120 (length,) = _struct_I.unpack(str[start:end]) 00121 start = end 00122 end += length 00123 self.source_frame = str[start:end] 00124 _x = self 00125 start = end 00126 end += 24 00127 (_x.source_time.secs, _x.source_time.nsecs, _x.timeout.secs, _x.timeout.nsecs, _x.target_time.secs, _x.target_time.nsecs,) = _struct_2I2i2I.unpack(str[start:end]) 00128 start = end 00129 end += 4 00130 (length,) = _struct_I.unpack(str[start:end]) 00131 start = end 00132 end += length 00133 self.fixed_frame = str[start:end] 00134 start = end 00135 end += 1 00136 (self.advanced,) = _struct_B.unpack(str[start:end]) 00137 self.advanced = bool(self.advanced) 00138 self.source_time.canon() 00139 self.timeout.canon() 00140 self.target_time.canon() 00141 return self 00142 except struct.error as e: 00143 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00144 00145 00146 def serialize_numpy(self, buff, numpy): 00147 """ 00148 serialize message with numpy array types into buffer 00149 @param buff: buffer 00150 @type buff: StringIO 00151 @param numpy: numpy python module 00152 @type numpy module 00153 """ 00154 try: 00155 _x = self.target_frame 00156 length = len(_x) 00157 buff.write(struct.pack('<I%ss'%length, length, _x)) 00158 _x = self.source_frame 00159 length = len(_x) 00160 buff.write(struct.pack('<I%ss'%length, length, _x)) 00161 _x = self 00162 buff.write(_struct_2I2i2I.pack(_x.source_time.secs, _x.source_time.nsecs, _x.timeout.secs, _x.timeout.nsecs, _x.target_time.secs, _x.target_time.nsecs)) 00163 _x = self.fixed_frame 00164 length = len(_x) 00165 buff.write(struct.pack('<I%ss'%length, length, _x)) 00166 buff.write(_struct_B.pack(self.advanced)) 00167 except struct.error as se: self._check_types(se) 00168 except TypeError as te: self._check_types(te) 00169 00170 def deserialize_numpy(self, str, numpy): 00171 """ 00172 unpack serialized message in str into this message instance using numpy for array types 00173 @param str: byte array of serialized message 00174 @type str: str 00175 @param numpy: numpy python module 00176 @type numpy: module 00177 """ 00178 try: 00179 if self.source_time is None: 00180 self.source_time = roslib.rostime.Time() 00181 if self.timeout is None: 00182 self.timeout = roslib.rostime.Duration() 00183 if self.target_time is None: 00184 self.target_time = roslib.rostime.Time() 00185 end = 0 00186 start = end 00187 end += 4 00188 (length,) = _struct_I.unpack(str[start:end]) 00189 start = end 00190 end += length 00191 self.target_frame = str[start:end] 00192 start = end 00193 end += 4 00194 (length,) = _struct_I.unpack(str[start:end]) 00195 start = end 00196 end += length 00197 self.source_frame = str[start:end] 00198 _x = self 00199 start = end 00200 end += 24 00201 (_x.source_time.secs, _x.source_time.nsecs, _x.timeout.secs, _x.timeout.nsecs, _x.target_time.secs, _x.target_time.nsecs,) = _struct_2I2i2I.unpack(str[start:end]) 00202 start = end 00203 end += 4 00204 (length,) = _struct_I.unpack(str[start:end]) 00205 start = end 00206 end += length 00207 self.fixed_frame = str[start:end] 00208 start = end 00209 end += 1 00210 (self.advanced,) = _struct_B.unpack(str[start:end]) 00211 self.advanced = bool(self.advanced) 00212 self.source_time.canon() 00213 self.timeout.canon() 00214 self.target_time.canon() 00215 return self 00216 except struct.error as e: 00217 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00218 00219 _struct_I = roslib.message.struct_I 00220 _struct_B = struct.Struct("<B") 00221 _struct_2I2i2I = struct.Struct("<2I2i2I")