Beispiel #1
0
def main():

    from bender_skills import robot_factory
    rospy.init_node("crowd_information")

    robot = robot_factory.build(
        [
            "facial_features",
            # "AI",
            "person_detector",
            # "knowledge",
            "tts"
        ],
        core=False)

    robot.check()
    sm = getInstance(robot, True)
    ud = smach.UserData()
    ud.features = ['gender', 'age']

    # introspection server
    sis = IntrospectionServer('crowd_information', sm, '/CROWD_SM')
    sis.start()
    outcome = sm.execute(ud)
    sis.stop()
def main():
    # robot = robot_factory.build(["tts", "ltm"], core=False)
    # robot.say("Hello, i am bender")
    # robot.tts.wait_until_done()
    robot = robot_factory.build(["ltm"], core=False)

    # TODO: Armar historia para mostrar
    review_runner("where", robot, where_review)
    review_runner("when", robot, when_review)
    review_runner("entity", robot, entity_review)
    review_runner("stream", robot, stream_review)
    review_runner("episode", robot, episode_review)
        smach.StateMachine.add('GIVE_ORDER',
                               build_give_order_sm(robot),
                               transitions={'succeeded': 'succeeded'})

        return sm


if __name__ == '__main__':

    try:
        import smach_ros
        from bender_skills import robot_factory

        rospy.init_node('ltm_demo__coffee_session')

        robot = robot_factory.build(["joy", "tts"], core=False)
        robot.check()

        # build machine
        sm = getInstance(robot)
        ltm.setup(sm)

        # smach introspection server
        sis = smach_ros.IntrospectionServer('ltm_demo__coffee_session_sis', sm,
                                            '/SM_LTM_DEMO_HUMAN_SESSION')
        sis.start()

        # execute machine
        sm.execute()

        # Wait for ctrl-c to stop the application
    ###
    ### Skills Necesarias para la Prueba
    ###

    skills_base = [  #"base",
        #"waving_deep",
        "tts",
        # "AI",
        "audition",
        # "report_generator",
        "facial_features",
        # "person_detection",
        #"knowledge",
        # "neck",
        # "sound_localization",
        "face"
    ]

    #constructor para bender
    # if os.environ['UCHILE_ROBOT']=="bender":
    # skills = skills_base+only_bender
    robot = robot_factory.build(skills_base, core=False)

    robot.check()
    sm = getInstance(robot)
    sis = smach_ros.IntrospectionServer('CROWDSESSION_SM', sm, '/CROWDSESSION')
    sis.start()
    outcome = sm.execute()
    sis.stop()
Beispiel #5
0
        smach.StateMachine.add('GO_HOME',
                               advanced.GoHomeSafe(robot, arms),
                               transitions={'succeeded': 'succeeded'},
                               remapping={
                                   'joint_goal': 'home_safe',
                                   'side': 'side'
                               })

        smach.StateMachine.add('FAILED',
                               advanced.GoMoveit(robot, arms),
                               transitions={'succeeded': 'failed'},
                               remapping={
                                   'trayectory_name': 'trayectory_name_pos',
                                   'error_code': 'error_code'
                               })

    return sm


if __name__ == "__main__":
    rospy.init_node("sm_arm")

    robot = robot_factory.build([
        'l_gripper', 'r_gripper', 'l_arm', 'r_arm', "neck",
        "object_recognition", "octomap"
    ],
                                core=False)

    sm = getInstance(robot)
    sm.execute()
        smach.StateMachine.add('MANIPULATION',
                               manipulate.getInstance(robot),
                               transitions={
                                   'succeeded': 'RESTART_IT',
                                   'aborted': 'aborted'
                               },
                               remapping={
                                   'object': 'object',
                                   'side': 'side',
                                   'selected_pregrasp': 'selected_pregrasp',
                                   'selected_grasp': 'selected_grasp',
                                   'pos_grasp': 'pos_grasp'
                               })
        smach.StateMachine.add('RESTART_IT',
                               RestartIt(),
                               transitions={'succeeded': 'succeeded'})

    return sm


if __name__ == "__main__":
    rospy.init_node("sm_arm")
    robot = robot_factory.build([
        'r_arm', 'r_gripper', 'l_arm', 'l_gripper', "neck", "tts", "audition",
        "octomap", "capability_map", "object_recognition", "marker"
    ],
                                core=False)
    sm = getInstance(robot)
    sm.execute()
Beispiel #7
0
                               transitions={
                                   'succeeded': 'succeeded',
                                   'aborted': 'aborted'
                               },
                               remapping={
                                   'posestamped': 'posestamped',
                                   'name': 'name',
                                   'limb_side': 'arm_side'
                               })

        # smach.StateMachine.add('OPEN_GRIPPER', OpenGripper(robot),
        #     transitions = {'succeeded':'CLOSE_GRIPPER'},
        #     remapping = {'lr_side':'gripper_side','effort':'effort'}
        #     )

        # smach.StateMachine.add('CLOSE_GRIPPER', GrabGripper(robot),
        #     transitions = {'succeeded':'succeeded'},
        #     remapping = {'lr_side':'gripper_side','effort':'effort'}
        #     )

    return sm


if __name__ == "__main__":
    rospy.init_node("sm_arm")

    robot = robot_factory.build(
        ['l_gripper', 'r_gripper', 'l_arm', 'r_arm', 'arm'], core=False)
    sm = getInstance(robot)
    sm.execute()