예제 #1
0
def create(view=None,
           globalsDict=None,
           options=None,
           planningOnly=False,
           **kwargs):
    """
    Convenience function for initializing a robotSystem
    with the default options and populating a globals()
    dictionary with all the constructed objects.
    """

    from director import applogic

    view = view or applogic.getCurrentRenderView()

    factory = ComponentFactory()
    factory.register(RobotSystemFactory)
    options = options or factory.getDefaultOptions()

    if planningOnly:
        options = factory.getDisabledOptions()
        factory.setDependentOptions(options,
                                    usePlannerPublisher=True,
                                    useTeleop=True)

    robotSystem = factory.construct(options, view=view, **kwargs)

    if globalsDict is not None:
        globalsDict.update(dict(robotSystem))

    return robotSystem
예제 #2
0
def create(view=None, globalsDict=None, options=None, planningOnly=False):
    '''
    Convenience function for initializing a robotSystem
    with the default options and populating a globals()
    dictionary with all the constructed objects.
    '''

    from director import applogic

    view = view or applogic.getCurrentRenderView()

    factory = ComponentFactory()
    factory.register(RobotSystemFactory)
    options = options or factory.getDefaultOptions()

    if planningOnly:
        options = factory.getDisabledOptions()
        factory.setDependentOptions(options, usePlannerPublisher=True, useTeleop=True)

    robotSystem = factory.construct(options, view=view)

    if globalsDict is not None:
        globalsDict.update(dict(robotSystem))

    return robotSystem
예제 #3
0
def construct(globalsDict=None):
    fact = ComponentFactory()
    fact.register(MainWindowAppFactory)
    fact.register(MainWindowPanelFactory)
    return fact.construct(globalsDict=globalsDict)
예제 #4
0
def construct(globalsDict=None, disableAntiAlias=False):
    fact = ComponentFactory()
    fact.register(MainWindowAppFactory, disableAntiAlias)
    fact.register(MainWindowPanelFactory)
    return fact.construct(globalsDict=globalsDict)