I'm reading Siciliano et al.'s Robotics: Modeling, Planning and Control, and I'm confused about the notation used in definiting rotation matrices.
On page 46, they state
If $\textbf{R}_i^j$ denotes the rotation matrix of Frame $i$ with respect to Frame $j$, it is $$ \begin{equation} \textbf{p}^1 = \textbf{R}_2^1\textbf{p}^2. \end{equation} $$
To me, this notation says, "$\textbf{R}_2^1$ 'rotates' a vector from frame 2 to frame 1." However, in the discussion of fixed frames on page 47, they state that
$$ \begin{equation} \bar{\textbf{R}}_2^0 = \textbf{R}_1^0\textbf{R}_0^1\bar{\textbf{R}}_2^1 \textbf{R}_1^0 \end{equation} = \bar{\textbf{R}}_2^1 \textbf{R}_1^0. $$
If I try to apply my original interpretation, it would say that $\textbf{R}_1^0$ rotates a vector from frame 1 to 0, and then $\bar{\textbf{R}}_1^2$ rotates that vector from its frame 1 to frame 2, which doesn't make sense.
If I instead interpret it as, " $\textbf{R}_1^0$ rotates a vector from frame 0 to frame 1, and then $\bar{\textbf{R}}_2^1$ rotates that vector from frame 1 to frame 2," then that make sense too.
But then the first equation from page 46 doesn't make sense, since it would say, "rotate $\textbf{p}^2$ from frame 1 to frame 2."
Any suggestions on the proper way to interpret these expressions? Thank you!