Step 1: Use the circumradius formula for a right triangle.
Since
\[
\angle C=\frac{\pi}{2},
\]
the side \(c\) is the hypotenuse.
For a right-angled triangle,
\[
R=\frac{c}{2}
\]
Step 2: Use the inradius formula.
For a right triangle with sides \(a,b,c\),
\[
r=\frac{a+b-c}{2}
\]
Step 3: Add \(R\) and \(r\).
Therefore,
\[
R+r
=
\frac{c}{2}
+
\frac{a+b-c}{2}
\]
\[
=
\frac{a+b}{2}
\]
Step 4: Final conclusion.
Hence,
\[
\boxed{\frac{a+b}{2}}
\]
Therefore, the correct option is
\[
\boxed{\left(2\right)\ \frac{a+b}{2}}
\]