Ask Your Question

CLion error when using the debugger and image transport

asked 2015-12-01 04:24:42 -0500

gcc05 gravatar image

I've been trying to use Jetbrains CLion IDE for ROS programming, and for now it's working quite well. I'm able to run and debug ROS nodes, but I am having troubles with a node which uses the ImageTransport::subscribeCamera, which raises an exception when running it with the debugger.

The error message is:

[ INFO] [1448964578.745547058]: Connected to master at [localhost:11311]
Traceback (most recent call last):
  File "/opt/ros/indigo/bin/catkin_find", line 11, in <module>
    from catkin.find_in_workspaces import find_in_workspaces
ImportError: No module named catkin.find_in_workspaces
terminate called after throwing an instance of 'image_transport::TransportLoadException'
  what():  Unable to load plugin for transport 'raw', error string:
Could not find library corresponding to plugin image_transport/raw_sub. Make sure the plugin description XML file has the correct name of the library and that the library actually exists.
Signal: SIGABRT (Aborted)

This does not happen when the debugger is not used (i.e. running it from CLion with the 'play' button), and neither happens when debugging the binary with gdb in the command line, in which cases the node seems to run correctly. I suspect it may be due to the Import Error that is shown before the exception, though I have not much idea about why this could be. I'm running CLion from a ROS-ready bash terminal.

Any idea on this?

Thank you in advance.

edit retag flag offensive close merge delete


how to setup Clion to debug ROS nodes within it? thanks!

deliang gravatar image deliang  ( 2016-12-08 21:57:45 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2015-12-01 06:09:40 -0500

gvdhoorn gravatar image

updated 2015-12-01 08:18:25 -0500

Could be that for a debug session, CLion is overriding / purging the environment in which the node is run. If that is the case, the search paths are probably not set correctly / present, resulting in an import error at runtime.

edit: I'm not a CLion user, but looking at Creating and Editing Run/Debug Configurations and Run/Debug Configurations, it would seem you can configure Environment Variables for Run/Debug configurations. Would be a bit manual, but perhaps you can copy just enough ROS envvars to get things working.

edit flag offensive delete link more


You are right, it resets PYTHONPATH to clion/bin/gdb/lib/python2.7 and PYTHONHOME to clion/bin/gdb. I could not find a way to make the bundled gdb use the environment variables, but a self compiled version of gdb 7.8 seems to do the trick... Being able to use the bundled one would be awesome though.

gcc05 gravatar image gcc05  ( 2015-12-01 07:48:40 -0500 )edit

(The edit) could also work (though I could not find all the set of variables needed). Looks easier for me to have a compiled gdb 7.8 and make CLion point at it, which is also project independent (I think the run configurations must be configured manually every time for each project). Thank you!

gcc05 gravatar image gcc05  ( 2015-12-01 09:01:29 -0500 )edit

answered 2016-06-12 20:05:23 -0500

lovelyhorse gravatar image

I fixed this by going to file->settings-> build/execution/deployment->Toolchains, then setting the Debugger GDB to 'Use specified GDB' instead of the bundled version.

To find out which gdb to specify, on ubuntu type: $ which gdb and it should outline something like /usr/bin/gdb, then select this. Happy debugging!

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2015-12-01 04:24:42 -0500

Seen: 1,157 times

Last updated: Dec 01 '15