20 from control_msgs.msg
import (
21 FollowJointTrajectoryAction,
22 FollowJointTrajectoryGoal
24 from trajectory_msgs.msg
import JointTrajectoryPoint
33 FollowJointTrajectoryAction)
34 self.
__client.wait_for_server(rospy.Duration(5.0))
36 if not self.
__client.wait_for_server(rospy.Duration(5.0)):
37 rospy.logerr(
"Action Server Not Found")
38 rospy.signal_shutdown(
"Action Server not found")
50 goal = FollowJointTrajectoryGoal()
51 goal.trajectory.joint_names = [
"waist_yaw_joint"]
55 yawpoint = JointTrajectoryPoint()
57 yawpoint.time_from_start = rospy.Duration(nsecs=1)
58 goal.trajectory.points.append(yawpoint)
67 yawpoint = JointTrajectoryPoint()
68 yawpoint.positions.append(yaw_angle)
69 yawpoint.time_from_start = rospy.Duration(goal_sec)
70 goal.trajectory.points.append(yawpoint)
76 self.
__client.wait_for_result(rospy.Duration(goal_sec))
79 if __name__ ==
'__main__':
80 rospy.init_node(
"waist_test")
83 wy.set_present_angle(math.radians(0.0))
87 wy.set_angle(math.radians(0.0), 0.1)
91 wy.set_angle(math.radians(45.0), 1.0)
95 wy.set_angle(math.radians(0.0), 1.0)
99 wy.set_angle(math.radians(-45.0), 1.0)
103 wy.set_angle(math.radians(0.0), 1.0)