kinetic : rviz segfaults when loading panel
hi, i use ubuntu 16.04 and kinetic kame, when i run rosrun rviz rviz all runs well, but when i try to load a rviz plugin which adds a panel, it crashes and tells segmention fault ?
i changed CMakeListst.txt to support Qt5 , here the CMakeListst.txt file:
cmake_minimum_required(VERSION 2.8.3)
project(flobotics_finger_rviz_controller)
find_package(catkin REQUIRED COMPONENTS
roscpp
rviz
flobotics_finger_messages
)
## This plugin includes Qt widgets, so we must include Qt.
## We'll use the version that rviz used so they are compatible.
if(rviz_QT_VERSION VERSION_LESS "5")
message(STATUS "Using Qt4 based on the rviz_QT_VERSION: ${rviz_QT_VERSION}")
find_package(Qt4 ${rviz_QT_VERSION} EXACT REQUIRED QtCore QtGui)
## pull in all required include dirs, define QT_LIBRARIES, etc.
include(${QT_USE_FILE})
else()
message(STATUS "Using Qt5 based on the rviz_QT_VERSION: ${rviz_QT_VERSION}")
find_package(Qt5 ${rviz_QT_VERSION} EXACT REQUIRED Core Widgets)
## make target_link_libraries(${QT_LIBRARIES}) pull in all required dependencies
set(QT_LIBRARIES Qt5::Widgets)
endif()
add_definitions(-DQT_NO_KEYWORDS)
###########
## Build ##
###########
## Specify additional locations of header files
## Your package locations should be listed before other locations
# include_directories(include)
include_directories(
include/flobotics_finger_rviz_controller/
include/flobotics_finger_rviz_servo_controller/
${catkin_INCLUDE_DIRS}
)
set(SRC_FILES
src/flobotics_finger_rviz_controller.cpp
src/flobotics_finger_rviz_servo_controller.cpp
)
add_library(${PROJECT_NAME} ${SRC_FILES})
## Specify libraries to link a library or executable target against
target_link_libraries(${PROJECT_NAME}
${QT_LIBRARIES}
${catkin_LIBRARIES}
)
when i then run catkin_make, it tells me:
-- Using Qt5 based on the rviz_QT_VERSION: 5.5.1
but then errors following, like:
In file included from /home/ros/catkin_ws/src/flobotics_finger_rviz_controller/src/flobotics_finger_rviz_servo_controller.cpp:3:0:
/home/ros/catkin_ws/src/flobotics_finger_rviz_controller/include/flobotics_finger_rviz_servo_controller/flobotics_finger_rviz_servo_controller.h:18:1: error: ‘signals’ does not name a type
signals:
^
/home/ros/catkin_ws/src/flobotics_finger_rviz_controller/include/flobotics_finger_rviz_servo_controller/flobotics_finger_rviz_servo_controller.h:22:5: error: ‘QVBoxLayout’ does not name a type
QVBoxLayout* _vbox;
^
I tried to include #include <qvboxlayout> but nothing changed
i think it has something todo with the qt5 install on ubuntu 16.04 ? if i look at /usr/include/ there is only a qt4 dir, in /usr/share/ is a qt5 directory.
i run qtchooser -qt=qt5
but nothing changed.