$search
00001 """autogenerated by genmsg_py from FindBasePoseResult.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import geometry_msgs.msg 00006 import std_msgs.msg 00007 00008 class FindBasePoseResult(roslib.message.Message): 00009 _md5sum = "f68248e03fd8f6c9caa2d9d74f8077e6" 00010 _type = "find_base_pose/FindBasePoseResult" 00011 _has_header = False #flag to mark the presence of a Header object 00012 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00013 geometry_msgs/PoseStamped[] base_poses 00014 00015 ================================================================================ 00016 MSG: geometry_msgs/PoseStamped 00017 # A Pose with reference coordinate frame and timestamp 00018 Header header 00019 Pose pose 00020 00021 ================================================================================ 00022 MSG: std_msgs/Header 00023 # Standard metadata for higher-level stamped data types. 00024 # This is generally used to communicate timestamped data 00025 # in a particular coordinate frame. 00026 # 00027 # sequence ID: consecutively increasing ID 00028 uint32 seq 00029 #Two-integer timestamp that is expressed as: 00030 # * stamp.secs: seconds (stamp_secs) since epoch 00031 # * stamp.nsecs: nanoseconds since stamp_secs 00032 # time-handling sugar is provided by the client library 00033 time stamp 00034 #Frame this data is associated with 00035 # 0: no frame 00036 # 1: global frame 00037 string frame_id 00038 00039 ================================================================================ 00040 MSG: geometry_msgs/Pose 00041 # A representation of pose in free space, composed of postion and orientation. 00042 Point position 00043 Quaternion orientation 00044 00045 ================================================================================ 00046 MSG: geometry_msgs/Point 00047 # This contains the position of a point in free space 00048 float64 x 00049 float64 y 00050 float64 z 00051 00052 ================================================================================ 00053 MSG: geometry_msgs/Quaternion 00054 # This represents an orientation in free space in quaternion form. 00055 00056 float64 x 00057 float64 y 00058 float64 z 00059 float64 w 00060 00061 """ 00062 __slots__ = ['base_poses'] 00063 _slot_types = ['geometry_msgs/PoseStamped[]'] 00064 00065 def __init__(self, *args, **kwds): 00066 """ 00067 Constructor. Any message fields that are implicitly/explicitly 00068 set to None will be assigned a default value. The recommend 00069 use is keyword arguments as this is more robust to future message 00070 changes. You cannot mix in-order arguments and keyword arguments. 00071 00072 The available fields are: 00073 base_poses 00074 00075 @param args: complete set of field values, in .msg order 00076 @param kwds: use keyword arguments corresponding to message field names 00077 to set specific fields. 00078 """ 00079 if args or kwds: 00080 super(FindBasePoseResult, self).__init__(*args, **kwds) 00081 #message fields cannot be None, assign default values for those that are 00082 if self.base_poses is None: 00083 self.base_poses = [] 00084 else: 00085 self.base_poses = [] 00086 00087 def _get_types(self): 00088 """ 00089 internal API method 00090 """ 00091 return self._slot_types 00092 00093 def serialize(self, buff): 00094 """ 00095 serialize message into buffer 00096 @param buff: buffer 00097 @type buff: StringIO 00098 """ 00099 try: 00100 length = len(self.base_poses) 00101 buff.write(_struct_I.pack(length)) 00102 for val1 in self.base_poses: 00103 _v1 = val1.header 00104 buff.write(_struct_I.pack(_v1.seq)) 00105 _v2 = _v1.stamp 00106 _x = _v2 00107 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00108 _x = _v1.frame_id 00109 length = len(_x) 00110 buff.write(struct.pack('<I%ss'%length, length, _x)) 00111 _v3 = val1.pose 00112 _v4 = _v3.position 00113 _x = _v4 00114 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00115 _v5 = _v3.orientation 00116 _x = _v5 00117 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00118 except struct.error as se: self._check_types(se) 00119 except TypeError as te: self._check_types(te) 00120 00121 def deserialize(self, str): 00122 """ 00123 unpack serialized message in str into this message instance 00124 @param str: byte array of serialized message 00125 @type str: str 00126 """ 00127 try: 00128 end = 0 00129 start = end 00130 end += 4 00131 (length,) = _struct_I.unpack(str[start:end]) 00132 self.base_poses = [] 00133 for i in range(0, length): 00134 val1 = geometry_msgs.msg.PoseStamped() 00135 _v6 = val1.header 00136 start = end 00137 end += 4 00138 (_v6.seq,) = _struct_I.unpack(str[start:end]) 00139 _v7 = _v6.stamp 00140 _x = _v7 00141 start = end 00142 end += 8 00143 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00144 start = end 00145 end += 4 00146 (length,) = _struct_I.unpack(str[start:end]) 00147 start = end 00148 end += length 00149 _v6.frame_id = str[start:end] 00150 _v8 = val1.pose 00151 _v9 = _v8.position 00152 _x = _v9 00153 start = end 00154 end += 24 00155 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00156 _v10 = _v8.orientation 00157 _x = _v10 00158 start = end 00159 end += 32 00160 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00161 self.base_poses.append(val1) 00162 return self 00163 except struct.error as e: 00164 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00165 00166 00167 def serialize_numpy(self, buff, numpy): 00168 """ 00169 serialize message with numpy array types into buffer 00170 @param buff: buffer 00171 @type buff: StringIO 00172 @param numpy: numpy python module 00173 @type numpy module 00174 """ 00175 try: 00176 length = len(self.base_poses) 00177 buff.write(_struct_I.pack(length)) 00178 for val1 in self.base_poses: 00179 _v11 = val1.header 00180 buff.write(_struct_I.pack(_v11.seq)) 00181 _v12 = _v11.stamp 00182 _x = _v12 00183 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00184 _x = _v11.frame_id 00185 length = len(_x) 00186 buff.write(struct.pack('<I%ss'%length, length, _x)) 00187 _v13 = val1.pose 00188 _v14 = _v13.position 00189 _x = _v14 00190 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00191 _v15 = _v13.orientation 00192 _x = _v15 00193 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00194 except struct.error as se: self._check_types(se) 00195 except TypeError as te: self._check_types(te) 00196 00197 def deserialize_numpy(self, str, numpy): 00198 """ 00199 unpack serialized message in str into this message instance using numpy for array types 00200 @param str: byte array of serialized message 00201 @type str: str 00202 @param numpy: numpy python module 00203 @type numpy: module 00204 """ 00205 try: 00206 end = 0 00207 start = end 00208 end += 4 00209 (length,) = _struct_I.unpack(str[start:end]) 00210 self.base_poses = [] 00211 for i in range(0, length): 00212 val1 = geometry_msgs.msg.PoseStamped() 00213 _v16 = val1.header 00214 start = end 00215 end += 4 00216 (_v16.seq,) = _struct_I.unpack(str[start:end]) 00217 _v17 = _v16.stamp 00218 _x = _v17 00219 start = end 00220 end += 8 00221 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00222 start = end 00223 end += 4 00224 (length,) = _struct_I.unpack(str[start:end]) 00225 start = end 00226 end += length 00227 _v16.frame_id = str[start:end] 00228 _v18 = val1.pose 00229 _v19 = _v18.position 00230 _x = _v19 00231 start = end 00232 end += 24 00233 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00234 _v20 = _v18.orientation 00235 _x = _v20 00236 start = end 00237 end += 32 00238 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00239 self.base_poses.append(val1) 00240 return self 00241 except struct.error as e: 00242 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00243 00244 _struct_I = roslib.message.struct_I 00245 _struct_4d = struct.Struct("<4d") 00246 _struct_2I = struct.Struct("<2I") 00247 _struct_3d = struct.Struct("<3d")