Пример #1
0
    def __init__(
        self,
        parent,
        id=wx.ID_ANY,
        title="Standalone Visualizer",
        pos=wx.DefaultPosition,
        size=(800, 600),
        style=wx.DEFAULT_FRAME_STYLE,
    ):
        wx.Frame.__init__(self, parent, id, title, pos, size, style)

        ogre_tools.initializeOgre()
        visualizer_panel = ogre_visualizer.VisualizationPanel(self)

        self._package_path = rostools.packspec.get_pkg_dir("ogre_visualizer")
        self._global_config_path = os.path.join(self._package_path, "configs")

        self._visualizer_panel = visualizer_panel

        media_path = rostools.packspec.get_pkg_dir("gazebo_robot_description")
        media_path += "/world/Media/"

        media_paths = [media_path]
        media_paths.append(media_path)
        media_paths.append(media_path + "fonts")
        media_paths.append(media_path + "materials")
        media_paths.append(media_path + "materials/scripts")
        media_paths.append(media_path + "materials/programs")
        media_paths.append(media_path + "materials/textures")
        media_paths.append(media_path + "models")
        media_paths.append(media_path + "models/pr2_new")

        ogre_tools.initializeResources(media_paths)

        self.init_config()
        self.init_menu()

        manager = visualizer_panel.getManager()

        # Load our window options
        (x, y) = self.GetPositionTuple()
        (width, height) = self.GetSizeTuple()
        if self._config.HasEntry(self._CONFIG_WINDOW_X):
            x = self._config.ReadInt(self._CONFIG_WINDOW_X)
        if self._config.HasEntry(self._CONFIG_WINDOW_Y):
            y = self._config.ReadInt(self._CONFIG_WINDOW_Y)
        if self._config.HasEntry(self._CONFIG_WINDOW_WIDTH):
            width = self._config.ReadInt(self._CONFIG_WINDOW_WIDTH)
        if self._config.HasEntry(self._CONFIG_WINDOW_HEIGHT):
            height = self._config.ReadInt(self._CONFIG_WINDOW_HEIGHT)

        self.SetPosition((x, y))
        self.SetSize((width, height))

        manager.loadConfig(self._config)

        self.Bind(wx.EVT_CLOSE, self.on_close)
Пример #2
0
    def __init__(self,
                 parent,
                 id=wx.ID_ANY,
                 title='Standalone Visualizer',
                 pos=wx.DefaultPosition,
                 size=(800, 600),
                 style=wx.DEFAULT_FRAME_STYLE):
        wx.Frame.__init__(self, parent, id, title, pos, size, style)

        ogre_tools.initializeOgre()
        visualizer_panel = ogre_visualizer.VisualizationPanel(self)

        self._package_path = rostools.packspec.get_pkg_dir('ogre_visualizer')
        self._global_config_path = os.path.join(self._package_path, "configs")

        self._visualizer_panel = visualizer_panel

        media_path = rostools.packspec.get_pkg_dir("gazebo_robot_description")
        media_path += "/world/Media/"

        media_paths = [media_path]
        media_paths.append(media_path)
        media_paths.append(media_path + "fonts")
        media_paths.append(media_path + "materials")
        media_paths.append(media_path + "materials/scripts")
        media_paths.append(media_path + "materials/programs")
        media_paths.append(media_path + "materials/textures")
        media_paths.append(media_path + "models")
        media_paths.append(media_path + "models/pr2")

        ogre_tools.initializeResources(media_paths)

        self.init_config()
        self.init_menu()

        manager = visualizer_panel.getManager()

        # Load our window options
        (x, y) = self.GetPositionTuple()
        (width, height) = self.GetSizeTuple()
        if (self._config.HasEntry(self._CONFIG_WINDOW_X)):
            x = self._config.ReadInt(self._CONFIG_WINDOW_X)
        if (self._config.HasEntry(self._CONFIG_WINDOW_Y)):
            y = self._config.ReadInt(self._CONFIG_WINDOW_Y)
        if (self._config.HasEntry(self._CONFIG_WINDOW_WIDTH)):
            width = self._config.ReadInt(self._CONFIG_WINDOW_WIDTH)
        if (self._config.HasEntry(self._CONFIG_WINDOW_HEIGHT)):
            height = self._config.ReadInt(self._CONFIG_WINDOW_HEIGHT)

        self.SetPosition((x, y))
        self.SetSize((width, height))

        manager.loadConfig(self._config)

        self.Bind(wx.EVT_CLOSE, self.on_close)
