Online trajectory scaling for manipulators subject tohigh-order kinematic and dynamic constraints