def run(self): rate = rospy.Rate(self.hz) while not rospy.is_shutdown(): speed = self.getSpeed() self.sendSpeed(speed) rate.sleep()