Ejemplo n.º 1
0
def main():
    rospy.init_node('gpsr_test')

    sm = smach.StateMachine(outcomes=[succeeded, preempted, aborted])

    with sm:
        smach.StateMachine.add('UNDERSTANDING_TEST',
                            gpsrOrders(),
                            transitions={
                            succeeded: succeeded, aborted: aborted})

    sis = smach_ros.IntrospectionServer(
        'understanding_introspection', sm, '/SM_ROOT')
    sis.start()

    sm.execute()

    rospy.spin()
    sis.stop()
Ejemplo n.º 2
0
def main():
    rospy.init_node('gpsr_test_')
    # Import needs to be after init_node for some reason
    from sm_gpsr_orders import gpsrOrders
    sm = smach.StateMachine(outcomes=['succeeded', 'preempted', 'aborted'])
 
    with sm:
        smach.StateMachine.add('UNDERSTANDING_TEST',
                            gpsrOrders(),
                            transitions={
                            'succeeded': 'succeeded', 'aborted': 'aborted'})
 
    sis = smach_ros.IntrospectionServer(
        'understanding_introspection', sm, '/SM_ROOT')
    sis.start()
 
    sm.execute()
 
    rospy.spin()
    sis.stop()