Пример #3
0
    def __init__(self,
                 parent,
                 id=wx.ID_ANY,
                 title='Standalone Visualizer',
                 pos=wx.DefaultPosition,
                 size=(800, 600),
                 style=wx.DEFAULT_FRAME_STYLE):
        wx.Frame.__init__(self, parent, id, title, pos, size, style)

        ogre_tools.initializeOgre()

        visualizer_panel = rviz.VisualizationPanel(self)

        self._visualizer_panel = visualizer_panel
        manager = visualizer_panel.getManager()

        self.Bind(wx.EVT_CLOSE, self.on_close)

        main_sizer = wx.BoxSizer(wx.VERTICAL)

        top_sizer = wx.BoxSizer(wx.VERTICAL)
        main_sizer.Add(top_sizer, 1, wx.EXPAND, 5)

        bottom_sizer = wx.BoxSizer(wx.HORIZONTAL)
        main_sizer.Add(bottom_sizer, 0, wx.ALIGN_RIGHT | wx.EXPAND, 5)

        top_sizer.Add(visualizer_panel, 1, wx.EXPAND, 5)

        self._instructions_ctrl = wx.TextCtrl(self, wx.ID_ANY, wx.EmptyString,
                                              wx.DefaultPosition,
                                              wx.DefaultSize,
                                              wx.TE_MULTILINE | wx.TE_READONLY)
        self._pass_button = wx.Button(self, wx.ID_ANY, "Pass")
        self._fail_button = wx.Button(self, wx.ID_ANY, "Fail")
        bottom_sizer.Add(self._instructions_ctrl, 1, wx.ALL, 5)
        bottom_sizer.Add(self._pass_button, 0, wx.ALL | wx.ALIGN_BOTTOM, 5)
        bottom_sizer.Add(self._fail_button, 0, wx.ALL | wx.ALIGN_BOTTOM, 5)

        self.SetSizer(main_sizer)
        self.Layout()

        self._pass_button.Bind(wx.EVT_BUTTON, self.on_pass)
        self._fail_button.Bind(wx.EVT_BUTTON, self.on_fail)
 def __init__(self, parent, id=wx.ID_ANY, title='Qualification Visualizer', pos=wx.DefaultPosition, size=(800, 600), style=wx.DEFAULT_FRAME_STYLE):
   wx.Frame.__init__(self, parent, id, title, pos, size, style)
   
   ogre_tools.initializeOgre()
   
   visualizer_panel = rviz.VisualizationPanel(self)
   
   self._visualizer_panel = visualizer_panel
   manager = visualizer_panel.getManager()
   
   self.Bind(wx.EVT_CLOSE, self.on_close)
   
   main_sizer = wx.BoxSizer(wx.VERTICAL)
   
   top_sizer = wx.BoxSizer(wx.VERTICAL)
   main_sizer.Add(top_sizer, 1, wx.EXPAND, 5)
   
   bottom_sizer = wx.BoxSizer(wx.HORIZONTAL)
   main_sizer.Add(bottom_sizer, 0, wx.ALIGN_RIGHT|wx.EXPAND, 5)
   
   top_sizer.Add(visualizer_panel, 1, wx.EXPAND, 5)
   
   self._instructions_ctrl = wx.TextCtrl(self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.TE_MULTILINE|wx.TE_READONLY );
   self._pass_button = wx.Button(self, wx.ID_ANY, "Pass")
   self._fail_button = wx.Button(self, wx.ID_ANY, "Fail")
   bottom_sizer.Add(self._instructions_ctrl, 1, wx.ALL, 5)
   bottom_sizer.Add(self._pass_button, 0, wx.ALL|wx.ALIGN_BOTTOM, 5)
   bottom_sizer.Add(self._fail_button, 0, wx.ALL|wx.ALIGN_BOTTOM, 5)
   
   self.SetSizer(main_sizer)
   self.Layout()
   
   self._pass_button.Bind(wx.EVT_BUTTON, self.on_pass)
   self._fail_button.Bind(wx.EVT_BUTTON, self.on_fail)
   
   self._shutdown_timer = wx.Timer()
   self._shutdown_timer.Bind(wx.EVT_TIMER, self._on_shutdown_timer)
   self._shutdown_timer.Start(100)
