6 from std_msgs.msg
import Float64MultiArray
7 from random
import random
9 rospy.init_node(
"array_sin_cos")
10 pub = rospy.Publisher(
"/array_sin_cos", Float64MultiArray, queue_size=1)
13 while not rospy.is_shutdown():
14 if counter == RESOLUTION:
16 arr = Float64MultiArray()
17 arr.data = [math.sin(2 * math.pi / RESOLUTION * counter),
18 math.cos(2 * math.pi / RESOLUTION * counter),
19 -math.sin(2 * math.pi / RESOLUTION * counter),
20 -math.cos(2 * math.pi / RESOLUTION * counter)]
26 if __name__ ==
"__main__":