changing the place of ros::Rate loop_rate due to an error