ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
As has been mentioned in several of the comments, using CLion requires building with cmake directly rather than through Catkin. This is off the "garden path" for both CLion and Catkin, so user beware.
That being said.... we found a way that works for us. Usually. When the stars are aligned. From a clean checkout of your intended workspace:
catkin_make
like you normally wouldsource devel/setup.bash
to load the workspace's environment variables correctly. Also like would when regularly using catkin.Generation Path
to ../build
CMake options
to -DCATKIN_DEVEL_PREFIX:PATH=/path/to/your/workspace_ws/devel
It's definitely dodgy though, and does not work well with the catkin
tool at all. When in doubt, wipe your build and devel directories and start over using regular catkin_make
outside of CLion.
Still, this technique does mostly work (as of Jan 2018) and CLion is a very powerful tool when hacking on ROS stuff.
For those interested, I created an issue with the CLion dev team here: https://youtrack.jetbrains.com/issue/CPP-7438 It was unceremoniously closed with a "we have no plans to support etc" statement. Despite four "oh yeah, that'd be great!" comments.
2 | No.2 Revision |
As has been mentioned in several of the comments, using CLion requires building with cmake directly rather than through Catkin. This is off the "garden path" for both CLion and Catkin, so user beware.
That being said.... we found a way that works for us. Usually. When the stars are aligned. From a clean checkout of your intended workspace:
catkin_make
like you normally wouldsource devel/setup.bash
to load the workspace's environment variables correctly. Also like would when regularly using catkin.Generation Path
to ../build
CMake options
to -DCATKIN_DEVEL_PREFIX:PATH=/path/to/your/workspace_ws/devel
It's definitely dodgy though, and does not work well with the catkin
tool at all. When in doubt, wipe your build and devel directories and start over using regular catkin_make
outside of CLion.CLion. It helps to think of it like "making CLion load catkin projects" rather than "use CLion to build catkin projects."
Still, this technique does mostly work (as of Jan 2018) and CLion is a very powerful tool when hacking on ROS stuff.
For those interested, I created an issue with the CLion dev team here: https://youtrack.jetbrains.com/issue/CPP-7438 It was unceremoniously closed with a "we have no plans to support etc" statement. Despite four "oh yeah, that'd be great!" comments.
3 | No.3 Revision |
As has been mentioned in several of the comments, using CLion requires building with cmake directly rather than through Catkin. This is off the "garden path" for both CLion and Catkin, so user beware.
That being said.... we found a way that works for us. Usually. When the stars are aligned. From a clean checkout of your intended workspace:
catkin_make
like you normally wouldsource devel/setup.bash
to load the workspace's environment variables correctly. Also like would when regularly using catkin.Generation Path
to ../build
CMake options
to -DCATKIN_DEVEL_PREFIX:PATH=/path/to/your/workspace_ws/devel
It's definitely dodgy though, and does not work well with the catkin
tool at all. When in doubt, wipe your build and devel directories and start over using regular catkin_make
outside of CLion. It helps to think of it like "making CLion load catkin projects" rather than "use CLion to build catkin projects."
Still, this technique does mostly work (as of Jan 2018) and CLion is a very powerful tool when hacking on ROS stuff.
For those interested, I created an issue with the CLion dev team here:
and it was closed as a duplicate of:
https://youtrack.jetbrains.com/issue/CPP-7438
It was unceremoniously closed with a ... with a comment that "we have no plans to support etc" statement. Despite four "oh yeah, that'd be great!" comments.
There are many versions of this approach scattered around the Internet; this is just the one that seems to work for us, on Ubuntu 16.04 / ROS-Kinetic, this week.