How can I debug a node that needs a terminal in ROS-qtcreator ?

asked 2021-04-22 08:24:04 -0500

elpidiovaldez gravatar image

I hope this is the right forum for questions about the ROS/qt-creator framework.

My environment: Lubuntu 20.04/ROS Noetic/QtCreator plugin 4.9.2.

I installed ROS Qt-Creator from here, and imported an existing catkin_ws. Qt-creator can build the system.

One of the nodes is a command line interface for commanding the robot. It uses cin and cout. I can start this in Qt-creator's debugger if I do NOT select 'Run in terminal' under run settings (but then I cannot use the terminal). If I select 'run in terminal' then the executable does not start in the debugger - a message says it cannot change to the working directory.

What I have tried so far:

I tried setting the runtime working directory to '', '/home/paul/' and '/'. None work.

I have tried changing the terminal program in tools|options|environment|system. The original value is /usr/bin/x-terminal-emulator. I also tried /usr/bin/qterminal. I cannot see any other terminal programs in /usr/bin.

I tried adding the setting QT_ASSUME_STDERR_HAS_CONSOLE=1 to the environment of the executable as suggested here.

Why does the terminal not start ? How can I fix this ?

edit retag flag offensive close merge delete