  In this paper, we present a novel optimization-based framework for autonomous
excavator trajectory generation under various objectives, including minimum
joint displacement and minimum time. Traditional methods on excavation
trajectory generation usually separate the excavation motion into a sequence of
fixed phases, resulting in limited trajectory searching space. Our framework
explores the space of all possible excavation trajectories represented with
waypoints interpolated by a polynomial spline, thereby enabling optimization
over a larger searching space. We formulate a generic task specification for
excavation by constraining the instantaneous motion of the bucket and further
add a target-oriented constraint, i.e. swept volume that indicates the
estimated amount of excavated materials. To formulate time related objectives
and constraints, we introduce time intervals between waypoints as variables
into the optimization framework. We implement the proposed framework and
evaluate its performance on a UR5 robotic arm. The experimental results
demonstrate that the generated trajectories are able to excavate sufficient
mass of soil for different terrain shapes and have 60% shorter minimal length
than traditional excavation methods. We further compare our one-stage time
optimal trajectory generation with the two-stage method. The result shows that
trajectories generated by our one-stage method cost 18% less time on average.
