Abstract-This paper addresses the problem of determining the optimal robot trajectory for localizing a robot follower in a leader-follower formation using robot-to-robot distance or bearing measurements. In particular, maintaining a perfect formation has been shown to reduce the localization accuracy (as compared to moving randomly), or even leads to loss of observability when only distance or bearing measurements are available and the robots move on parallel straight lines. To address this limitation, we allow the follower to slightly deviate from its desired formation-imposed position and seek to find the next best location where it should move to in order to minimize the uncertainty about its relative, with respect to the leader, position and orientation estimates. We formulate and solve this non-convex optimization problem analytically and show, through extensive simulations, that the proposed optimized motion strategy leads to significant localization accuracy improvement as compared to competing approaches.