Biologically-inspired swarm of robots with collaboration towards a common mission has a broad range of applications. However, the required dynamic localization among autonomous robots for such swarm collaboration, though usually implicitly assumed, has not been properly studied. In this paper, we address the roles of multiple antennas in localization and energy-efficient wireless communications for a swarm of robots. Following the gradient of signal powers along a trajectory, a robot can track the direction of a source robot. With three or more properly placed antennas that sense different phase shifts of carrier, a robot can localize a source. By lateration, three collaborative robots can localize a source with known distances to it. Via angulation technique, three robots can determine their geometric relationship with knowing two angles and one distance between them. The techniques can be extended from the 2-D to the 3-D space for application of wall-climbing robots. On the basis of knowledge of robot locations, beamforming techniques can be employed to receive and transmit signal towards the desired robot therefore improving energy efficiency and prolonging robot lifetime.