  In this paper, we propose a framework for generating motion primitives for
lattice-based motion planners automatically. Given a family of systems, the
user only needs to specify which principle types of motions, which are here
denoted maneuvers, that are relevant for the considered system family. Based on
the selected maneuver types and a selected system instance, the algorithm not
only automatically optimizes the motions connecting pre-defined boundary
conditions, but also simultaneously optimizes the end-point boundary conditions
as well. This significantly reduces the time consuming part of manually
specifying all boundary value problems that should be solved, and no exhaustive
search to generate feasible motions is required. In addition to handling static
a priori known system parameters, the framework also allows for fast automatic
re-optimization of motion primitives if the system parameters change while the
system is in use, e.g, if the load significantly changes or a trailer with a
new geometry is picked up by an autonomous truck. We also show in several
numerical examples that the framework can enhance the performance of the motion
planner in terms of total cost for the produced solution.
