コード例 #1
0
    def toggle(self):
        if self.action.checked:
            self.manager.show()
        else:
            self.manager.hide()


imageOverlayManager = ImageOverlayManager()
imageWidget = cameraview.ImageWidget(cameraview.imageManager,
                                     'CAMERA_LEFT',
                                     view,
                                     visible=False)
imageViewHandler = ToggleImageViewHandler(imageWidget)
setImageWidgetSource = imageWidget.setImageName

screengrabberpanel.init(view)
framevisualization.init(view)
affordancePanel = affordancepanel.init(view, affordanceManager,
                                       robotStateJointController,
                                       raycastDriver)
camerabookmarks.init(view)

cameraControlPanel = cameracontrolpanel.CameraControlPanel(view)
app.addWidgetToDock(cameraControlPanel.widget, action=None).hide()


def getLinkFrame(linkName, model=None):
    model = model or robotStateModel
    return model.getLinkFrame(linkName)

コード例 #2
0
ファイル: startup.py プロジェクト: openhumanoids/director
        self.action.connect('triggered()', self.toggle)
        self.manager = manager

    def toggle(self):
        if self.action.checked:
            self.manager.show()
        else:
            self.manager.hide()


imageOverlayManager = ImageOverlayManager()
imageWidget = cameraview.ImageWidget(cameraview.imageManager, 'CAMERA_LEFT', view, visible=False)
imageViewHandler = ToggleImageViewHandler(imageWidget)
setImageWidgetSource = imageWidget.setImageName

screengrabberpanel.init(view)
framevisualization.init(view)
affordancePanel = affordancepanel.init(view, affordanceManager, robotStateJointController, raycastDriver)
camerabookmarks.init(view)

cameraControlPanel = cameracontrolpanel.CameraControlPanel(view)
app.addWidgetToDock(cameraControlPanel.widget, action=None).hide()


def getLinkFrame(linkName, model=None):
    model = model or robotStateModel
    return model.getLinkFrame(linkName)


def getBotFrame(frameName):
    t = vtk.vtkTransform()
コード例 #3
0
    cameras = [
        camera["name"]
        for camera in directorConfig["sensors"]["camera"]["color"]
    ]
    imageOverlayManager = ImageOverlayManager(cameras, robotSystem.robotName)
    imageWidget = cameraview.ImageWidget(
        cameraview.imageManager,
        cameras,
        view,
        visible=False,
        robotName=robotSystem.robotName,
    )
    imageViewHandler = ToggleImageViewHandler(imageWidget)

    screengrabberpanel.init(view, imageWidget, robotSystem.robotName)
    framevisualization.init(view, robotSystem)
    affordancePanel = affordancepanel.init(
        view, robotSystem.affordanceManager,
        robotSystem.robotStateJointController)

    def drawCenterOfMass(model):
        stanceFrame = robotSystem.footstepsDriver.getFeetMidPoint(model)
        com = list(model.model.getCenterOfMass())
        com[2] = stanceFrame.GetPosition()[2]
        d = DebugData()
        d.addSphere(com, radius=0.015)
        obj = vis.updatePolyData(
            d.getPolyData(),
            "COM %s" % model.getProperty("Name"),
            color=[1, 0, 0],