simple_trajectory.py
Go to the documentation of this file.
00001 #! /usr/bin/env python
00002 
00003 import roslib; roslib.load_manifest('irp6_launch')
00004 import rospy
00005 import actionlib
00006 
00007 from trajectory_msgs.msg import *
00008 from control_msgs.msg import *
00009 
00010 if __name__ == '__main__':
00011   rospy.init_node('simple_trajectory')
00012   client = actionlib.SimpleActionClient('arm_controller/joint_trajectory_action', FollowJointTrajectoryAction)
00013   client.wait_for_server()
00014   print 'server ok'
00015   goal = FollowJointTrajectoryGoal()
00016   goal.trajectory.joint_names = ['lwr_arm_0_joint', 'lwr_arm_1_joint', 'lwr_arm_2_joint', 'lwr_arm_3_joint', 'lwr_arm_4_joint', 'lwr_arm_5_joint', 'lwr_arm_6_joint']
00017   goal.trajectory.points.append(JointTrajectoryPoint([1.825164385348162, 1.803825933603007, 0.000000000000000, 2.008362700195485, 1.321511416992363, -1.519663789792947, -1.768925223209182], [0, 0, 0, 0, 0, 0, 0], [], rospy.Duration(5.0)))
00018   goal.trajectory.points.append(JointTrajectoryPoint([0.0, 1.803825933603007, 0.000000000000000, 2.008362700195485, 0.0, -1.519663789792947, -1.768925223209182], [0, 0, 0, 0, 0, 0, 0], [], rospy.Duration(10.0)))
00019   goal.trajectory.points.append(JointTrajectoryPoint([1.825164385348162, 1.203825933603007, 0.000000000000000, 2.008362700195485, 1.321511416992363, -1.519663789792947, -1.768925223209182], [0, 0, 0, 0, 0, 0, 0], [], rospy.Duration(15.0)))
00020 
00021   goal.trajectory.header.stamp = rospy.get_rostime() + rospy.Duration(0.1)
00022 
00023   client.send_goal(goal)
00024 
00025   client.wait_for_result()
00026 


lwr_bringup
Author(s): Konrad Banachowicz
autogenerated on Mon Oct 6 2014 02:02:07