**Unfortunately, my original answer below was completely misguided (i.e., wrong), and the people who up-voted it should feel free to reverse their votes! I'm leaving the answer below so that people can see what it was, but I'm prefacing it with a correction. I'm not deleting it because then maybe people won't be able to see it and know that my answer was wrong.** In fact, there is *no* metric on the space $\Lambda$ of of lines (or oriented lines) in $\mathbb{R}^3$ that is invariant under the group $G$ of Euclidean motions and that induces the standard toplogy on $\Lambda$! This follows from the arguments that Nanda made below. The point is that, if there were a $G$-invariant metric that induced the standard topology, then, when $x$ and $y$ are two (oriented) lines meeting at an angle $\theta\in[0,\pi]$, then $d(x,y) = f(\theta)$, where $f(0)=0$ but $f(\theta)>0$ when $\theta>0$. However, now if $x$ and $z$ are any distinct (oriented) parallel lines in space, then for any $\epsilon>0$ there will exist an oriented line $y$ that meets both $x$ and $z$ at an angle of $\epsilon$, so $d(x,z)\leq 2f(\epsilon)$ for all $\epsilon>0$. This implies that $d(x,z)=0$ for any parallel oriented lines, so $d$ cannot be a metric of the desired type. The mistake I made that led to the incorrect answer below what that I forgot that the subgroup $H$ of $G$ that stabilizes a given line is not compact, and so that there does not have to exist a $G$-invariant metric on $\Lambda=G/H$. And, indeed, as the argument above shows, there is no such metric. There is a $G$-invariant measure, but that's a much weaker statement. I'm very sorry for the error and would be happy to give up all of the reputation points that people have awarded to me for it. I don't know how to do that, though, without deleting the answer, and I think that it might be useful to some people to see that the naïve expecation that there should be such a metric is not actually borne out. **Original Answer** The standard way of doing this is to regard the space $\Lambda$ of lines in (or oriented lines) $\mathbb{R}^3$ as a homogeneous space of the group $G$ of Euclidean motions. Then there is a natural $G$-invariant Riemannian metric on $\Lambda$, and you take the metric from that. I could calculate that explicitly if you are having trouble with it. Another method is to note that the space of oriented lines is naturally equivalent to the tangent bundle of $S^2$, namely, given a line $l$, you let $u(l)\in S^2$ be the oriented direction of the line, and you let $v(l)\in u(l)^\perp$ be the point on $l$ that is closest to the origin. Then the mapping $l\to \bigl(u(l),v(l)\bigr)$ embeds the space of oriented lines in the space $S^2\times\mathbb{R}^3$ and you can take the induced metric, for example.