ros-integrate icon indicating copy to clipboard operation
ros-integrate copied to clipboard

Automatically detect ros installation and source setup file

Open wmmc88 opened this issue 4 years ago • 1 comments

Feature: Automatically detect ros installation directory(ex. /opt/ros/noetic) and source the setup file(source /opt/ros/noetic/setup.bash).

Background https://github.com/Noam-Dori/ros-integrate/issues/52#issuecomment-716621973 This feature would prevent needing to source the ros install and running clion from a sourced terminal. Without sourcing, the plugin doesn't automatically detect the ros path and any cmake configuration for ros packages would error at cmake files mentioning catkin

Details I'd like for the plugin to detect ros installs on the system (typically always at /opt/ros/<version>), and source the setup file(/opt/ros/<version>/setup.bash) so that cmake would process correctly without needing to run clion from a sourced terminal.

wmmc88 avatar Oct 26 '20 20:10 wmmc88

If you were to do this, you'd want to source the setup.bash or setup.sh of the loaded workspace as that is the environment you typically want to work in. The ros setup file is usually not sufficient as it would lack all local packages present in your catkin workspace. However, the problem with CLion requiring a sourced environment is easily fixed by modifying the desktop item as described here.

StefanFabian avatar Nov 04 '20 10:11 StefanFabian