Пример #5
0
    def __init__(self, parent, id=wx.ID_ANY, title='Standalone Visualizer', pos=wx.DefaultPosition, size=(800, 600), style=wx.DEFAULT_FRAME_STYLE):
        wx.Frame.__init__(self, parent, id, title, pos, size, style)
        
        self._config = wx.Config("standalone_visualizer")

        ogre_tools.initializeOgre()
        
        visualizer_panel = ogre_visualizer.VisualizationPanel(self)
        
        self._visualizer_panel = visualizer_panel
        
        media_path = rostools.packspec.get_pkg_dir( "gazebo_robot_description" )
        media_path += "/world/Media/";
        
        media_paths = [media_path]
        media_paths.append( media_path )
        media_paths.append( media_path + "fonts" )
        media_paths.append( media_path + "materials" )
        media_paths.append( media_path + "materials/scripts" )
        media_paths.append( media_path + "materials/programs" )
        media_paths.append( media_path + "materials/textures" )
        media_paths.append( media_path + "models" )
        media_paths.append( media_path + "models/pr2_new" )
        
        ogre_tools.initializeResources( media_paths )
        
        visualizer_panel.createGridVisualizer( "Grid", True )
        visualizer_panel.createAxesVisualizer( "Origin Axes", False )
        visualizer_panel.createMarkerVisualizer( "Visualization Markers", True )
        
        robot_vis = visualizer_panel.createRobotModelVisualizer( "Robot Model", False )
        robot_vis.setRobotDescription( "robotdesc/pr2" )
        
        planning = visualizer_panel.createPlanningVisualizer( "Planning", False )
        planning.initialize( "robotdesc/pr2", "display_kinematic_path" )
        
        point_cloud = visualizer_panel.createPointCloudVisualizer( "Stereo Full Cloud", True )
        point_cloud.setTopic( "videre/cloud" )
        point_cloud.setColor( 1.0, 1.0, 1.0 )
        
        point_cloud = visualizer_panel.createPointCloudVisualizer( "Head Full Cloud", True )
        point_cloud.setTopic( "full_cloud" )
        point_cloud.setColor( 1.0, 1.0, 0.0 )
        
        point_cloud = visualizer_panel.createPointCloudVisualizer( "World 3D Map", True )
        point_cloud.setTopic( "world_3d_map" )
        point_cloud.setColor( 1.0, 0.0, 0.0 )
        point_cloud.setBillboardSize( 0.01 )
        
        laser_scan = visualizer_panel.createLaserScanVisualizer( "Head Scan", True )
        laser_scan.setScanTopic( "tilt_scan" )
        laser_scan.setColor( 1.0, 0.0, 0.0 )
        laser_scan.setDecayTime( 30.0 )
        
        laser_scan = visualizer_panel.createLaserScanVisualizer( "Floor Scan", True )
        laser_scan.setScanTopic( "base_scan" )
        laser_scan.setColor( 0.0, 1.0, 0.0 )
        laser_scan.setDecayTime( 0.0 )
        
        visualizer_panel.createOctreeVisualizer( "Octree", True ).setOctreeTopic( "full_octree" )
        
        # Load our window options
        (x, y) = self.GetPositionTuple()
        (width, height) = self.GetSizeTuple()
        if (self._config.HasEntry(self._CONFIG_WINDOW_X)):
            x = self._config.ReadInt(self._CONFIG_WINDOW_X)
        if (self._config.HasEntry(self._CONFIG_WINDOW_Y)):
            y = self._config.ReadInt(self._CONFIG_WINDOW_Y)
        if (self._config.HasEntry(self._CONFIG_WINDOW_WIDTH)):
            width = self._config.ReadInt(self._CONFIG_WINDOW_WIDTH)
        if (self._config.HasEntry(self._CONFIG_WINDOW_HEIGHT)):
            height = self._config.ReadInt(self._CONFIG_WINDOW_HEIGHT)
            
        self.SetPosition((x, y))
        self.SetSize((width, height))
        
        visualizer_panel.loadConfig(self._config)
        
        self.Bind(wx.EVT_CLOSE, self.on_close)
