Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 import math
00019 import rospy
00020 import actionlib
00021
00022 from cob_cartesian_controller.msg import CartesianControllerAction, CartesianControllerGoal
00023 from cob_cartesian_controller.msg import Profile
00024
00025 if __name__ == '__main__':
00026 rospy.init_node('test_move_circ')
00027 action_name = rospy.get_namespace()+'cartesian_trajectory_action'
00028 client = actionlib.SimpleActionClient(action_name, CartesianControllerAction)
00029 rospy.logwarn("Waiting for ActionServer: %s", action_name)
00030 client.wait_for_server()
00031 rospy.logwarn("...done")
00032
00033
00034 goal = CartesianControllerGoal()
00035
00036 goal.move_type = CartesianControllerGoal.CIRC
00037 goal.move_circ.pose_center.position.x = 0.0
00038 goal.move_circ.pose_center.position.y = 0.7
00039 goal.move_circ.pose_center.position.z = 1.0
00040 goal.move_circ.pose_center.orientation.x = 0.0
00041 goal.move_circ.pose_center.orientation.y = 0.0
00042 goal.move_circ.pose_center.orientation.z = 0.0
00043 goal.move_circ.pose_center.orientation.w = 1.0
00044 goal.move_circ.frame_id = 'world'
00045
00046 goal.move_circ.start_angle = 0 * math.pi / 180.0
00047 goal.move_circ.end_angle = 90 * math.pi / 180.0
00048 goal.move_circ.radius = 0.3
00049
00050 goal.profile.vel = 0.1
00051 goal.profile.accl = 0.2
00052 goal.profile.profile_type = Profile.SINOID
00053
00054
00055
00056
00057 client.send_goal(goal)
00058 client.wait_for_result()