title: moving a turtle in a circle and stop it in the initial position as a ros node?
body: <p>I ran the below code using rosrun command as a node but not running in a circle anymore. But there's no error in this function.
  How to solve this and ran in a circle and stop in initial position?</p>
  <p>ROS : Melodic
  Ubuntu 18.04</p>
  <pre><code>#!/usr/bin/env python
  import rospy
  import rospkg
  from geometry_msgs.msg import Twist
  from turtlesim.msg import Pose
  #defining variables
  x = 0
  y = 0
  theta = 0.0
      
  #main function  
  def pose_callback(msg):
      global x, y, psi
      x = msg.x
      y = msg.y
      psi = msg.theta
      print(msg.theta)
  if __name__==&quot;__main__&quot;:
  
      
      rospy.init_node('node_turtle_revolve', anonymous = True)
      r = rospy.Rate(10)
      velocity_publisher = rospy.Publisher('/turtle1/cmd_vel', Twist, queue_size=10) 
      
      while not rospy.is_shutdown():
          
      sub = rospy.Subscriber('/turtle1/pose', Pose, pose_callback)
          vel_msg = Twist()
      vel_msg.linear.x = 0.2
      vel_msg.linear.x = 0.0
      vel_msg.linear.x = 0.0
      vel_msg.angular.x= 0.0
      vel_msg.angular.y= 0.0
      vel_msg.angular.z= 0.1
      velocity_publisher.publish(vel_msg)
      r.sleep
  </code></pre>