OpenRAVE Documentation

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)[source]

Bases: PyQt4.QtCore.QThread

run()[source]
class openravepy.examples.qtexampleselector.Example(mod, args)[source]

Bases: threading.Thread

run()[source]
class openravepy.examples.qtexampleselector.MainWindow(pipeOR, pipeServer)[source]

Bases: PyQt4.QtGui.QMainWindow, openravepy.examples.qtexampleselector.Ui_MainWindow

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

Bases: 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)[source]
executeFunction(name, args)[source]
class openravepy.examples.qtexampleselector.Server[source]

Bases: object

Control server to run the benchmark in its own process.

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

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

Bases: object

retranslateUi(MainWindow)[source]
setupUi(MainWindow)[source]
openravepy.examples.qtexampleselector.main(env, options)[source]

Main example code.

openravepy.examples.qtexampleselector.run(args=None)[source]

Command-line execution of the example.

Parameters:args – arguments for script to parse, if not specified will use sys.argv

Questions/Feedback

Having problems with OpenRAVE?