Hybrid system controller for robot motions