20 from control_msgs.msg
import (
21 FollowJointTrajectoryAction,
22 FollowJointTrajectoryGoal
24 from trajectory_msgs.msg
import JointTrajectoryPoint
31 FollowJointTrajectoryAction)
32 self.
__client.wait_for_server(rospy.Duration(5.0))
33 if not self.
__client.wait_for_server(rospy.Duration(5.0)):
34 rospy.logerr(
"Action Server Not Found")
35 rospy.signal_shutdown(
"Action Server not found")
41 goal = FollowJointTrajectoryGoal()
42 goal.trajectory.joint_names = [
"neck_yaw_joint",
"neck_pitch_joint"]
43 yawpoint = JointTrajectoryPoint()
48 yawpoint.time_from_start = rospy.Duration(nsecs=1)
49 goal.trajectory.points.append(yawpoint)
51 self.
__client.wait_for_result(rospy.Duration(0.1))
54 if __name__ ==
'__main__':
55 rospy.init_node(
"neck_test")
59 pitch = float(sys.argv[1])
62 np.set_angle(math.radians(0.0), math.radians(-60.0))
64 np.set_angle(math.radians(0.0), math.radians(50.0))
66 np.set_angle(math.radians(0.0), math.radians(0.0))
68 np.set_angle(math.radians(-90.0), math.radians(0.0))
70 np.set_angle(math.radians(80.0), math.radians(0.0))
72 np.set_angle(math.radians(0.0), math.radians(0.0))