6. For the ellipse $\frac{x^{2}}{a^{2}}+\frac{y^{2}}{b^{2}}=1(a>b>0)$, the left and right foci are $F_{1}, F_{2}$, and $P$ is any point on the ellipse that does not coincide with the left or right vertices. Points $I, G$ are the incenter and centroid of $\triangle P F_{1} F_{2}$, respectively. Given that for any point $\boldsymbol{P}, \boldsymbol{I} \boldsymbol{G}$ is always perpendicular to the $\boldsymbol{x}$-axis, the eccentricity of the ellipse is $\qquad$
6. $\frac{1}{3}$

Analysis: Let $\left|P F_{1}\right|=n,\left|P F_{2}\right|=m$, then $n+m=2 a$; it is easy to know
$$
\operatorname{uri}_{P G}=\frac{1}{3}\left(\operatorname{urf}_{P F_{1}}+P F_{2}\right), P I=\frac{\operatorname{un}_{1}+n P F_{2}}{m+n+2 c}=\frac{1}{2} g \frac{\operatorname{un}_{1}+n P F_{2}}{a+c}
$$
Since $I G \perp F_{1} F_{2}$, we have $a=3 c$, thus $e=\frac{1}{3}$;