Rosanswers logo

I'm running a ROS-node from eclipse (catkin Project) in debug mode (-g for GCC) and when debugging them (brakepoint pretty much in the middle of the node), after calling ros::init (registering the node) it does not pop up in the node list (rosnode list) but the node is able to use ROS_INFO() and prints the proper ros timecode next to the prints.

Due to the size of the project i desperately need debugging and this is the only option that allows me to debug threw my node code and also step into the source for my lib. i realize there is a much cleaner way to switch btw. debug and release, this was the fastest one (working on it).

My CMakeLists.txt for the package:

cmake_minimum_required(VERSION 2.8.3)
find_package(catkin REQUIRED COMPONENTS roscpp rospy std_msgs )
catkin_package( INCLUDE_DIRS include LIBRARIES mylib
CATKIN_DEPENDS roscpp rospy std_msgs message_runtime)

SET(CMAKE_BUILD_TYPE distribution)

${catkin_INCLUDE_DIRS} include src > ) <br> > add_executable(test_service_server > src/test_service_server.cpp) <br> > target against target_link_libraries( > test_service_server > ${catkin_LIBRARIES} ${PROJECT_SOURCE_DIR}/lib/libmylib.so.1)

Is there a reason for it (ROS not registering nodes compiled as debug code etc.) or did i somehow manage do screw sth. up?

Edit: http://answers.ros.org/question/211548/fix-catkin-workspace-cant-launch-newly-compiled-nodes/ this seems to be the same problem.

Edit2: @Dirk Thomas proposed a solve:


it seems to be, what I need. Question answered.

Originally posted by Reiner on ROS Answers with karma: 61 on 2015-05-13

Post score: 0

Original comments

Comment by Dirk Thomas on 2015-06-24:
ROS nodes will behave the same when being built in debug mode as in release mode. Except that they have more debug output. might be slower and provide line information when being run in a debugger.


1 Answer 1


Rosanswers logo

You should use the Debug build type already defined in CMake instead of a custom and likely incomplete build type: http://stackoverflow.com/questions/7724569/debug-vs-release-in-cmake

Originally posted by Dirk Thomas with karma: 16276 on 2015-06-24

This answer was ACCEPTED on the original site

Post score: 1


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.