Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Yes, I am doing it. rviz sees the plugin but can not load

When I am doing

nm -D devel/lib/libassistant_panel.so | grep _ZTVN15assistant_panel16Widget_interfaceE

it returns

U _ZTVN15assistant_panel16Widget_interfaceE

Files:

CMakeLists.txt

##############################################################################
# CMake
##############################################################################

cmake_minimum_required(VERSION 2.8.0)
project(assistant_panel)

##############################################################################
# Catkin
##############################################################################

# qt_build provides the qt cmake glue, roscpp the comms for a default talker
find_package(catkin REQUIRED COMPONENTS qt_build roscpp rviz)
include_directories(${catkin_INCLUDE_DIRS})
# Use this to define what the package will export (e.g. libs, headers).
# Since the default here is to produce only a binary, we don't worry about
# exporting anything. 
catkin_package()

##############################################################################
# Qt Environment
##############################################################################

# this comes from qt_build's qt-ros.cmake which is automatically 
# included via the dependency call in package.xml
rosbuild_prepare_qt4(QtCore QtGui) # Add the appropriate components to the component list here

##############################################################################
# Sections
##############################################################################

file(GLOB QT_FORMS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ui/*.ui)
file(GLOB QT_RESOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} resources/*.qrc)
file(GLOB_RECURSE QT_MOC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} FOLLOW_SYMLINKS include/assistant_panel/*.hpp)

QT4_ADD_RESOURCES(QT_RESOURCES_CPP ${QT_RESOURCES})
QT4_WRAP_UI(QT_FORMS_HPP ${QT_FORMS})
QT4_WRAP_CPP(QT_MOC_HPP ${QT_MOC})

##############################################################################
# Sources
##############################################################################

file(GLOB_RECURSE QT_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} FOLLOW_SYMLINKS src/*.cpp)

##############################################################################
# Binaries
##############################################################################

#add_executable(assistant_panel ${QT_SOURCES} ${QT_RESOURCES_CPP} ${QT_FORMS_HPP} ${QT_MOC_HPP}  ${QT_MOC})

add_library(${PROJECT_NAME} ${QT_SOURCES} ${QT_RESOURCES_CPP} ${QT_MOC})


target_link_libraries(assistant_panel ${QT_LIBRARIES} ${catkin_LIBRARIES})
#install(TARGETS assistant_panel RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})

install(TARGETS
  ${PROJECT_NAME}
  ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
  LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
  RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

install(FILES 
  plugin_description.xml
  DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})

install(DIRECTORY media/
  DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/media)

install(DIRECTORY icons/
  DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/icons)

install(PROGRAMS scripts/send_test_msgs.py
  DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})

Package.xml

<package>
  <name>assistant_panel</name>
  <version>0.1.0</version>
  <description>

     assistant_panel

  </description>
  <maintainer email="ReMeDi@gmail.com">ReMeDi</maintainer>
  <author>ReMeDi</author>
  <license>BSD</license>
  <!-- <url type="bugtracker">https://github.com/stonier/qt_ros/issues</url> -->
  <!-- <url type="repository">https://github.com/stonier/qt_ros</url> -->


  <buildtool_depend>catkin</buildtool_depend>
  <build_depend>qt_build</build_depend>
  <build_depend>roscpp</build_depend>
  <build_depend>libqt4-dev</build_depend>
  <build_depend>rviz</build_depend>

  <run_depend>rviz</run_depend>
  <run_depend>qt_build</run_depend>
  <run_depend>roscpp</run_depend>
  <run_depend>libqt4-dev</run_depend>


  <export>
      <rosdoc config="${prefix}/rosdoc.yaml"/>
      <rviz plugin="${prefix}/plugin_description.xml"/>
  </export>

</package>

plugin_description.xml

<library path="libassistant_panel">
  <class name="assistant_panel/Widget_interface"
         type="assistant_panel::Widget_interface"
         base_class_type="rviz::Panel">
    <description>
      sddfsrfrfvg.
    </description>
  </class>
</library>

main_window.hpp

   /**
 * @file /include/assistant_panel/main_window.hpp
 *
 * @brief Qt based gui for assistant_panel.
 *
 * @date November 2010
 **/
#ifndef assistant_panel_MAIN_WINDOW_H
#define assistant_panel_MAIN_WINDOW_H

/*****************************************************************************
** Includes
*****************************************************************************/

//#include <QtGui/QWidget_interface>
#include "ui_main_window.h"
#include "qnode.hpp"
#include <ros/ros.h>
#include <geometry_msgs/Twist.h>
#include <rviz/panel.h>

/*****************************************************************************
** Namespace
*****************************************************************************/

namespace assistant_panel {

/*****************************************************************************
** Interface [Widget_interface]
*****************************************************************************/
/**
 * @brief Qt central, all operations relating to the view part here.
 */
class Widget_interface : public rviz::Panel {
Q_OBJECT

public:
   // Widget_interface();
    Widget_interface(QWidget *parent = 0);
    ~Widget_interface();

public Q_SLOTS:
    /******************************************
    ** Auto-connections (connectSlotsByName())
    *******************************************/

    /******************************************
    ** Manual connections
    *******************************************/

private:
    Ui::Widget_interface ui;
    //QNode qnode;
};

}  // namespace assistant_panel

#endif // assistant_panel_MAIN_WINDOW_H

main_window.cpp

/**
 * @file /src/main_window.cpp
 *
 * @brief Implementation for the qt gui.
 *
 * @date February 2011
 **/
/*****************************************************************************
** Includes
*****************************************************************************/

#include <QtGui>
#include <QMessageBox>
#include <iostream>
#include "../include/assistant_panel/main_window.hpp"

/*****************************************************************************
** Namespaces
*****************************************************************************/

namespace assistant_panel {

//using namespace Qt;

/*****************************************************************************
** Implementation [Widget_interface]
*****************************************************************************/

Widget_interface::Widget_interface(QWidget *parent)
    : rviz::Panel(parent)

{
    ui.setupUi(this); // Calling this incidentally connects all ui's triggers to on_...() callbacks in this class.

    setWindowIcon(QIcon(":/images/icon.png"));

}
}  // namespace assistant_panel

#include <pluginlib/class_list_macros.h>

PLUGINLIB_EXPORT_CLASS(assistant_panel::Widget_interface, rviz::Panel)

CMakeLists.txt

##############################################################################
# CMake
###################################################################

cmake_minimum_required(VERSION 2.8.0)
project(assistant_panel)

##############################################################################
# Catkin
##############################################################################

# qt_build provides the qt cmake glue, roscpp the comms for a default talker
find_package(catkin REQUIRED COMPONENTS qt_build roscpp rviz)
include_directories(${catkin_INCLUDE_DIRS})
# Use this to define what the package will export (e.g. libs, headers).
# Since the default here is to produce only a binary, we don't worry about
# exporting anything. 
catkin_package()

##############################################################################
# Qt Environment
##############################################################################

# this comes from qt_build's qt-ros.cmake which is automatically 
# included via the dependency call in package.xml
rosbuild_prepare_qt4(QtCore QtGui) # Add the appropriate components to the component list here

##############################################################################
# Sections
##############################################################################

file(GLOB QT_FORMS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ui/*.ui)
file(GLOB QT_RESOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} resources/*.qrc)
file(GLOB_RECURSE QT_MOC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} FOLLOW_SYMLINKS include/assistant_panel/*.hpp)

QT4_ADD_RESOURCES(QT_RESOURCES_CPP ${QT_RESOURCES})
QT4_WRAP_UI(QT_FORMS_HPP ${QT_FORMS})
QT4_WRAP_CPP(QT_MOC_HPP ${QT_MOC})

##############################################################################
# Sources
##############################################################################

file(GLOB_RECURSE QT_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} FOLLOW_SYMLINKS src/*.cpp)

##############################################################################
# Binaries
##############################################################################

#add_executable(assistant_panel ${QT_SOURCES} ${QT_RESOURCES_CPP} ${QT_FORMS_HPP} ${QT_MOC_HPP}  ${QT_MOC})

add_library(${PROJECT_NAME} ${QT_SOURCES} ${QT_RESOURCES_CPP} ${QT_MOC})


target_link_libraries(assistant_panel ${QT_LIBRARIES} ${catkin_LIBRARIES})
#install(TARGETS assistant_panel RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})

install(TARGETS
  ${PROJECT_NAME}
  ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
  LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
  RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

install(FILES 
  plugin_description.xml
  DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})

install(DIRECTORY media/
  DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/media)

install(DIRECTORY icons/
  DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/icons)

install(PROGRAMS scripts/send_test_msgs.py
  DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})

Package.xml

<package>
  <name>assistant_panel</name>
  <version>0.1.0</version>
  <description>

     assistant_panel

  </description>
  <maintainer email="ReMeDi@gmail.com">ReMeDi</maintainer>
  <author>ReMeDi</author>
  <license>BSD</license>
  <!-- <url type="bugtracker">https://github.com/stonier/qt_ros/issues</url> -->
  <!-- <url type="repository">https://github.com/stonier/qt_ros</url> -->


  <buildtool_depend>catkin</buildtool_depend>
  <build_depend>qt_build</build_depend>
  <build_depend>roscpp</build_depend>
  <build_depend>libqt4-dev</build_depend>
  <build_depend>rviz</build_depend>

  <run_depend>rviz</run_depend>
  <run_depend>qt_build</run_depend>
  <run_depend>roscpp</run_depend>
  <run_depend>libqt4-dev</run_depend>


  <export>
      <rosdoc config="${prefix}/rosdoc.yaml"/>
      <rviz plugin="${prefix}/plugin_description.xml"/>
  </export>

</package>

plugin_description.xml

<library path="libassistant_panel">
  <class name="assistant_panel/Widget_interface"
         type="assistant_panel::Widget_interface"
         base_class_type="rviz::Panel">
    <description>
      sddfsrfrfvg.
    </description>
  </class>
</library>

main_window.hpp

   /**
 * @file /include/assistant_panel/main_window.hpp
 *
 * @brief Qt based gui for assistant_panel.
 *
 * @date November 2010
 **/
#ifndef assistant_panel_MAIN_WINDOW_H
#define assistant_panel_MAIN_WINDOW_H

/*****************************************************************************
** Includes
*****************************************************************************/

//#include <QtGui/QWidget_interface>
#include "ui_main_window.h"
#include "qnode.hpp"
#include <ros/ros.h>
#include <geometry_msgs/Twist.h>
#include <rviz/panel.h>

/*****************************************************************************
** Namespace
*****************************************************************************/

namespace assistant_panel {

/*****************************************************************************
** Interface [Widget_interface]
*****************************************************************************/
/**
 * @brief Qt central, all operations relating to the view part here.
 */
class Widget_interface : public rviz::Panel {
Q_OBJECT

public:
   // Widget_interface();
    Widget_interface(QWidget *parent = 0);
    ~Widget_interface();

public Q_SLOTS:
    /******************************************
    ** Auto-connections (connectSlotsByName())
    *******************************************/

    /******************************************
    ** Manual connections
    *******************************************/

private:
    Ui::Widget_interface ui;
    //QNode qnode;
};

}  // namespace assistant_panel

#endif // assistant_panel_MAIN_WINDOW_H

main_window.cpp

/**
 * @file /src/main_window.cpp
 *
 * @brief Implementation for the qt gui.
 *
 * @date February 2011
 **/
/*****************************************************************************
** Includes
*****************************************************************************/

#include <QtGui>
#include <QMessageBox>
#include <iostream>
#include "../include/assistant_panel/main_window.hpp"

/*****************************************************************************
** Namespaces
*****************************************************************************/

namespace assistant_panel {

//using namespace Qt;

/*****************************************************************************
** Implementation [Widget_interface]
*****************************************************************************/

Widget_interface::Widget_interface(QWidget *parent)
    : rviz::Panel(parent)

{
    ui.setupUi(this); // Calling this incidentally connects all ui's triggers to on_...() callbacks in this class.

    setWindowIcon(QIcon(":/images/icon.png"));

}
}  // namespace assistant_panel

#include <pluginlib/class_list_macros.h>

PLUGINLIB_EXPORT_CLASS(assistant_panel::Widget_interface, rviz::Panel)

Yes, I am doing it. rviz sees the plugin but can not load

When I am doing

nm -D devel/lib/libassistant_panel.so | grep _ZTVN15assistant_panel16Widget_interfaceE

it returns

U _ZTVN15assistant_panel16Widget_interfaceE

Files:

CMakeLists.txt

##############################################################################
# CMake
##############################################################################

cmake_minimum_required(VERSION 2.8.0)
project(assistant_panel)

##############################################################################
# Catkin
##############################################################################

# qt_build provides the qt cmake glue, roscpp the comms for a default talker
find_package(catkin REQUIRED COMPONENTS qt_build roscpp rviz)
include_directories(${catkin_INCLUDE_DIRS})
# Use this to define what the package will export (e.g. libs, headers).
# Since the default here is to produce only a binary, we don't worry about
# exporting anything. 
catkin_package()

##############################################################################
# Qt Environment
##############################################################################

# this comes from qt_build's qt-ros.cmake which is automatically 
# included via the dependency call in package.xml
rosbuild_prepare_qt4(QtCore QtGui) # Add the appropriate components to the component list here

##############################################################################
# Sections
##############################################################################

file(GLOB QT_FORMS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ui/*.ui)
file(GLOB QT_RESOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} resources/*.qrc)
file(GLOB_RECURSE QT_MOC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} FOLLOW_SYMLINKS include/assistant_panel/*.hpp)

QT4_ADD_RESOURCES(QT_RESOURCES_CPP ${QT_RESOURCES})
QT4_WRAP_UI(QT_FORMS_HPP ${QT_FORMS})
QT4_WRAP_CPP(QT_MOC_HPP ${QT_MOC})

##############################################################################
# Sources
##############################################################################

file(GLOB_RECURSE QT_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} FOLLOW_SYMLINKS src/*.cpp)

##############################################################################
# Binaries
##############################################################################

#add_executable(assistant_panel ${QT_SOURCES} ${QT_RESOURCES_CPP} ${QT_FORMS_HPP} ${QT_MOC_HPP}  ${QT_MOC})

add_library(${PROJECT_NAME} ${QT_SOURCES} ${QT_RESOURCES_CPP} ${QT_MOC})


target_link_libraries(assistant_panel ${QT_LIBRARIES} ${catkin_LIBRARIES})
#install(TARGETS assistant_panel RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})

install(TARGETS
  ${PROJECT_NAME}
  ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
  LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
  RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

install(FILES 
  plugin_description.xml
  DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})

install(DIRECTORY media/
  DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/media)

install(DIRECTORY icons/
  DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/icons)

install(PROGRAMS scripts/send_test_msgs.py
  DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})

Package.xml

<package>
  <name>assistant_panel</name>
  <version>0.1.0</version>
  <description>

     assistant_panel

  </description>
  <maintainer email="ReMeDi@gmail.com">ReMeDi</maintainer>
  <author>ReMeDi</author>
  <license>BSD</license>
  <!-- <url type="bugtracker">https://github.com/stonier/qt_ros/issues</url> -->
  <!-- <url type="repository">https://github.com/stonier/qt_ros</url> -->


  <buildtool_depend>catkin</buildtool_depend>
  <build_depend>qt_build</build_depend>
  <build_depend>roscpp</build_depend>
  <build_depend>libqt4-dev</build_depend>
  <build_depend>rviz</build_depend>

  <run_depend>rviz</run_depend>
  <run_depend>qt_build</run_depend>
  <run_depend>roscpp</run_depend>
  <run_depend>libqt4-dev</run_depend>


  <export>
      <rosdoc config="${prefix}/rosdoc.yaml"/>
      <rviz plugin="${prefix}/plugin_description.xml"/>
  </export>

</package>

plugin_description.xml

<library path="libassistant_panel">
  <class name="assistant_panel/Widget_interface"
         type="assistant_panel::Widget_interface"
         base_class_type="rviz::Panel">
    <description>
      sddfsrfrfvg.
    </description>
  </class>
</library>

main_window.hpp

   /**
 * @file /include/assistant_panel/main_window.hpp
 *
 * @brief Qt based gui for assistant_panel.
 *
 * @date November 2010
 **/
#ifndef assistant_panel_MAIN_WINDOW_H
#define assistant_panel_MAIN_WINDOW_H

/*****************************************************************************
** Includes
*****************************************************************************/

//#include <QtGui/QWidget_interface>
#include "ui_main_window.h"
#include "qnode.hpp"
#include <ros/ros.h>
#include <geometry_msgs/Twist.h>
#include <rviz/panel.h>

/*****************************************************************************
** Namespace
*****************************************************************************/

namespace assistant_panel {

/*****************************************************************************
** Interface [Widget_interface]
*****************************************************************************/
/**
 * @brief Qt central, all operations relating to the view part here.
 */
class Widget_interface : public rviz::Panel {
Q_OBJECT

public:
   // Widget_interface();
    Widget_interface(QWidget *parent = 0);
    ~Widget_interface();

public Q_SLOTS:
    /******************************************
    ** Auto-connections (connectSlotsByName())
    *******************************************/

    /******************************************
    ** Manual connections
    *******************************************/

private:
    Ui::Widget_interface ui;
    //QNode qnode;
};

}  // namespace assistant_panel

#endif // assistant_panel_MAIN_WINDOW_H

main_window.cpp

/**
 * @file /src/main_window.cpp
 *
 * @brief Implementation for the qt gui.
 *
 * @date February 2011
 **/
/*****************************************************************************
** Includes
*****************************************************************************/

#include <QtGui>
#include <QMessageBox>
#include <iostream>
#include "../include/assistant_panel/main_window.hpp"

/*****************************************************************************
** Namespaces
*****************************************************************************/

namespace assistant_panel {

//using namespace Qt;

/*****************************************************************************
** Implementation [Widget_interface]
*****************************************************************************/

Widget_interface::Widget_interface(QWidget *parent)
    : rviz::Panel(parent)

{
    ui.setupUi(this); // Calling this incidentally connects all ui's triggers to on_...() callbacks in this class.

    setWindowIcon(QIcon(":/images/icon.png"));

}
}  // namespace assistant_panel

#include <pluginlib/class_list_macros.h>

PLUGINLIB_EXPORT_CLASS(assistant_panel::Widget_interface, rviz::Panel)

CMakeLists.txt

##############################################################################
# CMake
###################################################################

cmake_minimum_required(VERSION 2.8.0)
project(assistant_panel)

##############################################################################
# Catkin
##############################################################################

# qt_build provides the qt cmake glue, roscpp the comms for a default talker
find_package(catkin REQUIRED COMPONENTS qt_build roscpp rviz)
include_directories(${catkin_INCLUDE_DIRS})
# Use this to define what the package will export (e.g. libs, headers).
# Since the default here is to produce only a binary, we don't worry about
# exporting anything. 
catkin_package()

##############################################################################
# Qt Environment
##############################################################################

# this comes from qt_build's qt-ros.cmake which is automatically 
# included via the dependency call in package.xml
rosbuild_prepare_qt4(QtCore QtGui) # Add the appropriate components to the component list here

##############################################################################
# Sections
##############################################################################

file(GLOB QT_FORMS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ui/*.ui)
file(GLOB QT_RESOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} resources/*.qrc)
file(GLOB_RECURSE QT_MOC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} FOLLOW_SYMLINKS include/assistant_panel/*.hpp)

QT4_ADD_RESOURCES(QT_RESOURCES_CPP ${QT_RESOURCES})
QT4_WRAP_UI(QT_FORMS_HPP ${QT_FORMS})
QT4_WRAP_CPP(QT_MOC_HPP ${QT_MOC})

##############################################################################
# Sources
##############################################################################

file(GLOB_RECURSE QT_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} FOLLOW_SYMLINKS src/*.cpp)

##############################################################################
# Binaries
##############################################################################

#add_executable(assistant_panel ${QT_SOURCES} ${QT_RESOURCES_CPP} ${QT_FORMS_HPP} ${QT_MOC_HPP}  ${QT_MOC})

add_library(${PROJECT_NAME} ${QT_SOURCES} ${QT_RESOURCES_CPP} ${QT_MOC})


target_link_libraries(assistant_panel ${QT_LIBRARIES} ${catkin_LIBRARIES})
#install(TARGETS assistant_panel RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})

install(TARGETS
  ${PROJECT_NAME}
  ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
  LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
  RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

install(FILES 
  plugin_description.xml
  DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})

install(DIRECTORY media/
  DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/media)

install(DIRECTORY icons/
  DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/icons)

install(PROGRAMS scripts/send_test_msgs.py
  DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})

Package.xml

<package>
  <name>assistant_panel</name>
  <version>0.1.0</version>
  <description>

     assistant_panel

  </description>
  <maintainer email="ReMeDi@gmail.com">ReMeDi</maintainer>
  <author>ReMeDi</author>
  <license>BSD</license>
  <!-- <url type="bugtracker">https://github.com/stonier/qt_ros/issues</url> -->
  <!-- <url type="repository">https://github.com/stonier/qt_ros</url> -->


  <buildtool_depend>catkin</buildtool_depend>
  <build_depend>qt_build</build_depend>
  <build_depend>roscpp</build_depend>
  <build_depend>libqt4-dev</build_depend>
  <build_depend>rviz</build_depend>

  <run_depend>rviz</run_depend>
  <run_depend>qt_build</run_depend>
  <run_depend>roscpp</run_depend>
  <run_depend>libqt4-dev</run_depend>


  <export>
      <rosdoc config="${prefix}/rosdoc.yaml"/>
      <rviz plugin="${prefix}/plugin_description.xml"/>
  </export>

</package>

plugin_description.xml

<library path="libassistant_panel">
  <class name="assistant_panel/Widget_interface"
         type="assistant_panel::Widget_interface"
         base_class_type="rviz::Panel">
    <description>
      sddfsrfrfvg.
    </description>
  </class>
</library>

main_window.hpp

   /**
 * @file /include/assistant_panel/main_window.hpp
 *
 * @brief Qt based gui for assistant_panel.
 *
 * @date November 2010
 **/
#ifndef assistant_panel_MAIN_WINDOW_H
#define assistant_panel_MAIN_WINDOW_H

/*****************************************************************************
** Includes
*****************************************************************************/

//#include <QtGui/QWidget_interface>
#include "ui_main_window.h"
#include "qnode.hpp"
#include <ros/ros.h>
#include <geometry_msgs/Twist.h>
#include <rviz/panel.h>

/*****************************************************************************
** Namespace
*****************************************************************************/

namespace assistant_panel {

/*****************************************************************************
** Interface [Widget_interface]
*****************************************************************************/
/**
 * @brief Qt central, all operations relating to the view part here.
 */
class Widget_interface : public rviz::Panel {
Q_OBJECT

public:
   // Widget_interface();
    Widget_interface(QWidget *parent = 0);
    ~Widget_interface();

public Q_SLOTS:
    /******************************************
    ** Auto-connections (connectSlotsByName())
    *******************************************/

    /******************************************
    ** Manual connections
    *******************************************/

private:
    Ui::Widget_interface ui;
    //QNode qnode;
};

}  // namespace assistant_panel

#endif // assistant_panel_MAIN_WINDOW_H

main_window.cpp

/**
 * @file /src/main_window.cpp
 *
 * @brief Implementation for the qt gui.
 *
 * @date February 2011
 **/
/*****************************************************************************
** Includes
*****************************************************************************/

#include <QtGui>
#include <QMessageBox>
#include <iostream>
#include "../include/assistant_panel/main_window.hpp"

/*****************************************************************************
** Namespaces
*****************************************************************************/

namespace assistant_panel {

//using namespace Qt;

/*****************************************************************************
** Implementation [Widget_interface]
*****************************************************************************/

Widget_interface::Widget_interface(QWidget *parent)
    : rviz::Panel(parent)

{
    ui.setupUi(this); // Calling this incidentally connects all ui's triggers to on_...() callbacks in this class.

    setWindowIcon(QIcon(":/images/icon.png"));

}
}  // namespace assistant_panel

#include <pluginlib/class_list_macros.h>

PLUGINLIB_EXPORT_CLASS(assistant_panel::Widget_interface, rviz::Panel)