We address the distributed real-time robot localization problem in multi-robot systems. In traditional localization approaches, beacons are well-separated and fixed at known locations. Each robot lies within the convex hull of the beacon positions and can be localized in the global frame by a central computational unit or by local units on board. Apart from the traditional approaches, we propose a real-time localization algorithm based on an onboard anchor configuration that does not use a fixed infrastructure of beacons. Rather, a robot is equipped with a set of ultrawideband anchors that measure distances to every other robot that carries an onboard ultrawideband sensor. Robot location estimates are generated in the anchor robot's local frame by using an extended Kalman filter without explicit communication between robots. This decentralized approach potentially simplifies the design of subsequent distributed optimization and control algorithms. More importantly, our algorithm does not require a structured environment such as fixed beacons. Thus, our algorithm is suitable for outdoor applications. We evaluate the performance of our algorithm through simulations on a two-robot system. We demonstrate through experiments that although the anchors are positioned relatively close to each other (with half a meter separation), our algorithm provides some formation control algorithms with a sufficiently accurate localization estimate feedback in closed-loop control systems.