test_move_lin.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 #
00003 # Copyright 2017 Fraunhofer Institute for Manufacturing Engineering and Automation (IPA)
00004 #
00005 # Licensed under the Apache License, Version 2.0 (the "License");
00006 # you may not use this file except in compliance with the License.
00007 # You may obtain a copy of the License at
00008 #
00009 #   http://www.apache.org/licenses/LICENSE-2.0
00010 #
00011 # Unless required by applicable law or agreed to in writing, software
00012 # distributed under the License is distributed on an "AS IS" BASIS,
00013 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014 # See the License for the specific language governing permissions and
00015 # limitations under the License.
00016 
00017 
00018 import rospy
00019 import actionlib
00020 
00021 from cob_cartesian_controller.msg import CartesianControllerAction, CartesianControllerGoal
00022 from cob_cartesian_controller.msg import Profile
00023 
00024 if __name__ == '__main__':
00025     rospy.init_node('test_move_lin')
00026     action_name = rospy.get_namespace()+'cartesian_trajectory_action'
00027     client = actionlib.SimpleActionClient(action_name, CartesianControllerAction)
00028     rospy.logwarn("Waiting for ActionServer: %s", action_name)
00029     client.wait_for_server()
00030     rospy.logwarn("...done")
00031 
00032     # Fill in the goal here
00033     goal = CartesianControllerGoal()
00034 
00035     goal.move_type = CartesianControllerGoal.LIN
00036     goal.move_lin.pose_goal.position.x = -0.9
00037     goal.move_lin.pose_goal.position.y = 0.0
00038     goal.move_lin.pose_goal.position.z = 0.0
00039     goal.move_lin.pose_goal.orientation.x = 0.0
00040     goal.move_lin.pose_goal.orientation.y = 0.0
00041     goal.move_lin.pose_goal.orientation.z = 0.0
00042     goal.move_lin.pose_goal.orientation.w = 1.0
00043     goal.move_lin.frame_id = 'world'
00044 
00045     goal.profile.vel = 0.2
00046     goal.profile.accl = 0.1
00047     goal.profile.profile_type = Profile.SINOID
00048 
00049     #print goal
00050 
00051     # Send the goal
00052     client.send_goal(goal)
00053     client.wait_for_result()


cob_cartesian_controller
Author(s): Christoph Mark
autogenerated on Thu Jun 6 2019 21:19:40