Noam-Dori / ros-integrate

Extends IntelliJ-Based IDEs with ROS specific development tools
Apache License 2.0
22 stars 3 forks source link

Automatically detect ros installation and source setup file #55

Open wmmc88 opened 3 years ago

wmmc88 commented 3 years ago

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.

StefanFabian commented 3 years ago

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.