  Bearing-based distributed formation control is attractive because it can be
implemented using vision-based measurements to achieve a desired formation.
Gradient-descent-based controllers using bearing measurements have been shown
to have many beneficial characteristics, such as global convergence,
applicability to different graph topologies and workspaces of arbitrary
dimension, and some flexibility in the choice of the cost. In practice,
however, such controllers typically yield convoluted paths from their initial
location to the final position in the formation. In this paper we propose a
novel procedure to optimize gradient-descent-based bearing-based formation
controllers to obtain shorter paths. Our approach is based on the
parameterization of the cost function and, by extension, of the controller. We
form and solve a nonlinear optimization problem with the sum of path lengths of
the agent trajectories as the objective and subject to the original equilibria
and global convergence conditions for formation control. Our simulation shows
that the parameters can be optimized from a very small number of training
samples (1 to 7) to straighten the trajectory by around 16% for a large number
of random initial conditions for bearing-only formation. However, in the
absence of any range information, the scale of the formation is not fixed and
this optimization may lead to an undesired compression of the formation size.
Including range measurements avoids this issue and leads to further
trajectories straightening by 66%.
