20 from geometry_msgs.msg
import Twist
24 rospy.init_node(
"test_publisher_twist", anonymous=
True)
26 pub_vel = rospy.Publisher(
"command", Twist, queue_size=1)
33 b = 0.1 * (2.0*math.pi/freq)
39 time = rospy.Time.now()
41 while not rospy.is_shutdown():
42 vel = a*math.sin(b*i+c) + d
44 vel_msg.angular.z = vel
45 pub_vel.publish(vel_msg)
49 if __name__ ==
'__main__':
52 except rospy.ROSInterruptException:
pass