Nodes running from eclipse in debug not in rosnode list [closed]
Hi,
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)
project(test)
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)
SET(CMAKE_CXX_FLAGS_DISTRIBUTION "-g-fshort-wchar")
SET(CMAKE_C_FLAGS_DISTRIBUTION "-g-fshort-wchar")include_directories(
${catkin_INCLUDE_DIRS} include src )
add_executable(test_service_server src/test_service_server.cpp)
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/21154... this seems to be the same problem.
Edit2: @Dirk Thomas proposed a solve:
set(CMAKE_CXX_FLAGS_DEBUG"${CMAKE_CXX_FLAGS_DEBUG} -Wall")
it seems to be, what I need. Question answered.
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.