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