20 from std_msgs.msg
import Float64MultiArray
23 rospy.init_node(
"test_publisher_vel", anonymous=
True)
25 pub_vel = rospy.Publisher(
"joint_group_velocity_controller/command", Float64MultiArray, queue_size=1)
34 b = 0.1 * (2.0*math.pi/freq)
39 vel_msg = Float64MultiArray()
40 vel_msg.data = [0.0] * 7
42 while not rospy.is_shutdown():
43 vel = a*math.sin(b*i+c) + d
45 vel_msg.data[joint_idx] = vel
46 pub_vel.publish(vel_msg)
50 if __name__ ==
'__main__':
53 except rospy.ROSInterruptException:
pass