Ejemplo n.º 1
0
        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()
    t.PostMultiply()
Ejemplo n.º 2
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)


def getBotFrame(frameName):
    t = vtk.vtkTransform()
    t.PostMultiply()
    cameraview.imageManager.queue.getTransform(frameName, 'local', t)
Ejemplo n.º 3
0
        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],
            visible=False,
            parent=model,
        )