My textbook says,
When applying equilibrium conditions for a rigid body, we are free to choose any point as the origin of the reference frame.
I am trying to understand this by looking at the following picture (from an exercise problem), in which the ball is in static equilibrium because of the applied horizontal force $\vec F$ and the friction between the ball and the surface.
If we pick the point where the surface and the ball are in contact as the origin, then I can see how the torques cancel out. We have a negative torque $F \cos \theta$ acting on the center of the ball at a distance of $R$ and a positive torque from gravity $ mg \sin \theta$ acting again on the center of the ball at distance $R$. So
$$\sum \tau = 0 = - F R \cos \theta + mg R \sin \theta$$
and we can begin solving for the external force.
Alternatively, let's try defining the center of the ball as the origin. Since the applied force and gravity both act on the center of the ball, they provide zero torque. Likewise, the normal force from the surface is pointed directly at the ball's center and therefore provides zero torque.
The only nonzero torque I can see is provided by the frictional force, whose magnitude is $mg \cos \theta$, and acts at a distance of $R$ in the positive (CCW) direction.
$$\sum \tau' = 0 = \mu_s mg R \cos \theta$$
Since the friction force is nonzero, what force causes the torque to balance when choosing the center of the ball as the origin?