ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
3

opening ROS stacks in qtcreator

asked 2012-07-25 05:46:59 -0500

klas gravatar image

updated 2012-07-25 06:06:30 -0500

Lorenz gravatar image

Opening a ROS package in qtcreator is easy thanks to the built in support for CMake projects. However, when working with stacks that contain a large number of packages it would be convenient to be able to open them all at once in qtcreator, so that you can easily jump between source/header files of multiple packages.

I added the following lines to the MY_STACK CMakeLists.txt in an attempt to achieve this:

execute_process(COMMAND rosstack contents MY_STACK OUTPUT_VARIABLE MY_STACK_PACKAGES)
set(MY_STACK_PACKAGE_LIST ${MY_STACK_PACKAGES})
string(REPLACE "\n" ";" MY_STACK_PACKAGE_LIST ${MY_STACK_PACKAGES})
foreach(package ${MY_STACK_PACKAGE_LIST})
  execute_process(COMMAND rospack find ${package} OUTPUT_VARIABLE package_path OUTPUT_STRIP_TRAILING_WHITESPACE)
  add_subdirectory(${package_path})
endforeach(package)

which should add all the packages in MY_STACK as subprojects of MY_STACK. This would probably work if MY_STACK was a 'normal' CMake project. However, when running cmake . in MY_STACK_PATH there are errors like:

rospack found package "MY_STACK" at "", but the current directory is "PATH_TO_MY_STACK_PACKAGE_1".
You should double-check your ROS_PACKAGE_PATH to ensure that packages are found in the correct precedence order.

Is there anyway to get around this or will I have to stick to loading all the packages in MY_STACK as separate projects in qtcreator?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-02-05 07:47:43 -0500

robbel gravatar image

I do not have a work-around for this problem but suggest to make the stack a "Session" in qtcreator. That way you only have to open the packages once and can directly switch back to the Session/stack as required.

edit flag offensive delete link more

Question Tools

4 followers

Stats

Asked: 2012-07-25 05:46:59 -0500

Seen: 263 times

Last updated: Feb 05 '14