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) return t
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) return t
app.setBackgroundColor([0.3, 0.3, 0.35], [0.95, 0.95, 1]) viewOptions = vis.ViewOptionsItem(view) om.addToObjectModel(viewOptions, parentObj=sceneRoot) viewBackgroundLightHandler = viewcolors.ViewBackgroundLightHandler( viewOptions, grid, app.getToolsMenuActions()["ActionToggleBackgroundLight"]) viewFramesHandler = viewframes.ViewFramesSizeHandler( app.getToolsMenuActions()["ActionToggleFramesSize"]) if not useLightColorScheme: viewBackgroundLightHandler.action.trigger() cameraBooksmarksPanel = camerabookmarks.init(view) cameraControlPanel = cameracontrolpanel.CameraControlPanel(view) app.addWidgetToDock(cameraControlPanel.widget, action=None).hide() app.setCameraTerrainModeEnabled(view, True) app.resetCamera(viewDirection=[-1, 0, 0], view=view) for robotSystem in robotSystems: selector.addRobot(robotSystem.robotName) selector.associateViewBehaviorWithRobot(robotSystem.viewBehaviors, robotSystem.robotName) directorConfig = drcargs.getRobotConfig(robotSystem.robotName) usePerception = True useDataFiles = True