def init_visualizer(): time_viz = TimeVisualizer() # Adds to the "Tools" menu. applogic.MenuActionToggleHelper('Tools', time_viz._name, time_viz.is_enabled, time_viz.set_enabled) return time_viz
def init_visualizer(): # Create a visualizer instance. my_visualizer = HydroelasticContactVisualizer() # Adds to the 'Tools' menu. applogic.MenuActionToggleHelper('Tools', my_visualizer._name, my_visualizer.is_enabled, my_visualizer.set_enabled) return my_visualizer
def init_visualizer(): viz = InputSupervisorVisualizer() # vis.addText('supervisor_text') # Adds to the "Tools" menu. applogic.MenuActionToggleHelper('Tools', viz._name, viz.is_enabled, viz.set_enabled) return viz
def init_visualizer(): frame_viz = FramesVisualizer() # Adds to the "Tools" menu. applogic.MenuActionToggleHelper('Tools', frame_viz._name, frame_viz.is_enabled, frame_viz.set_enabled) return frame_viz
def init_visualizer(): point_cloud_viz = PointCloudsVisualizer() # Adds to the "Tools" menu. applogic.MenuActionToggleHelper('Tools', point_cloud_viz._name, point_cloud_viz.is_enabled, point_cloud_viz.set_enabled) return point_cloud_viz
def init_visualizer(): # Create a visualizer instance. my_visualizer = ArrowVisualizer() # Adds to the "Tools" menu. applogic.MenuActionToggleHelper('Tools', my_visualizer._name, my_visualizer.is_enabled, my_visualizer.set_enabled) return my_visualizer
def initTreeViewer(self, fields): from director import treeviewer treeViewer = treeviewer.TreeViewer(fields.view) applogic.MenuActionToggleHelper('Tools', treeViewer.name, treeViewer.isEnabled, treeViewer.setEnabled) return FieldContainer(treeViewer=treeViewer)
def initDrakeVisualizer(self, fields): from director import drakevisualizer drakeVisualizer = drakevisualizer.DrakeVisualizer(fields.view) applogic.MenuActionToggleHelper('Tools', drakeVisualizer.name, drakeVisualizer.isEnabled, drakeVisualizer.setEnabled) return FieldContainer(drakeVisualizer=drakeVisualizer)
def init_visualizer(): # Create a visualizer instance. my_visualizer = ExperimentalDeformableMeshVisualizer() # Adds to the "Tools" menu. applogic.MenuActionToggleHelper( "Tools", my_visualizer._name, my_visualizer.is_enabled, my_visualizer.set_enabled, ) return my_visualizer
def initLCMGLRenderer(self, fields): from director import lcmgl if lcmgl.LCMGL_AVAILABLE: lcmglManager = lcmgl.LCMGLManager(fields.view) applogic.MenuActionToggleHelper('Tools', 'LCMGL Renderer', lcmglManager.isEnabled, lcmglManager.setEnabled) else: lcmglManager = None return FieldContainer(lcmglManager=lcmglManager)
handcontrolpanel.init(lHandDriver, rHandDriver, robotStateModel, robotStateJointController, view) else: app.removeToolbarMacro('ActionHandControlPanel') if useFootsteps: footstepsPanel = footstepsdriverpanel.init(footstepsDriver, robotStateModel, robotStateJointController, irisDriver) else: app.removeToolbarMacro('ActionFootstepPanel') if useLCMGL: lcmglManager = lcmgl.init(view) app.MenuActionToggleHelper('Tools', 'Renderer - LCM GL', lcmglManager.isEnabled, lcmglManager.setEnabled) if useOctomap: octomapManager = lcmoctomap.init(view) app.MenuActionToggleHelper('Tools', 'Renderer - Octomap', octomapManager.isEnabled, octomapManager.setEnabled) if useCollections: collectionsManager = lcmcollections.init(view) app.MenuActionToggleHelper('Tools', 'Renderer - Collections', collectionsManager.isEnabled, collectionsManager.setEnabled) if useDrakeVisualizer: drakeVisualizer = drakevisualizer.DrakeVisualizer(view)
x,y,z,w = body.quat quat = (w,x,y,z) bodyToOptitrack = transformUtils.transformFromPose(body.xyz, quat) bodyToWorld = transformUtils.concatenateTransforms((bodyToOptitrack, self.optitrackToWorld)) obj = folder.findChild(name) if not obj: geometry = self._makeMarkers(body.marker_xyz) geometry = filterUtils.transformPolyData(geometry, bodyToOptitrack.GetLinearInverse()) obj = vis.showPolyData(geometry, name, parent=folder, color=[1,0,0]) frameObj = vis.addChildFrame(obj) frameObj.setProperty('Scale', 0.2) frameObj.setProperty('Visible', True) obj.getChildFrame().copyFrame(bodyToWorld) def onMessage(self, msg): self.fpsCounter.tick() self.lastMessage = msg self._handleRigidBodies(msg.rigid_bodies) if __name__ == '__main__': from director import applogic optitrackVis = OptitrackVisualizer() optitrackVis.setEnabled(True) applogic.MenuActionToggleHelper('Tools', optitrackVis.name, optitrackVis.isEnabled, optitrackVis.setEnabled)