#!/usr/bin/env python
# license removed for brevity
import rospy
from trajectory_msgs.msg import JointTrajectory, JointTrajectoryPoint

if __name__ == '__main__':
	# names this node created by script	
	rospy.init_node('talker', anonymous=True)       	 
	
	# topic I'm publising to
	pub = rospy.Publisher('/arm_controller/command', JointTrajectory, queue_size=10) 

    	message = JointTrajectory()
        message.joint_names = ['arm_1_joint', 'arm_2_joint', 'arm_3_joint', 'arm_4_joint', 'arm_5_joint', 'arm_6_joint', 'arm_7_joint']
	point = JointTrajectoryPoint()
	
	# home
        point.positions = [0.2, -1.33, -0.2, 1.68, -1.52, 1.2, 1] 
	point.time_from_start = rospy.Duration(1)
	message.points.append(point)

	point1 = JointTrajectoryPoint()
        point1.positions = [0.24, -1.42, -1.84, 1.66, -1.58, 0.08, 0] 
        point1.time_from_start = rospy.Duration(1)
	message.points.append(point1)

	rate = rospy.Rate(1)
        rate.sleep()
	
	

	pub.publish(message)

	# ready to pick up
	#point1 = JointTrajectoryPoint()
        #point1.positions = [0.24, -1.42, -1.84, 1.66, -1.58, 0.08, 0] 
        #point1.time_from_start = rospy.Duration(1)
	#message.points.append(point1)

	#rate = rospy.Rate(1)
        #rate.sleep()
	#pub.publish(message)

