コード例 #1
0
def main():
    global app, view, nav_data

    nav_data = np.array([[0, 0, 0]])

    lcmUtils.addSubscriber(".*_NAV$", node_nav_t, handleNavData)

    app = ConsoleApp()

    app.setupGlobals(globals())
    app.showPythonConsole()

    view = app.createView()
    view.show()

    global d
    d = DebugData()
    d.addLine([0, 0, 0], [1, 0, 0], color=[0, 1, 0])
    d.addSphere((0, 0, 0), radius=0.02, color=[1, 0, 0])

    #vis.showPolyData(d.getPolyData(), 'my debug geometry', colorByName='RGB255')

    startSwarmVisualization()

    app.start()
コード例 #2
0
def main():
    global app, view, nav_data

    nav_data = np.array([[0, 0, 0]])

    lcmUtils.addSubscriber(".*_NAV$", node_nav_t, handleNavData)

    app = ConsoleApp()

    app.setupGlobals(globals())
    app.showPythonConsole()

    view = app.createView()
    view.show()

    global d
    d = DebugData()
    d.addLine([0,0,0], [1,0,0], color=[0,1,0])
    d.addSphere((0,0,0), radius=0.02, color=[1,0,0])

    #vis.showPolyData(d.getPolyData(), 'my debug geometry', colorByName='RGB255')

    startSwarmVisualization()

    app.start()
コード例 #3
0
ファイル: yawLock.py プロジェクト: wxmerkt/director
        position, quat = transformUtils.poseFromTransform(pelvisToWorld)

        msg = lcmbot.pose_t()
        msg.utime = robotStateJointController.lastRobotStateMessage.utime
        msg.pos = [0.0, 0.0, 0.0]
        msg.orientation = quat.tolist()

        lcmUtils.publish(channel, msg)

    def enable(self):
        self.capture()
        self.timer.start()

    def disable(self):
        self.timer.stop()
        self.clear()


#---------------------------------------

app = ConsoleApp()
app.setupGlobals(globals())
app.showPythonConsole()
view = app.createView()
view.show()
robotsystem.create(view, globals())

estimator = FootLockEstimator()

app.start()
コード例 #4
0
ファイル: testLCMSpy.py プロジェクト: mlab-upenn/arch-apex
from ddapp.consoleapp import ConsoleApp
from ddapp import lcmspy
from ddapp import lcmUtils
from ddapp import simpletimer as st

app = ConsoleApp()

app.setupGlobals(globals())

if app.getTestingInteractiveEnabled():
    app.showPythonConsole()


lcmspy.findLCMModulesInSysPath()

timer = st.SimpleTimer()
stats = {}

channelToMsg = {}
items = {}

def item(r, c):
    rowDict = items.setdefault(r, {})
    try:
        return rowDict[c]

    except KeyError:
        i = QtGui.QTableWidgetItem('')
        table.setItem(r, c, i)
        rowDict[c] = i
        return i