Dev in Clion with ROS

CLion

Clion can be used inside Docker as it was developed by Java. Is also available to run it through ssh X11 forwarding. That feature beats QtCreator.

Dev in catkin_make workspace

source setup.*sh and run clion. Open CMakeCache.txt under build directory.

Dev in catkin_make_isoalted workspace

I haven’t find a proper way to read such worspace.

Dev with catkin tools

catkin tools is a new build system better than catkin_make. Same as Dev catkin_make_isolated, there are no direct way to support its build tree.

Write your own CMakeLists.txt

Inspired by cartographer_superbuild, We can write CMakeLists.txt by ourself to support ROS building system. Here is a example.

cmake_minimum_required(VERSION 3.5)
project(workspace)

set(CMAKE_CXX_STANDARD 11)

add_custom_target(DO_NOTHING)

message(${CMAKE_BINARY_DIR})

set(CATKIN_DEVEL_PREFIX "${CMAKE_BINARY_DIR}/devel")
set(CMAKE_PREFIX_PATH "${CMAKE_BINARY_DIR}/devel;/opt/ros/kinetic")

add_subdirectory(XXXX)

Clion would create a folder for itself. Don’t mix it with catkin-tool or catkin_make! They have different architecture.