Rigidity of formations in multi-robot systems is important for formation control, localization, and sensor fusion. This work proposes a rigidity maintenance gradient controller for a multi-Agent robot team. To develop such a controller, we first provide an alternative characterization of the rigidity matrix and use that to introduce the novel concept of the rigidity eigenvalue. We provide a necessary and sufficient condition relating the positivity of the rigidity eigenvalue to the rigidity of the formation. The rigidity maintenance controller is based on the gradient of the rigidity eigenvalue with respect to each robot position. This gradient has a naturally distributed structure, and is thus amenable to a distributed implementation. Additional requirements such as obstacle and inter-Agent collision avoidance, as well as typical constraints such as limited sensing/communication ranges and line-of-sight occlusions, are also explicitly considered. Finally, we present a simulation with a group of seven quadrotor UAVs to demonstrate and validate the theoretical results.