Understanding rho and theta in hough
The Hough transform seeks to replace finding colinear points by  finding concurrent lines.  The two problems are  mathematically equivalent. But dealing with all discrete pixels and a large number of digital lines is complicated and computationally expensive.
Most implementations of the Hough transform discretize the set of distances and angles. With respect to some origin, one can describe a line in polar coordinates by:

a positive distance and an angle in $[0,\,2\pi[$
a signed distance and an angle in $[0,\,\pi[$

This is explained in Polar coordinate system/Uniqueness of polar coordinates:

any polar coordinate is identical to the coordinate with the negative
radial component and the opposite direction

History: the rho-theta parametrization universally used today was first described in Duda, R.O.; Hart, P. E. (1972). &quot;Use of the Hough Transformation to Detect Lines and Curves in Pictures&quot;.