19 from geometry_msgs.msg
import TwistStamped
22 rospy.init_node(
"input_series_twist", anonymous=
True)
24 pub = rospy.Publisher(
"twist_controller/command_twist_stamped", TwistStamped, queue_size=1)
28 twist_msg = TwistStamped()
29 twist_msg.header.stamp = rospy.Time.now()
30 twist_msg.header.frame_id =
"arm_left_base_link" 31 twist_msg.twist.linear.x = 0
32 twist_msg.twist.linear.y = 0
33 twist_msg.twist.linear.z = 0
34 twist_msg.twist.angular.x = 0
35 twist_msg.twist.angular.y = 0
36 twist_msg.twist.angular.z = 0
41 for i
in range(0, 5*rate, 1):
42 twist_msg.header.stamp = rospy.Time.now()
43 twist_msg.header.frame_id =
"arm_left_base_link" 44 twist_msg.twist.linear.x = 0
45 twist_msg.twist.linear.y = -0.02
46 twist_msg.twist.linear.z = 0
47 twist_msg.twist.angular.x = 0
48 twist_msg.twist.angular.y = 0
49 twist_msg.twist.angular.z = 0
50 pub.publish(twist_msg)
54 for i
in range(0, 1*rate, 1):
55 twist_msg.header.stamp = rospy.Time.now()
56 twist_msg.header.frame_id =
"arm_left_base_link" 57 twist_msg.twist.linear.x = 0
58 twist_msg.twist.linear.y = 0
59 twist_msg.twist.linear.z = 0
60 twist_msg.twist.angular.x = 0
61 twist_msg.twist.angular.y = 0
62 twist_msg.twist.angular.z = 0
63 pub.publish(twist_msg)
66 for i
in range(0, 5*rate, 1):
67 twist_msg.header.stamp = rospy.Time.now()
68 twist_msg.header.frame_id =
"arm_left_base_link" 69 twist_msg.twist.linear.x = 0
70 twist_msg.twist.linear.y = 0.02
71 twist_msg.twist.linear.z = 0
72 twist_msg.twist.angular.x = 0
73 twist_msg.twist.angular.y = 0
74 twist_msg.twist.angular.z = 0
75 pub.publish(twist_msg)
79 for i
in range(0, 1*rate, 1):
80 twist_msg.header.stamp = rospy.Time.now()
81 twist_msg.header.frame_id =
"arm_left_base_link" 82 twist_msg.twist.linear.x = 0
83 twist_msg.twist.linear.y = 0
84 twist_msg.twist.linear.z = 0
85 twist_msg.twist.angular.x = 0
86 twist_msg.twist.angular.y = 0
87 twist_msg.twist.angular.z = 0
88 pub.publish(twist_msg)
93 if __name__ ==
'__main__':
96 except rospy.ROSInterruptException:
pass