  Robotic tasks which involve uncertainty--due to variation in goal,
environment configuration, or confidence in task model--may require human input
to instruct or adapt the robot. In tasks with physical contact, several
existing methods for adapting robot trajectory or impedance according to
individual uncertainties have been proposed, e.g., realizing intention
detection or uncertainty-aware learning from demonstration. However, isolated
methods cannot address the wide range of uncertainties jointly present in many
tasks.
  To improve generality, this paper proposes a model predictive control (MPC)
framework which plans both trajectory and impedance online, can consider
discrete and continuous uncertainties, includes safety constraints, and can be
efficiently applied to a new task. This framework can consider uncertainty
from: contact constraint variation, uncertainty in human goals, or task
disturbances. An uncertainty-aware task model is learned from a few ($\leq3$)
demonstrations using Gaussian Processes. This task model is used in a nonlinear
MPC problem to optimize robot trajectory and impedance according to belief in
discrete human goals, human kinematics, safety constraints, contact stability,
and frequency-domain disturbance rejection. This MPC formulation is introduced,
analyzed with respect to convexity, and validated in co-manipulation with
multiple goals, a collaborative polishing task, and a collaborative assembly
task.
