sample_3d_plot.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 
3 import time
4 
5 import numpy as np
6 
7 import rospy
8 from std_msgs.msg import Float32
9 
10 
11 def main():
12  pub1 = rospy.Publisher('~output1', Float32, queue_size=1)
13  pub2 = rospy.Publisher('~output2', Float32, queue_size=1)
14  pub3 = rospy.Publisher('~output3', Float32, queue_size=1)
15  rate = rospy.Rate(10.0)
16  rospy.sleep(1.0)
17 
18  while not rospy.is_shutdown():
19  pub1.publish(float(time.time() % 1))
20  pub2.publish(np.cos(time.time()).astype(np.float32))
21  pub3.publish(np.sin(time.time()).astype(np.float32))
22  rate.sleep()
23 
24 
25 if __name__ == '__main__':
26  rospy.init_node('sample_3d_plot')
27  main()


jsk_rqt_plugins
Author(s):
autogenerated on Fri Feb 5 2021 04:03:20