sample_3d_plot.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 
00003 import time
00004 
00005 import numpy as np
00006 
00007 import rospy
00008 from std_msgs.msg import Float32
00009 
00010 
00011 def main():
00012     pub1 = rospy.Publisher('~output1', Float32, queue_size=1)
00013     pub2 = rospy.Publisher('~output2', Float32, queue_size=1)
00014     pub3 = rospy.Publisher('~output3', Float32, queue_size=1)
00015     rate = rospy.Rate(10.0)
00016     rospy.sleep(1.0)
00017 
00018     while not rospy.is_shutdown():
00019         pub1.publish(float(time.time() % 1))
00020         pub2.publish(np.cos(time.time()).astype(np.float32))
00021         pub3.publish(np.sin(time.time()).astype(np.float32))
00022         rate.sleep()
00023 
00024 
00025 if __name__ == '__main__':
00026     rospy.init_node('sample_3d_plot')
00027     main()


jsk_rqt_plugins
Author(s):
autogenerated on Wed May 1 2019 02:40:16