@@ -0,0 +1,1583 @@
+#!/usr/bin/env python%0Afrom __future__ import print_function%0Afrom flexbe_core import EventState, Logger%0Afrom geometry_msgs.msg import Pose%0Afrom sara_moveit.srv import get_pose%0Aimport rospy%0A%0A%0Aclass GetArmPose(EventState):%0A    '''%0A    GetArmPose return the pose of the arm%0A%0A    %3C# pose     Pose      Target waypoint for navigation.%0A%0A    %3C= done     Finish job.%0A    '''%0A%0A    def __init__(self):%0A        # See example_state.py for basic explanations.%0A        super(GetArmPose, self).__init__(outcomes=%5B'done'%5D, output_keys=%5B'pose'%5D)%0A%0A    def execute(self, userdata):%0A        # This method is called periodically while the state is active.%0A        # Main purpose is to check state conditions and trigger a corresponding outcome.%0A        # If no outcome is returned, the state will stay active.%0A        Logger.loginfo('Waiting for get_pose')%0A        rospy.wait_for_service('get_pose')%0A        Logger.loginfo('Rospy wait')%0A%0A        try:%0A            get_pose = rospy.ServiceProxy('get_pose', get_pose)%0A            resp = get_pose(move_group=%22RightArm%22, pose=userdata.pose)%0A            Logger.loginfo('service called')%0A            userdata.pose = resp.pose%0A        except rospy.ServiceException as e:%0A            print(%22Service call failed: %25s%22 %25 e)%0A%0A%0A        return 'done'  # One of the outcomes declared above.%0A%0A    def on_enter(self, userdata):%0A        # This method is called when the state becomes active, a transition from another state to this one is taken.%0A        # It is primarily used to start actions which are associated with this state.%0A%0A        Logger.loginfo('Enter Move Arm')%0A

ajoute la state pour get arm pose