fixed robot_stop generate function