Exemple #1
0
    if 'fixedBaseArm' in drcargs.getDirectorConfig()['userConfig']:
        ikPlanner.fixedBaseArm = True

if 'disableComponents' in drcargs.getDirectorConfig():
    for component in drcargs.getDirectorConfig()['disableComponents']:
        print "Disabling", component
        locals()[component] = False

if 'enableComponents' in drcargs.getDirectorConfig():
    for component in drcargs.getDirectorConfig()['enableComponents']:
        print "Enabling", component
        locals()[component] = True


if useSpreadsheet:
    spreadsheet.init(poseCollection, costCollection)


if useIk:
    def onIkStartup(ikServer, startSuccess):
        if startSuccess:
            app.getMainWindow().statusBar().showMessage('Planning server started.', 2000)
        else:
            app.showErrorMessage('Error detected while starting the matlab planning server. '
                                 'Please check the output console for more information.', title='Error starting matlab')

    ikServer.outputConsole = app.getOutputConsole()
    ikServer.infoFunc = app.displaySnoptInfo
    ikServer.connectStartupCompleted(onIkStartup)
    startIkServer()
Exemple #2
0
if 'userConfig' in drcargs.getDirectorConfig():
    if 'fixedBaseArm' in drcargs.getDirectorConfig()['userConfig']:
        ikPlanner.fixedBaseArm = True

if 'disableComponents' in drcargs.getDirectorConfig():
    for component in drcargs.getDirectorConfig()['disableComponents']:
        print "Disabling", component
        locals()[component] = False

if 'enableComponents' in drcargs.getDirectorConfig():
    for component in drcargs.getDirectorConfig()['enableComponents']:
        print "Enabling", component
        locals()[component] = True

if useSpreadsheet:
    spreadsheet.init(poseCollection, costCollection)

if useIk:

    def onIkStartup(ikServer, startSuccess):
        if startSuccess:
            app.getMainWindow().statusBar().showMessage(
                'Planning server started.', 2000)
        else:
            app.showErrorMessage(
                'Error detected while starting the matlab planning server. '
                'Please check the output console for more information.',
                title='Error starting matlab')

    ikServer.outputConsole = app.getOutputConsole()
    ikServer.infoFunc = app.displaySnoptInfo