Nonlinear impedance control with trajectory adaptation for collaborative robotic grinding