  The task of maneuvering ships in confined environments is a difficult task
for a human operator. One major reason is due to the complex and slow dynamics
of the ship which need to be accounted for in order to successfully steer the
vehicle. In this work, a two-step optimization-based motion planner is proposed
for autonomous maneuvering of ships in constrained environments such as
harbors. A lattice-based motion planner is used in a first step to compute a
feasible, but suboptimal solution to a discretized version of the motion
planning problem. This solution is then used to enable efficient warm-start and
as a terminal manifold for a second receding-horizon improvement step. Both
steps of the algorithm use a high-fidelity model of the ship to plan feasible
and energy-efficient trajectories. Moreover, a novel algorithm is proposed for
automatic computation of spatial safety envelopes around the trajectory
computed by the lattice-based planner. These safety envelopes are used in the
second improvement step to obtain collision-avoidance constraints which
complexity scales very well with an increased number of surrounding obstacles.
The proposed optimization-based motion planner is evaluated with successful
results in a simulation study for autonomous docking problems in a model of the
Cape Town~harbor.
