openrave.org

目次

Questions? Suggestions?

Join the openrave-users mailing list

Digest:

Trac: Report bugs/request features

Reference

Core C++ API

Python API

Developers Guide

このページ

qtexampleselector Module

Control and run the openrave python examples with a pyqt gui.

../_images/qtexampleselector.jpg

Running the Example:

openrave.py --example qtexampleselector

Description

This example shows how to run a qt-gui in python and control an openrave python script including viewer and terminal input. Therefore the openravepy.examples dictionary is used to provide all available openravepy examples to the qt-gui. To abort an example just restart the OpenRaveServer. If you want to start an example with some arguments just insert them in the “Arguments for Example” box with space seperation.

../_images/qtexampleselector1.jpg

Command-line

Usage: openrave.py --example qtexampleselector [options]

Control and run the openrave python examples with a pyqt gui.

Options:
  -h, --help  show this help message and exit

Main Python Code

def main(env,options):
    "Main example code."
    global logger
    lhandler =logging.StreamHandler(sys.stdout)
    lhandler.setFormatter(logging.Formatter("%(levelname)-10s:: %(filename)-20s - %(lineno)4d :: %(message)s"))
    logger.setLevel(logging.INFO)
    logger.addHandler(lhandler)
    signal.signal(signal.SIGINT, signal.SIG_DFL)
    server = Server()

Class Definitions

class openravepy.examples.qtexampleselector.CallbackHandler(pipe, callback=None)[ソース]

ベースクラス: PyQt4.QtCore.QThread

run()[ソース]
class openravepy.examples.qtexampleselector.Example(mod, args)[ソース]

ベースクラス: threading.Thread

run()[ソース]
class openravepy.examples.qtexampleselector.MainWindow(pipeOR, pipeServer)[ソース]

ベースクラス: PyQt4.QtGui.QMainWindow, openravepy.examples.qtexampleselector.Ui_MainWindow

ButtonsLock()[ソース]
ButtonsUnlock()[ソース]
CallbackOR(args)[ソース]
HandleCallback(msg)[ソース]
SendToOR(command, args=None)[ソース]
SendToServer(command, args=None, callback=None)[ソース]
close()[ソース]
closeEvent(event)[ソース]
on_pbClose_clicked()[ソース]
on_pbOR_clicked()[ソース]
on_pbRun_clicked()[ソース]
class openravepy.examples.qtexampleselector.OpenRaveServer(pipe)[ソース]

ベースクラス: object

Control server to run the benchmark in its own process.

Setup the shared memory data structure model and initialize the control parts.

LoadExample(fileName, args)[ソース]
executeFunction(name, args)[ソース]
class openravepy.examples.qtexampleselector.Server[ソース]

ベースクラス: object

Control server to run the benchmark in its own process.

Setup the shared memory data structure model and initialize the control parts.

StartOpenRaveGuiServer()[ソース]
StartQtGuiControl()[ソース]
executeFunction(name, args)[ソース]
class openravepy.examples.qtexampleselector.Ui_MainWindow[ソース]

ベースクラス: object

retranslateUi(MainWindow)[ソース]
setupUi(MainWindow)[ソース]
openravepy.examples.qtexampleselector.main(env, options)[ソース]

Main example code.

openravepy.examples.qtexampleselector.run(args=None)[ソース]

Command-line execution of the example.

パラメタ:args – arguments for script to parse, if not specified will use sys.argv