reactive_planning_example.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 import roslib; roslib.load_manifest('cob_moveit_interface')
00003 import rospy
00004 
00005 import simple_moveit_interface as smi
00006 
00007 #Requirements:
00008 #- latest cob_bringup layer with lookat_component
00009 #- sensor input for moveit enabled?
00010 #- robot facing a wall in the background
00011 #- lookat_action server and monitor started?
00012 #- lookat works for both arm positions?
00013 #
00014 #- These positions currently are cob3-3 specific
00015 
00016 
00017 if __name__ == '__main__':
00018         rospy.init_node('move_example')
00019         
00020         smi.add_ground()
00021         rospy.sleep(1.0)
00022 
00023         #while rospy.get_time() == 0.0: pass
00024         rospy.logerr('Are you using cob3-3? Did you make sure all requirements are met? Read the code file!') 
00025         ans = raw_input('[y/n] ')
00026         if ans == 'y':
00027                 while not rospy.is_shutdown():
00028                         print "Going Left"
00029                         success = smi.moveit_joint_goal("arm", [0.6132456177400849, -1.2667904686872227, -1.3351177346743512, 0.623757247043325, 2.6443916288424734, 0.2923237627622837, -2.121120037112681], True)
00030                         #success = smi.moveit_joint_goal("arm", [0.4474927123777702, -1.4042363503909014, -1.3427710033793065, 0.8556133802524375, 2.8670612914249532, 0.2447635934094972, -1.8559613290891581], True)
00031                         print "Going Right"
00032                         success = smi.moveit_joint_goal("arm", [-0.4429381361070571, -2.027464518329273, 0.5376498408783335, -0.07512923290336566, -0.5249117648804152, 0.4386535797226253, -0.7085319372561121], True)
00033                         #success = smi.moveit_joint_goal("arm", [-0.2875421191578158, -1.8672004116184473, 0.5368099709961187, -0.07435202034076506, -0.523647727633693, 0.43781158053874125, -0.709280142446791], True)
00034         elif ans == 'n':
00035                 rospy.logerr('Please activate it!')
00036         
00037 


cob_moveit_interface
Author(s): Felix Messmer
autogenerated on Wed Aug 26 2015 11:01:06