00001 /****************************************************************************** 00002 * \file 00003 * 00004 * $Id:$ 00005 * 00006 * Copyright (C) Brno University of Technology 00007 * 00008 * This file is part of software developed by dcgm-robotics@FIT group. 00009 * 00010 * Author: Zdenek Materna (imaterna@fit.vutbr.cz) 00011 * Supervised by: Michal Spanel (spanel@fit.vutbr.cz) 00012 * Date: 31/7/2012 00013 * 00014 * This file is free software: you can redistribute it and/or modify 00015 * it under the terms of the GNU Lesser General Public License as published by 00016 * the Free Software Foundation, either version 3 of the License, or 00017 * (at your option) any later version. 00018 * 00019 * This file is distributed in the hope that it will be useful, 00020 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00021 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00022 * GNU Lesser General Public License for more details. 00023 * 00024 * You should have received a copy of the GNU Lesser General Public License 00025 * along with this file. If not, see <http://www.gnu.org/licenses/>. 00026 */ 00027 00028 #include <srs_assisted_arm_navigation_ui/bb_estimation_display.h> 00029 00030 #include <OGRE/OgreSceneManager.h> 00031 00032 #include <rviz/render_panel.h> 00033 #include <rviz/visualization_manager.h> 00034 #include <rviz/window_manager_interface.h> 00035 00036 #include <sstream> 00037 00038 using namespace srs_assisted_arm_navigation_ui; 00039 00040 00044 CButBBEstimationDisplay::CButBBEstimationDisplay(const std::string & name,rviz::VisualizationManager * manager) 00045 : Display( name, manager ) 00046 { 00047 // Get node handle 00048 ros::NodeHandle private_nh("~"); 00049 00050 // Try to create, add and show example window 00051 rviz::WindowManagerInterface * wi( manager->getWindowManager() ); 00052 00053 if( wi != 0 ) 00054 { 00055 // Arm manipulation controls 00056 m_bb_estimation_window = new CButBBEstimationControls( wi->getParentWindow(), wxT("BB estimator plugin"), wi); 00057 00058 if( m_bb_estimation_window != 0 ) 00059 { 00060 std::cerr << "Adding to the window manager..." << std::endl; 00061 wi->addPane( "Assisted object detection", m_bb_estimation_window ); 00062 wi->showPane( m_bb_estimation_window ); 00063 std::cerr << "Added..." << std::endl; 00064 } 00065 }else{ 00066 std::cerr << "No window manager, no panes :( " << std::endl; 00067 } 00068 } 00069 00070 00071 /* 00072 * Destructor 00073 */ 00074 CButBBEstimationDisplay::~CButBBEstimationDisplay() 00075 { 00076 } 00077