Setting up ROS package in CLion

怎甘沉沦 提交于 2019-12-03 07:10:27

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.

Darren H

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
whurobocon

To add on to what WillC suggested,CLion reload the last cmake compiling result by default.

However, if you failed to find catkin.cmake during the last attempt even though you source the devel/setup.bash and open CLion, you also cannot find catkin.cmake.

You should click File --> Reload Cmake Project and you should get the right result.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!