ROS2 Development with CLion
This is a quick reference note on how to develop ROS2 packages with CLion IDE. The main reference is the official documentation.
- Create your ROS2 workspace and package as usual
- Build the workspace with the "CMAKE_EXPORT_COMPILE_COMMANDS" option ON. This will generate a JSON compilation database which can be used by CLion to find the dependent files.
- Source the colcon workspace and launch CLion from the same terminal
- Open the project and adjust root directory in CLion, from the main menu
-  https://www.jetbrains.com/help/clion/ros2-tutorial.html