Пример #6
0
    def __init__(self,
                 parent,
                 id=wx.ID_ANY,
                 title='Standalone Visualizer',
                 pos=wx.DefaultPosition,
                 size=(800, 600),
                 style=wx.DEFAULT_FRAME_STYLE):
        wx.Frame.__init__(self, parent, id, title, pos, size, style)

        self._config = wx.Config("standalone_visualizer")

        ogre_tools.initializeOgre()

        visualizer_panel = ogre_visualizer.VisualizationPanel(self)

        self._visualizer_panel = visualizer_panel

        media_path = rostools.packspec.get_pkg_dir("gazebo_robot_description")
        media_path += "/world/Media/"

        media_paths = [media_path]
        media_paths.append(media_path)
        media_paths.append(media_path + "fonts")
        media_paths.append(media_path + "materials")
        media_paths.append(media_path + "materials/scripts")
        media_paths.append(media_path + "materials/programs")
        media_paths.append(media_path + "materials/textures")
        media_paths.append(media_path + "models")
        media_paths.append(media_path + "models/pr2_new")

        ogre_tools.initializeResources(media_paths)

        visualizer_panel.createGridVisualizer("Grid", True)
        visualizer_panel.createAxesVisualizer("Origin Axes", False)
        visualizer_panel.createMarkerVisualizer("Visualization Markers", True)

        robot_vis = visualizer_panel.createRobotModelVisualizer(
            "Robot Model", False)
        robot_vis.setRobotDescription("robotdesc/pr2")

        planning = visualizer_panel.createPlanningVisualizer("Planning", False)
        planning.initialize("robotdesc/pr2", "display_kinematic_path")

        point_cloud = visualizer_panel.createPointCloudVisualizer(
            "Stereo Full Cloud", True)
        point_cloud.setTopic("videre/cloud")
        point_cloud.setColor(1.0, 1.0, 1.0)

        point_cloud = visualizer_panel.createPointCloudVisualizer(
            "Head Full Cloud", True)
        point_cloud.setTopic("full_cloud")
        point_cloud.setColor(1.0, 1.0, 0.0)

        point_cloud = visualizer_panel.createPointCloudVisualizer(
            "World 3D Map", True)
        point_cloud.setTopic("world_3d_map")
        point_cloud.setColor(1.0, 0.0, 0.0)
        point_cloud.setBillboardSize(0.01)

        laser_scan = visualizer_panel.createLaserScanVisualizer(
            "Head Scan", True)
        laser_scan.setScanTopic("tilt_scan")
        laser_scan.setColor(1.0, 0.0, 0.0)
        laser_scan.setDecayTime(30.0)

        laser_scan = visualizer_panel.createLaserScanVisualizer(
            "Floor Scan", True)
        laser_scan.setScanTopic("base_scan")
        laser_scan.setColor(0.0, 1.0, 0.0)
        laser_scan.setDecayTime(0.0)

        visualizer_panel.createOctreeVisualizer(
            "Octree", True).setOctreeTopic("full_octree")

        # Load our window options
        (x, y) = self.GetPositionTuple()
        (width, height) = self.GetSizeTuple()
        if (self._config.HasEntry(self._CONFIG_WINDOW_X)):
            x = self._config.ReadInt(self._CONFIG_WINDOW_X)
        if (self._config.HasEntry(self._CONFIG_WINDOW_Y)):
            y = self._config.ReadInt(self._CONFIG_WINDOW_Y)
        if (self._config.HasEntry(self._CONFIG_WINDOW_WIDTH)):
            width = self._config.ReadInt(self._CONFIG_WINDOW_WIDTH)
        if (self._config.HasEntry(self._CONFIG_WINDOW_HEIGHT)):
            height = self._config.ReadInt(self._CONFIG_WINDOW_HEIGHT)

        self.SetPosition((x, y))
        self.SetSize((width, height))

        visualizer_panel.loadConfig(self._config)

        self.Bind(wx.EVT_CLOSE, self.on_close)
Пример #7
0
 def OnInit(self):
   ogre_tools.initializeOgre()
   frame = rviz.VisualizationFrame(None)
   frame.initialize()
   frame.Show(True)
   return True
Пример #8
0
 def OnInit(self):
     ogre_tools.initializeOgre()
     frame = rviz.VisualizationFrame(None)
     frame.initialize()
     frame.Show(True)
     return True
Пример #9
0
 def OnInit(self):
   ogre_tools.initializeOgre()
   frame = VisualizerFrame(None, wx.ID_ANY, "Visualization Panel Test", wx.DefaultPosition, wx.Size( 800, 600 ) )
   frame.Show(True)
   return True
Пример #10
0
 def OnInit(self):
   ogre_tools.initializeOgre()
   frame = VisualizerFrame(None, wx.ID_ANY, "Visualization Panel Test", wx.DefaultPosition, wx.Size( 800, 600 ) )
   frame.Show(True)
   return True