Let $P_1,\ldots,P_r$ be polynomials over ${\mathbb R}^N$. I am interested in the homotopy type of the semi-algebraic set defined by $$ P_j(x_1,\ldots,x_N)>0,\qquad j=1,\ldots,r . $$

Is there a general theory about that?

Here are motivating examples:

If $r=1$ and $P$ is a homogeneous polynomial, hyperbolic in the direction of some vector $e\ne0$, the connected component of $e$ in $P>0$ is convex (Garding) and therefore has a trivial topology.

If ${\mathbb R}^N=M_n({\mathbb R})$, $r=1$ and $P(M)=\det M$, then $P>0$ is $GL_n^+({\mathbb R})$. Thanks to the polar decomposition, it is homeomorphic to $SO_n({\mathbb R})\times SDP_n$ and its homotopy type is that of $SO_n({\mathbb R})$. For instance, the fundamental group is ${\mathbb Z}$ if $n=2$ and ${\mathbb Z}/2{\mathbb Z}$ if $n\ge3$.

If ${\mathbb R}^N=M_n({\mathbb R})$, $r=n$ and $P_j$ is the $j$th principal minor, then the set $X$ defined by all $P_j(M)>0$ is homeomorphic to $L_n\times U_n^+$, where $L_n$ is the set of lower triangular matrices with unit diagonal and $U_n$ consists of upper triangular matrices with strictly positive diagonal ($LU$ factorization). The homotopy type of $X$ is thus trivial.

I am interested in the special case of the set $TP_n$ of totally positive $n\times n$ matrices. It is defined by the inequalities involving minors $$ M\begin{pmatrix} i_1 & \ldots & i_s \\ j_1 & \ldots & j_s \end{pmatrix} > 0 $$ for every $s=1,\ldots,n$ and every increasing sequences $k\mapsto i_k$ and $k\mapsto j_k$.

I point out that this latter question can be reduced to that of the homotopy type of appropriate subsets $\ell_n$ and $u_n^+$ of $L_n$ and $U_n^+$, defined by the minor equalities above with either the restriction $i_s\le j_1$ (upper triangular case) or $j_s\le i_1$ (lower triangular case). It is known that $TP_n=\ell_n\cdot u_n^+$.