Setting up ROS package in CLion

Try this (for Linux):

  1. Open a command line

  2. Run catkin_make on your package.

  3. source your catkin_workspace/devel/setup.bash file e.g. source ~/my_dev_folder/catkin_ws/devel/setup.bash

  4. Start CLion from [CLion install dir]/bin/clion.sh e.g. cd ~/Downloads/clion-1.2.4/bin && ./clion.sh

CLion should then start with knowledge about the packages in your catkin workspace, through the local environment variables set up by the setup.bash file.


To add on to what WillC suggested, you can also modify the desktop entry to start the application from bash instead of manually doing so.

To do this, edit the desktop file located at

~/.local/share/applications/jetbrains-clion.desktop

by modifying the line containing Exec= to

Exec=bash -i -c "/INSTALL_LOCATION/clion-2016.3.2/bin/clion.sh" %f