Using QtCreator to edit and show sub-folders in a package

asked 2019-08-21 10:52:18 -0500

marinePhD gravatar image

updated 2019-08-21 11:03:27 -0500

I'm using catkin tools and I'm trying to setup QtCreator to work with ROS packages. I normally use vscode for my environment but I need to create a GUI so I'm thinking of moving to Qt. I've been able to succesfully build my package from Qt using cmake but I'm running into some issues which isn't making the IDE user-friendly. I'm not sure if this is qt thing or my configuration is just wrong. Here are my list of issues:

  • I'm unable to add sub-directories to the top level package. If I right-click on the package, add new, add existing etc are all greyed out .
  • Additonally some of my folders aren't showing up in the IDE. src shows up but include and other directories are simply missing.

This is what my CMakeLists.txt looks like:

cmake_minimum_required(VERSION 2.8.3)
project(ros_threads)

## Compile as C++11, supported in ROS Kinetic and newer
set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")


find_package(catkin REQUIRED COMPONENTS
  geometry_msgs
  nav_msgs
  roscpp
  rospy
  sensor_msgs
  std_msgs
)

find_package(Eigen3 REQUIRED)

catkin_package(
  INCLUDE_DIRS include
  CATKIN_DEPENDS
        geometry_msgs
        nav_msgs
        std_msgs
)

include_directories(include
${catkin_INCLUDE_DIRS})


add_executable(thread_playground
                src/main.cpp )


target_link_libraries(thread_playground ${catkin_LIBRARIES})

install(DIRECTORY launch
  DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
)
edit retag flag offensive close merge delete

Comments

1

This is not an answer, but just to make you aware of it: ros-qtc-plugin.

gvdhoorn gravatar image gvdhoorn  ( 2019-08-21 11:34:23 -0500 )edit

@gvdhoorn I tried it a few years back and I wasn't a fan. I might have to give it another try if I don't get this working

marinePhD gravatar image marinePhD  ( 2019-08-21 11:43:51 -0500 )edit

A "few years"? That's ages in software.

But I only wanted to make sure you were aware of it. Whatever makes you happy.

gvdhoorn gravatar image gvdhoorn  ( 2019-08-21 12:40:57 -0500 )edit