A joint trajectory generator for motion recovery