qtcreator ros
Hi, i try to combine ros with qt. I want to develop some GUI including ros. I created a package with roscreate-pkg then i’ve created a QTProject copy whole cpp, h and ui files into the main folder of my package. Then i edit the CMakeLists.txt and tipped in the whole cpp h and ui files. When i launch CMakeLists.txt from qtcreator i’ve got: C
Make Error at CMakeLists.txt:2 (include):
include could not find load file:
/core/rosbuild/rosbuild.cmake
CMake Error at CMakeLists.txt:12 (rosbuild_init):
Unknown CMake command "rosbuild_init".
-- Configuring incomplete, errors occurred!
This is my CmakeLists.txt
cmake_minimum_required(VERSION 2.4.6)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
# Set the build type. Options are:aaa
# Coverage : w/ debug symbols, w/o optimization, w/ code-coverage
# Debug : w/ debug symbols, w/o optimization
# Release : w/o debug symbols, w/ optimization
# RelWithDebInfo : w/ debug symbols, w/ optimization
# MinSizeRel : w/o debug symbols, w/ optimization, stripped binaries
#set(ROS_BUILD_TYPE RelWithDebInfo)
rosbuild_init()
find_package(Qt4 REQUIRED)
# enable/disable some Qt features
set( QT_USE_QTGUI TRUE )
set( QT_USE_QTOPENGL TRUE )
set( QT_USE_QTXML TRUE )
include(${QT_USE_FILE})
ADD_DEFINITIONS(-DQT_NO_KEYWORDS)
Qt specific files might need to be moc'd. This includes the headers, so put those here:
set(qt_srcs
main.cpp
mainwindow.cpp)
set(qt_hdrs
mainwindow.h)
qt4_automoc(${qt_srcs})
QT4_WRAP_CPP(qt_moc_srcs ${qt_hdrs})
QT4_WRAP_UI(uis_h mainwindow.ui)
# include this for ui_h
include_directories(${CMAKE_CURRENT_BINARY_DIR})
#set the default path for built executables to the "bin" directory
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
#set the default path for built libraries to the "lib" directory
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
#uncomment if you have defined messages
#rosbuild_genmsg()
#uncomment if you have defined services
#rosbuild_gensrv()
#common commands for building c++ executables and libraries
#rosbuild_add_library(${PROJECT_NAME} src/example.cpp)
#target_link_libraries(${PROJECT_NAME} another_library)
#rosbuild_add_boost_directories()
#rosbuild_link_boost(${PROJECT_NAME} thread)
#rosbuild_add_executable(example examples/example.cpp)
#target_link_libraries(example ${PROJECT_NAME})
Where is the problem? I spend 3 days trying to make it run, i cracking up.
Please provide OS, ROS distro you are using whenever you ask a question (without them it's hard for others to narrow down your problem).
SORRY GUYS MY FAULT. Im using ubuntu 12.04 and fuerte