コード例 #1
0
ファイル: show_time.py プロジェクト: ethanweber/atlas-drake
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
コード例 #2
0
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
コード例 #3
0
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
コード例 #4
0
ファイル: show_frame.py プロジェクト: zapplelove/drake
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
コード例 #5
0
ファイル: show_point_cloud.py プロジェクト: thduynguyen/drake
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
コード例 #6
0
ファイル: arrow_vis.py プロジェクト: mws262/drake
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
コード例 #7
0
    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)
コード例 #8
0
    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
コード例 #10
0
    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)
コード例 #11
0
    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)
コード例 #12
0
            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)