in robot_ws/src/cloudwatch_robot/nodes/rotate.py [0:0]
def rotate_forever(self):
self.twist = Twist()
direction = 1
angular_speed = 0.2
r = rospy.Rate(0.1)
while not rospy.is_shutdown():
self.twist.angular.z = direction * angular_speed
self._cmd_pub.publish(self.twist)
rospy.loginfo('Rotating Robot: %s', self.twist)
r.sleep()